gsprofilesrv_pub/profiles_engine_wrapper_api/inc/MProEngNotifyHandler2.h
changeset 39 c044bc2ea8f7
parent 38 5a264aaf7677
child 40 6465d5bb863a
equal deleted inserted replaced
38:5a264aaf7677 39:c044bc2ea8f7
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Abstract interface for handling profile change notification
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MPROENGNOTIFYHANDLER2_H
       
    21 #define MPROENGNOTIFYHANDLER2_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <MProEngNotifyHandler.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MProEngNotifyHandler2Ext;
       
    28 class MProEngActiveSettingsObserver;
       
    29 class MProEngMasterSettingsObserver;
       
    30 
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 * Profiles change notification handler.
       
    36 * This class is used for registration to get notifications about changes in
       
    37 * Profiles data.
       
    38 *
       
    39 *  @lib ProfileEngine.lib
       
    40 *  @since S60 3.1
       
    41 */
       
    42 class MProEngNotifyHandler2 : public MProEngNotifyHandler
       
    43     {
       
    44     public: // New functions
       
    45     
       
    46     
       
    47         /**
       
    48          * Request notifications of active profile settings. The notifications are
       
    49          * received as long as CancelActiveSettingsNotificationsL() 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.
       
    53          * @since 10.1
       
    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.
       
    59          */
       
    60         virtual TInt RequestActiveSettingsNotificationsL( 
       
    61                 MProEngActiveSettingsObserver &aObserver ) = 0;
       
    62         
       
    63         /**
       
    64          * Request notifications of master settings. The notifications are
       
    65          * received as long as CanceltMasterSettingsNotificationsL() or
       
    66          * CancelAll() is called. If the client wants to change the observer,
       
    67          * he should first cancel these notifications and then re-request them
       
    68          * with the new observer instance.
       
    69          * @since 10.1
       
    70          * @param aObserver Reference to the observer to be notified in the
       
    71          *        event of profile activation.
       
    72          * @return KErrNone if succesful, KErrAlreadyExists if this notification
       
    73          *         handler is already used for requesting profile activation
       
    74          *         notifications. In other cases another system wide error code.
       
    75          */
       
    76         virtual TInt RequestMasterSettingsNotificationsL( 
       
    77                 MProEngMasterSettingsObserver &aObserver ) = 0;
       
    78         
       
    79         
       
    80         /**
       
    81          * Cancel the registration for receiving notifications about the active
       
    82          * settings modification events.
       
    83          * @since 10.1
       
    84          */
       
    85         virtual void CancelActiveSettingsNotificationsL() = 0;
       
    86         
       
    87         /**
       
    88          * Cancel the registration for receiving notifications about the master
       
    89          * settings modification events.
       
    90          * @since 10.1
       
    91          */
       
    92         virtual void CancelMasterSettingsNotificationsL() = 0;
       
    93 
       
    94     public:
       
    95 
       
    96         /**
       
    97         * Destructor.
       
    98         */
       
    99         virtual ~MProEngNotifyHandler2() {}
       
   100 
       
   101     private: // Extension interface
       
   102 
       
   103         /**
       
   104         * This member is internal and not intended for use.
       
   105         */
       
   106         virtual MProEngNotifyHandler2Ext* Extension2() { return NULL; }
       
   107 
       
   108     };
       
   109 
       
   110 #endif      // MPROENGNOTIFYHANDLER2_H
       
   111 
       
   112 // End of File
       
   113