policymanagement/dmutilserver/inc/DMUtilActiveObserver.h
author William Roberts <williamr@symbian.org>
Fri, 11 Jun 2010 16:26:29 +0100
branchGCC_SURGE
changeset 33 99323845c621
parent 0 b497e44ab2fc
child 54 085438c28042
permissions -rw-r--r--
Branch for GCC_SURGE fixes

/*
* Copyright (c) 2000 Nokia Corporation and/or its subsidiary(-ies). 
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: Implementation of policymanagement components
*
*/


#ifndef __DMUTIL_ACTIVEOBSERVER_HEADER__
#define __DMUTIL_ACTIVEOBSERVER_HEADER__

// INCLUDES

#include "DMUtilObserver.h"
#include <e32property.h>

// CONSTANTS
// MACROS
// DATA TYPES
// FUNCTION PROTOTYPES
// FORWARD DECLARATIONS
// CLASS DECLARATION

class CActiveObserver : public CActive
{
	public:
		static CActiveObserver* NewL( TPolicyManagementEventTypes aType);
	
		void SubscribeEventL( MActiveCallBackObserver* aDynamicCallBackObserver);
		void UnSubscribeEvent();
		void DoCancel();

		virtual ~CActiveObserver();
	protected:
		void RunL();
	private:	
		CActiveObserver( TPolicyManagementEventTypes aType);	
		TUint32 SubscribeKey( TPolicyManagementEventTypes aType);		
	private: 
		RPointerArray<MActiveCallBackObserver> iSubcribers;
		TPolicyManagementEventTypes type;
		RProperty iProperty;
		TBool iSubscribed;
};


#endif // __DMUTIL_ACTIVEOBSERVER_HEADER__