wvuing/IMPSServiceSettingsUI/SharedDataSrc/CIMPSSystemNotifierPubSub.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2004 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:  Publish & Subscribe system keys change observer
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CIMPSSYSTEMNOTFIER_H
       
    21 #define CIMPSSYSTEMNOTFIERSYSTEMAGENT_H
       
    22 
       
    23 //  INCLUDES
       
    24 
       
    25 #include "MIMPSSystemNotifier.h"
       
    26 #include "MIMPSPropertyNotificationObserver.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MIMPSSystemNotifierObserver;
       
    30 class CIMPSPropertyObserver;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  Implementation of the Publish & Subscribe system keys change observer
       
    36 *
       
    37 *  @since 2.6
       
    38 */
       
    39 NONSHARABLE_CLASS( CIMPSSystemNotifierPubSub ) : public MIMPSSystemNotifier,
       
    40         public MIMPSPropertyNotificationObserver
       
    41     {
       
    42 public:  // Constructors and destructor
       
    43 
       
    44     /**
       
    45     * Two-phased constructor.
       
    46     * @param aObserver Observer to be informed when observed system key changes
       
    47     */
       
    48     static CIMPSSystemNotifierPubSub* NewL( MIMPSSystemNotifierObserver& aObserver,
       
    49     const TUid aKey );
       
    50 
       
    51     /**
       
    52     * Destructor.
       
    53     */
       
    54     virtual ~CIMPSSystemNotifierPubSub();
       
    55 
       
    56 protected:     // from MIMPSSystemNotifier
       
    57 
       
    58     /**
       
    59     * @see MIMPSSystemNotifier
       
    60     */
       
    61     TInt Subscribe();
       
    62 
       
    63     /**
       
    64     * @see MIMPSSystemNotifier
       
    65     */
       
    66     void UnSubscribe();
       
    67 
       
    68     /**
       
    69     * @see MIMPSSystemNotifier
       
    70     */
       
    71     TInt GetIntKey( TInt& aValue );
       
    72 
       
    73 protected:  // from MIMPSPropertyNotificationObserver.h
       
    74 
       
    75     void HandlePropertyNotificationEventL( TUid aCategory, TUint aKey );
       
    76 
       
    77 private:
       
    78 
       
    79     /**
       
    80     * C++ default constructor.
       
    81     */
       
    82     CIMPSSystemNotifierPubSub( MIMPSSystemNotifierObserver& aObserver,
       
    83                                const TUid aKey );
       
    84 
       
    85     /**
       
    86     * Symbian 2nd phase constructor..
       
    87     */
       
    88     void ConstructL();
       
    89 
       
    90 private:    // Data
       
    91     // Observers property sets, owned
       
    92     CIMPSPropertyObserver* iPropertyObserver;
       
    93 
       
    94     // Observer to be informed when value of system key changes
       
    95     MIMPSSystemNotifierObserver& iObserver;
       
    96 
       
    97     // the key this observer is attached
       
    98     TUid iKey;
       
    99 
       
   100     };
       
   101 
       
   102 #endif      // CIMPSSYSTEMNOTFIERSYSTEMAGENT_H
       
   103 
       
   104 // End of File