policymanagement/dmutilserver/inc/DMUtilActiveObserver.h
changeset 0 b497e44ab2fc
child 23 4af31167ea77
equal deleted inserted replaced
-1:000000000000 0:b497e44ab2fc
       
     1 /*
       
     2 * Copyright (c) 2000 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: Implementation of policymanagement components
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __DMUTIL_ACTIVEOBSERVER_HEADER__
       
    20 #define __DMUTIL_ACTIVEOBSERVER_HEADER__
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include "DMUtilObserver.h"
       
    25 #include <e32property.h>
       
    26 
       
    27 // CONSTANTS
       
    28 // MACROS
       
    29 // DATA TYPES
       
    30 // FUNCTION PROTOTYPES
       
    31 // FORWARD DECLARATIONS
       
    32 // CLASS DECLARATION
       
    33 
       
    34 class CActiveObserver : public CActive
       
    35 {
       
    36 	public:
       
    37 		static CActiveObserver* NewL( TPolicyManagementEventTypes aType);
       
    38 	
       
    39 		void SubscribeEventL( MActiveCallBackObserver* aDynamicCallBackObserver);
       
    40 		void UnSubscribeEvent();
       
    41 		void DoCancel();
       
    42 
       
    43 		virtual ~CActiveObserver();
       
    44 	protected:
       
    45 		void RunL();
       
    46 	private:	
       
    47 		CActiveObserver( TPolicyManagementEventTypes aType);	
       
    48 		TUint32 SubscribeKey( TPolicyManagementEventTypes aType);		
       
    49 	private: 
       
    50 		RPointerArray<MActiveCallBackObserver> iSubcribers;
       
    51 		TPolicyManagementEventTypes type;
       
    52 		RProperty iProperty;
       
    53 		TBool iSubscribed;
       
    54 };
       
    55 
       
    56 
       
    57 #endif // __DMUTIL_ACTIVEOBSERVER_HEADER__