tzservices/tzserver/Client/Include/tzchangenotifier.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __tzchangenotifier_h__
       
    17 #define __tzchangenotifier_h__
       
    18 
       
    19 #include <e32base.h>
       
    20 
       
    21 class RTz;
       
    22 class CTzConverter;
       
    23 class CTzRuleHolder;
       
    24 
       
    25 //-------------------------------------------------------------------------
       
    26 /**
       
    27 Observes the Time Zone Server and relays change notification of time zone
       
    28 to the rules holder so it can clear its cache.
       
    29 
       
    30 @internalComponent
       
    31 @since 9.1
       
    32 */
       
    33 class CTzChangeNotifier : public CActive
       
    34 	{
       
    35 public:
       
    36 	~CTzChangeNotifier();
       
    37 	static CTzChangeNotifier* NewL( CTzRuleHolder& aRulesHolder );
       
    38 	TInt StartObserving();
       
    39 	void StopObserving();
       
    40 	
       
    41 	void RunIfReadyL();
       
    42 
       
    43 private:
       
    44     inline CTzChangeNotifier( CTzRuleHolder& aRulesHolder );
       
    45 
       
    46 	// from CActive
       
    47 	virtual void RunL();
       
    48 	virtual void DoCancel();
       
    49 
       
    50 private:
       
    51     CTzRuleHolder& iRulesHolder;
       
    52 	};
       
    53 
       
    54 inline CTzChangeNotifier::CTzChangeNotifier( CTzRuleHolder& aRulesHolder ) :
       
    55 		CActive       (CActive::EPriorityStandard), 
       
    56 		iRulesHolder  (aRulesHolder)
       
    57 		{
       
    58 		}
       
    59 
       
    60 #endif