policymanagement/dmutilserver/inc/DMUtilObserver.h
changeset 0 b497e44ab2fc
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_OBSERVER_HEADER__
       
    20 #define __DMUTIL_OBSERVER_HEADER__
       
    21 
       
    22 // INCLUDES
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 enum TPolicyManagementEventTypes
       
    29 {
       
    30 	EPolicyChangedEvent = 0,
       
    31 };
       
    32 
       
    33 // MACROS
       
    34 // DATA TYPES
       
    35 // FUNCTION PROTOTYPES
       
    36 // FORWARD DECLARATIONS
       
    37 
       
    38 class CActiveObserver;
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 class TDMUtilPassiveObserver
       
    43 {
       
    44 	public:
       
    45 		/**
       
    46 		* Check is policies changed after the function was called last time 
       
    47 	    * @return ETrue if policies is changed after the function was called last time 
       
    48         */
       
    49 		static IMPORT_C TBool IsPolicyChangedL();
       
    50 
       
    51 		/**
       
    52 		* Check is RFS performed after the function was called last time 
       
    53 	    * @return ETrue if RFS is performed after the function was called last time 
       
    54         */
       
    55 		static IMPORT_C TBool IsRFSPerformedL();
       
    56 	private:
       
    57 };
       
    58 
       
    59 /**
       
    60 * Callback interface for active observer
       
    61 */
       
    62 class MActiveCallBackObserver
       
    63 {
       
    64 	public:
       
    65 		/**
       
    66 		* Called when observed event is launched.
       
    67         */
       
    68 		virtual void EventLaunchedL() = 0;
       
    69 	private:
       
    70 };
       
    71 
       
    72 class CDMUtilActiveObserver : public CBase
       
    73 {
       
    74 	public:
       
    75 		/**
       
    76 		* Constructor for CDMUtilActiveObserver
       
    77 	    * @param aType Event to be observed
       
    78 	    * @return New CDMUtilActiveObserver object
       
    79         */
       
    80 		IMPORT_C static CDMUtilActiveObserver* NewL( TPolicyManagementEventTypes aType);
       
    81 	
       
    82 		/**
       
    83 		* Subscribe event, callback interface implementation is called when event launched 
       
    84 	    * @param aDynamicCallBackObserver Object which implements callback interface
       
    85         */		
       
    86         IMPORT_C void SubscribeEventL( MActiveCallBackObserver* aDynamicCallBackObserver);
       
    87 		/**
       
    88 		* Unsubscribe event
       
    89         */		
       
    90 		IMPORT_C void UnSubscribeEvent();
       
    91 
       
    92 		/**
       
    93 		* Destructor
       
    94         */		
       
    95 		virtual ~CDMUtilActiveObserver();
       
    96 	private:	
       
    97 		CDMUtilActiveObserver();	
       
    98 	private:
       
    99 	 	CActiveObserver* iActiveObserver;
       
   100 };
       
   101 
       
   102 
       
   103 #endif // __DMUTIL_OBSERVER_HEADER__