tzservices/tzserver/Client/Include/tzruleholder.h
changeset 0 2e3d3ce01487
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 // Copyright (c) 2006-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 __TZ_RULEHOLDER_H__
       
    17 #define __TZ_RULEHOLDER_H__
       
    18 
       
    19 #include <vtzrules.h>
       
    20 #include "tzchangenotifier.h"
       
    21 
       
    22 // This class owns the actualised rules, encoded rules and TZID for the current time zone.
       
    23 NONSHARABLE_CLASS(CTzRuleHolder) : public CBase
       
    24 	{
       
    25 public:
       
    26     static CTzRuleHolder* NewL( RTz& aTzServer );
       
    27 	~CTzRuleHolder();
       
    28 	
       
    29 	inline void SetTzActualisedRules(CVTzActualisedRules* aRules);
       
    30 	inline void SetTzRules(CTzRules* aTzRules);
       
    31 	inline void SetCurrentTzId(TUint16 aId);
       
    32 	inline CVTzActualisedRules* TzActualisedRules();
       
    33 	inline CTzRules* TzRules();
       
    34 	inline TUint16 CurrentTzId();
       
    35 	inline RTz& Server();
       
    36 
       
    37 	void ClearRules();
       
    38 	void DoConvertL(TTime& aTime, TTzTimeReference aTimerRef);
       
    39     void NotifyTimeZoneChangeL(RTz::TTzChanges aChange);
       
    40 
       
    41 private:
       
    42     void ConstructL();
       
    43 	CTzRuleHolder( RTz& aTzServer );
       
    44 
       
    45 private:
       
    46 	CVTzActualisedRules*    iTzActualisedRules;
       
    47 	CTzRules*               iTzRules;
       
    48 	TUint16                 iCurrentTzId;
       
    49 	RTz&                    iTzServer;
       
    50 	CTzChangeNotifier*      iTzChangeNotifier;
       
    51 	};
       
    52 
       
    53 #include "tzruleholder.inl"
       
    54 
       
    55 #endif // __TZ_RULEHOLDER_H__
       
    56