2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
4 * This component and the accompanying materials are made available
5 * under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
6 * which accompanies this distribution, and is available
7 * at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Abstract interface for handling profile change notification
20 #ifndef MPROENGNOTIFYHANDLER_H
21 #define MPROENGNOTIFYHANDLER_H
26 // FORWARD DECLARATIONS
27 class MProEngNotifyHandlerExt;
28 class MProEngProfileActivationObserver;
29 class MProEngActiveProfileObserver;
30 class MProEngProfileObserver;
31 class MProEngProfileNameArrayObserver;
36 * Profiles change notification handler.
37 * This class is used for registration to get notifications about changes in
40 * @lib ProfileEngine.lib
43 class MProEngNotifyHandler
45 public: // New functions
48 * Request notifications of profile activations. The notifications are
49 * received as long as CancelProfileActivationNotifications() or
50 * CancelAll() is called. If the client wants to change the observer,
51 * he should first cancel these notifications and then re-request them
52 * with the new observer instance.
54 * @param aObserver Reference to the observer to be notified in the
55 * event of profile activation.
56 * @return KErrNone if succesful, KErrAlreadyExists if this notification
57 * handler is already used for requesting profile activation
58 * notifications. In other cases another system wide error code.
60 virtual TInt RequestProfileActivationNotificationsL(
61 MProEngProfileActivationObserver& aObserver ) = 0;
64 * Request notifications of active profile modifications.
65 * The notifications are received as long as
66 * CancelActiveProfileNotifications() or CancelAll() is called. If the
67 * client wants to change the observer, he should first cancel these
68 * notifications and then re-request them with the new observer
71 * @param aObserver Reference to the observer to be notified in the
72 * event of active profile modification.
73 * @return KErrNone if succesful, KErrAlreadyExists if this notification
74 * handler is already used for requesting active profile
75 * notifications. In other cases another system wide error code.
77 virtual TInt RequestActiveProfileNotificationsL(
78 MProEngActiveProfileObserver& aObserver ) = 0;
81 * Request notifications about changes in the given profile.
82 * This is useful for cases when the client is interested about
83 * changes in a specific profile no matter if the profile is active or
84 * not. The notifications are received as long as
85 * CancelProfileNotifications() or CancelAll() is called. If the
86 * client wants to change the observer for the notifications about the
87 * same profile, he should first cancel these notifications and then
88 * re-request them with the new observer instance.
90 * @param aObserver Reference to the observer to be notified in the
91 * event of modification of the specified profile.
92 * @param aProfileId the ID of the profile the changes of which has to
94 * @return KErrNone if succesful, KErrAlreadyExists if this notification
95 * handler is already used for requesting notifications of
96 * changes in the given profile. KErrNotFound, if a profile with
97 * the given ID does not exist. In other cases another system
100 virtual TInt RequestProfileNotificationsL(
101 MProEngProfileObserver& aObserver,
102 TInt aProfileId ) = 0;
105 * Request notifications about changes in the profile name array. This
106 * includes the cases when: a new profile has been created, a profile
107 * has been deleted, the name of a profile has been changed.
108 * The notifications are received as long as
109 * CancelProfileNameArrayNotifications() or CancelAll() is called. If
110 * the client wants to change the observer, he should first cancel these
111 * notifications and then re-request them with the new observer
114 * @param aObserver Reference to the observer to be notified in the
115 * event of a profile name array modification.
116 * @return KErrNone if succesful, KErrAlreadyExists if this notification
117 * handler is already used for requesting profile name array
118 * notifications. In other cases another system wide error code.
120 virtual TInt RequestProfileNameArrayNotificationsL(
121 MProEngProfileNameArrayObserver& aObserver ) = 0;
124 * Cancel the registration for receiving notifications about profile
128 virtual void CancelProfileActivationNotifications() = 0;
131 * Cancel the registration for receiving notifications about the active
132 * profile modification events.
135 virtual void CancelActiveProfileNotifications() = 0;
138 * Cancel the registration for receiving notifications about the given
139 * profile modification events.
141 * @param aProfileId The ID of the profile for which the client wants
142 * to cancel the receiving of modification events.
144 virtual void CancelProfileNotifications( TInt aProfileId ) = 0;
147 * Cancel the registration for receiving notifications about the changes
148 * in the profile name array.
151 virtual void CancelProfileNameArrayNotifications() = 0;
154 * Cancel all the registrations for receiving notifications.
155 * @since Series 60 3.1
157 virtual void CancelAll() = 0;
164 virtual ~MProEngNotifyHandler() {}
166 private: // Extension interface
169 * This member is internal and not intended for use.
171 virtual MProEngNotifyHandlerExt* Extension() { return NULL; }
175 #endif // MPROENGNOTIFYHANDLER_H