williamr@2
|
1 |
/*
|
williamr@2
|
2 |
* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
3 |
* All rights reserved.
|
williamr@2
|
4 |
* This component and the accompanying materials are made available
|
williamr@4
|
5 |
* under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
6 |
* which accompanies this distribution, and is available
|
williamr@4
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
8 |
*
|
williamr@2
|
9 |
* Initial Contributors:
|
williamr@2
|
10 |
* Nokia Corporation - initial contribution.
|
williamr@2
|
11 |
*
|
williamr@2
|
12 |
* Contributors:
|
williamr@2
|
13 |
*
|
williamr@2
|
14 |
* Description: Abstract interface for handling profile change notification
|
williamr@2
|
15 |
*
|
williamr@2
|
16 |
*/
|
williamr@2
|
17 |
|
williamr@2
|
18 |
|
williamr@2
|
19 |
|
williamr@2
|
20 |
#ifndef MPROENGNOTIFYHANDLER_H
|
williamr@2
|
21 |
#define MPROENGNOTIFYHANDLER_H
|
williamr@2
|
22 |
|
williamr@2
|
23 |
// INCLUDES
|
williamr@2
|
24 |
#include <e32def.h>
|
williamr@2
|
25 |
|
williamr@2
|
26 |
// FORWARD DECLARATIONS
|
williamr@2
|
27 |
class MProEngNotifyHandlerExt;
|
williamr@2
|
28 |
class MProEngProfileActivationObserver;
|
williamr@2
|
29 |
class MProEngActiveProfileObserver;
|
williamr@2
|
30 |
class MProEngProfileObserver;
|
williamr@2
|
31 |
class MProEngProfileNameArrayObserver;
|
williamr@2
|
32 |
|
williamr@2
|
33 |
// CLASS DECLARATION
|
williamr@2
|
34 |
|
williamr@2
|
35 |
/**
|
williamr@2
|
36 |
* Profiles change notification handler.
|
williamr@2
|
37 |
* This class is used for registration to get notifications about changes in
|
williamr@2
|
38 |
* Profiles data.
|
williamr@2
|
39 |
*
|
williamr@2
|
40 |
* @lib ProfileEngine.lib
|
williamr@2
|
41 |
* @since S60 3.1
|
williamr@2
|
42 |
*/
|
williamr@2
|
43 |
class MProEngNotifyHandler
|
williamr@2
|
44 |
{
|
williamr@2
|
45 |
public: // New functions
|
williamr@2
|
46 |
|
williamr@2
|
47 |
/**
|
williamr@2
|
48 |
* Request notifications of profile activations. The notifications are
|
williamr@2
|
49 |
* received as long as CancelProfileActivationNotifications() or
|
williamr@2
|
50 |
* CancelAll() is called. If the client wants to change the observer,
|
williamr@2
|
51 |
* he should first cancel these notifications and then re-request them
|
williamr@2
|
52 |
* with the new observer instance.
|
williamr@2
|
53 |
* @since S60 3.1
|
williamr@2
|
54 |
* @param aObserver Reference to the observer to be notified in the
|
williamr@2
|
55 |
* event of profile activation.
|
williamr@2
|
56 |
* @return KErrNone if succesful, KErrAlreadyExists if this notification
|
williamr@2
|
57 |
* handler is already used for requesting profile activation
|
williamr@2
|
58 |
* notifications. In other cases another system wide error code.
|
williamr@2
|
59 |
*/
|
williamr@2
|
60 |
virtual TInt RequestProfileActivationNotificationsL(
|
williamr@2
|
61 |
MProEngProfileActivationObserver& aObserver ) = 0;
|
williamr@2
|
62 |
|
williamr@2
|
63 |
/**
|
williamr@2
|
64 |
* Request notifications of active profile modifications.
|
williamr@2
|
65 |
* The notifications are received as long as
|
williamr@2
|
66 |
* CancelActiveProfileNotifications() or CancelAll() is called. If the
|
williamr@2
|
67 |
* client wants to change the observer, he should first cancel these
|
williamr@2
|
68 |
* notifications and then re-request them with the new observer
|
williamr@2
|
69 |
* instance.
|
williamr@2
|
70 |
* @since S60 3.1
|
williamr@2
|
71 |
* @param aObserver Reference to the observer to be notified in the
|
williamr@2
|
72 |
* event of active profile modification.
|
williamr@2
|
73 |
* @return KErrNone if succesful, KErrAlreadyExists if this notification
|
williamr@2
|
74 |
* handler is already used for requesting active profile
|
williamr@2
|
75 |
* notifications. In other cases another system wide error code.
|
williamr@2
|
76 |
*/
|
williamr@2
|
77 |
virtual TInt RequestActiveProfileNotificationsL(
|
williamr@2
|
78 |
MProEngActiveProfileObserver& aObserver ) = 0;
|
williamr@2
|
79 |
|
williamr@2
|
80 |
/**
|
williamr@2
|
81 |
* Request notifications about changes in the given profile.
|
williamr@2
|
82 |
* This is useful for cases when the client is interested about
|
williamr@2
|
83 |
* changes in a specific profile no matter if the profile is active or
|
williamr@2
|
84 |
* not. The notifications are received as long as
|
williamr@2
|
85 |
* CancelProfileNotifications() or CancelAll() is called. If the
|
williamr@2
|
86 |
* client wants to change the observer for the notifications about the
|
williamr@2
|
87 |
* same profile, he should first cancel these notifications and then
|
williamr@2
|
88 |
* re-request them with the new observer instance.
|
williamr@2
|
89 |
* @since S60 3.1
|
williamr@2
|
90 |
* @param aObserver Reference to the observer to be notified in the
|
williamr@2
|
91 |
* event of modification of the specified profile.
|
williamr@2
|
92 |
* @param aProfileId the ID of the profile the changes of which has to
|
williamr@2
|
93 |
* be notified.
|
williamr@2
|
94 |
* @return KErrNone if succesful, KErrAlreadyExists if this notification
|
williamr@2
|
95 |
* handler is already used for requesting notifications of
|
williamr@2
|
96 |
* changes in the given profile. KErrNotFound, if a profile with
|
williamr@2
|
97 |
* the given ID does not exist. In other cases another system
|
williamr@2
|
98 |
* wide error code.
|
williamr@2
|
99 |
*/
|
williamr@2
|
100 |
virtual TInt RequestProfileNotificationsL(
|
williamr@2
|
101 |
MProEngProfileObserver& aObserver,
|
williamr@2
|
102 |
TInt aProfileId ) = 0;
|
williamr@2
|
103 |
|
williamr@2
|
104 |
/**
|
williamr@2
|
105 |
* Request notifications about changes in the profile name array. This
|
williamr@2
|
106 |
* includes the cases when: a new profile has been created, a profile
|
williamr@2
|
107 |
* has been deleted, the name of a profile has been changed.
|
williamr@2
|
108 |
* The notifications are received as long as
|
williamr@2
|
109 |
* CancelProfileNameArrayNotifications() or CancelAll() is called. If
|
williamr@2
|
110 |
* the client wants to change the observer, he should first cancel these
|
williamr@2
|
111 |
* notifications and then re-request them with the new observer
|
williamr@2
|
112 |
* instance.
|
williamr@2
|
113 |
* @since S60 3.1
|
williamr@2
|
114 |
* @param aObserver Reference to the observer to be notified in the
|
williamr@2
|
115 |
* event of a profile name array modification.
|
williamr@2
|
116 |
* @return KErrNone if succesful, KErrAlreadyExists if this notification
|
williamr@2
|
117 |
* handler is already used for requesting profile name array
|
williamr@2
|
118 |
* notifications. In other cases another system wide error code.
|
williamr@2
|
119 |
*/
|
williamr@2
|
120 |
virtual TInt RequestProfileNameArrayNotificationsL(
|
williamr@2
|
121 |
MProEngProfileNameArrayObserver& aObserver ) = 0;
|
williamr@2
|
122 |
|
williamr@2
|
123 |
/**
|
williamr@2
|
124 |
* Cancel the registration for receiving notifications about profile
|
williamr@2
|
125 |
* activation events.
|
williamr@2
|
126 |
* @since S60 3.1
|
williamr@2
|
127 |
*/
|
williamr@2
|
128 |
virtual void CancelProfileActivationNotifications() = 0;
|
williamr@2
|
129 |
|
williamr@2
|
130 |
/**
|
williamr@2
|
131 |
* Cancel the registration for receiving notifications about the active
|
williamr@2
|
132 |
* profile modification events.
|
williamr@2
|
133 |
* @since S60 3.1
|
williamr@2
|
134 |
*/
|
williamr@2
|
135 |
virtual void CancelActiveProfileNotifications() = 0;
|
williamr@2
|
136 |
|
williamr@2
|
137 |
/**
|
williamr@2
|
138 |
* Cancel the registration for receiving notifications about the given
|
williamr@2
|
139 |
* profile modification events.
|
williamr@2
|
140 |
* @since S60 3.1
|
williamr@2
|
141 |
* @param aProfileId The ID of the profile for which the client wants
|
williamr@2
|
142 |
* to cancel the receiving of modification events.
|
williamr@2
|
143 |
*/
|
williamr@2
|
144 |
virtual void CancelProfileNotifications( TInt aProfileId ) = 0;
|
williamr@2
|
145 |
|
williamr@2
|
146 |
/**
|
williamr@2
|
147 |
* Cancel the registration for receiving notifications about the changes
|
williamr@2
|
148 |
* in the profile name array.
|
williamr@2
|
149 |
* @since S60 3.1
|
williamr@2
|
150 |
*/
|
williamr@2
|
151 |
virtual void CancelProfileNameArrayNotifications() = 0;
|
williamr@2
|
152 |
|
williamr@2
|
153 |
/**
|
williamr@2
|
154 |
* Cancel all the registrations for receiving notifications.
|
williamr@2
|
155 |
* @since Series 60 3.1
|
williamr@2
|
156 |
*/
|
williamr@2
|
157 |
virtual void CancelAll() = 0;
|
williamr@2
|
158 |
|
williamr@2
|
159 |
public:
|
williamr@2
|
160 |
|
williamr@2
|
161 |
/**
|
williamr@2
|
162 |
* Destructor.
|
williamr@2
|
163 |
*/
|
williamr@2
|
164 |
virtual ~MProEngNotifyHandler() {}
|
williamr@2
|
165 |
|
williamr@2
|
166 |
private: // Extension interface
|
williamr@2
|
167 |
|
williamr@2
|
168 |
/**
|
williamr@2
|
169 |
* This member is internal and not intended for use.
|
williamr@2
|
170 |
*/
|
williamr@2
|
171 |
virtual MProEngNotifyHandlerExt* Extension() { return NULL; }
|
williamr@2
|
172 |
|
williamr@2
|
173 |
};
|
williamr@2
|
174 |
|
williamr@2
|
175 |
#endif // MPROENGNOTIFYHANDLER_H
|
williamr@2
|
176 |
|
williamr@2
|
177 |
// End of File
|
williamr@2
|
178 |
|