epoc32/include/mw/mproengnotifyhandler.h
branchSymbian2
changeset 2 2fe1408b6811
parent 1 666f914201fb
child 4 837f303aceeb
     1.1 --- a/epoc32/include/mw/mproengnotifyhandler.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/mw/mproengnotifyhandler.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,178 @@
     1.4 -mproengnotifyhandler.h
     1.5 +/*
     1.6 +* Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies).
     1.7 +* All rights reserved.
     1.8 +* This component and the accompanying materials are made available
     1.9 +* 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
    1.10 +* which accompanies this distribution, and is available
    1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.12 +*
    1.13 +* Initial Contributors:
    1.14 +* Nokia Corporation - initial contribution.
    1.15 +*
    1.16 +* Contributors:
    1.17 +*
    1.18 +* Description: Abstract interface for handling profile change notification
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +
    1.24 +#ifndef MPROENGNOTIFYHANDLER_H
    1.25 +#define MPROENGNOTIFYHANDLER_H
    1.26 +
    1.27 +//  INCLUDES
    1.28 +#include <e32def.h>
    1.29 +
    1.30 +// FORWARD DECLARATIONS
    1.31 +class MProEngNotifyHandlerExt;
    1.32 +class MProEngProfileActivationObserver;
    1.33 +class MProEngActiveProfileObserver;
    1.34 +class MProEngProfileObserver;
    1.35 +class MProEngProfileNameArrayObserver;
    1.36 +
    1.37 +// CLASS DECLARATION
    1.38 +
    1.39 +/**
    1.40 +* Profiles change notification handler.
    1.41 +* This class is used for registration to get notifications about changes in
    1.42 +* Profiles data.
    1.43 +*
    1.44 +*  @lib ProfileEngine.lib
    1.45 +*  @since S60 3.1
    1.46 +*/
    1.47 +class MProEngNotifyHandler
    1.48 +    {
    1.49 +    public: // New functions
    1.50 +
    1.51 +        /**
    1.52 +         * Request notifications of profile activations. The notifications are
    1.53 +         * received as long as CancelProfileActivationNotifications() or
    1.54 +         * CancelAll() is called. If the client wants to change the observer,
    1.55 +         * he should first cancel these notifications and then re-request them
    1.56 +         * with the new observer instance.
    1.57 +         * @since S60 3.1
    1.58 +         * @param aObserver Reference to the observer to be notified in the
    1.59 +         *        event of profile activation.
    1.60 +         * @return KErrNone if succesful, KErrAlreadyExists if this notification
    1.61 +         *         handler is already used for requesting profile activation
    1.62 +         *         notifications. In other cases another system wide error code.
    1.63 +         */
    1.64 +        virtual TInt RequestProfileActivationNotificationsL(
    1.65 +                MProEngProfileActivationObserver& aObserver ) = 0;
    1.66 +
    1.67 +        /**
    1.68 +         * Request notifications of active profile modifications.
    1.69 +         * The notifications are received as long as
    1.70 +         * CancelActiveProfileNotifications() or CancelAll() is called. If the
    1.71 +         * client wants to change the observer, he should first cancel these
    1.72 +         * notifications and then re-request them with the new observer
    1.73 +         * instance.
    1.74 +         * @since S60 3.1
    1.75 +         * @param aObserver Reference to the observer to be notified in the
    1.76 +         *        event of active profile modification.
    1.77 +         * @return KErrNone if succesful, KErrAlreadyExists if this notification
    1.78 +         *         handler is already used for requesting active profile
    1.79 +         *         notifications. In other cases another system wide error code.
    1.80 +         */
    1.81 +        virtual TInt RequestActiveProfileNotificationsL(
    1.82 +                MProEngActiveProfileObserver& aObserver ) = 0;
    1.83 +
    1.84 +        /**
    1.85 +         * Request notifications about changes in the given profile.
    1.86 +         * This is useful for cases when the client is interested about
    1.87 +         * changes in a specific profile no matter if the profile is active or
    1.88 +         * not. The notifications are received as long as
    1.89 +         * CancelProfileNotifications() or CancelAll() is called. If the
    1.90 +         * client wants to change the observer for the notifications about the
    1.91 +         * same profile, he should first cancel these notifications and then
    1.92 +         * re-request them with the new observer instance.
    1.93 +         * @since S60 3.1
    1.94 +         * @param aObserver Reference to the observer to be notified in the
    1.95 +         *        event of modification of the specified profile.
    1.96 +         * @param aProfileId the ID of the profile the changes of which has to
    1.97 +         *        be notified.
    1.98 +         * @return KErrNone if succesful, KErrAlreadyExists if this notification
    1.99 +         *         handler is already used for requesting notifications of
   1.100 +         *         changes in the given profile. KErrNotFound, if a profile with
   1.101 +         *         the given ID does not exist. In other cases another system
   1.102 +         *         wide error code.
   1.103 +         */
   1.104 +        virtual TInt RequestProfileNotificationsL(
   1.105 +                MProEngProfileObserver& aObserver,
   1.106 +                TInt aProfileId ) = 0;
   1.107 +
   1.108 +        /**
   1.109 +         * Request notifications about changes in the profile name array. This
   1.110 +         * includes the cases when: a new profile has been created, a profile
   1.111 +         * has been deleted, the name of a profile has been changed.
   1.112 +         * The notifications are received as long as
   1.113 +         * CancelProfileNameArrayNotifications() or CancelAll() is called. If
   1.114 +         * the client wants to change the observer, he should first cancel these
   1.115 +         * notifications and then re-request them with the new observer
   1.116 +         * instance.
   1.117 +         * @since S60 3.1
   1.118 +         * @param aObserver Reference to the observer to be notified in the
   1.119 +         *        event of a profile name array modification.
   1.120 +         * @return KErrNone if succesful, KErrAlreadyExists if this notification
   1.121 +         *         handler is already used for requesting profile name array
   1.122 +         *         notifications. In other cases another system wide error code.
   1.123 +         */
   1.124 +        virtual TInt RequestProfileNameArrayNotificationsL(
   1.125 +                MProEngProfileNameArrayObserver& aObserver ) = 0;
   1.126 +
   1.127 +        /**
   1.128 +         * Cancel the registration for receiving notifications about profile
   1.129 +         * activation events.
   1.130 +         * @since S60 3.1
   1.131 +         */
   1.132 +        virtual void CancelProfileActivationNotifications() = 0;
   1.133 +
   1.134 +        /**
   1.135 +         * Cancel the registration for receiving notifications about the active
   1.136 +         * profile modification events.
   1.137 +         * @since S60 3.1
   1.138 +         */
   1.139 +        virtual void CancelActiveProfileNotifications() = 0;
   1.140 +
   1.141 +        /**
   1.142 +         * Cancel the registration for receiving notifications about the given
   1.143 +         * profile modification events.
   1.144 +         * @since S60 3.1
   1.145 +         * @param aProfileId The ID of the profile for which the client wants
   1.146 +         *        to cancel the receiving of modification events.
   1.147 +         */
   1.148 +        virtual void CancelProfileNotifications( TInt aProfileId ) = 0;
   1.149 +
   1.150 +        /**
   1.151 +         * Cancel the registration for receiving notifications about the changes
   1.152 +         * in the profile name array.
   1.153 +         * @since S60 3.1
   1.154 +         */
   1.155 +        virtual void CancelProfileNameArrayNotifications() = 0;
   1.156 +
   1.157 +        /**
   1.158 +        * Cancel all the registrations for receiving notifications.
   1.159 +        * @since Series 60 3.1
   1.160 +        */
   1.161 +        virtual void CancelAll() = 0;
   1.162 +
   1.163 +    public:
   1.164 +
   1.165 +        /**
   1.166 +        * Destructor.
   1.167 +        */
   1.168 +        virtual ~MProEngNotifyHandler() {}
   1.169 +
   1.170 +    private: // Extension interface
   1.171 +
   1.172 +        /**
   1.173 +        * This member is internal and not intended for use.
   1.174 +        */
   1.175 +        virtual MProEngNotifyHandlerExt* Extension() { return NULL; }
   1.176 +
   1.177 +    };
   1.178 +
   1.179 +#endif      // MPROENGNOTIFYHANDLER_H
   1.180 +
   1.181 +// End of File
   1.182 +