epoc32/include/mw/tz.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/mw/tz.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ b/epoc32/include/mw/tz.h	Wed Mar 31 12:33:34 2010 +0100
     1.3 @@ -1,9 +1,9 @@
     1.4  // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5  // All rights reserved.
     1.6  // This component and the accompanying materials are made available
     1.7 -// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 +// under the terms of "Eclipse Public License v1.0"
     1.9  // which accompanies this distribution, and is available
    1.10 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.11 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.12  //
    1.13  // Initial Contributors:
    1.14  // Nokia Corporation - initial contribution.
    1.15 @@ -16,125 +16,126 @@
    1.16  #ifndef __TIMEZONE_H__
    1.17  #define __TIMEZONE_H__
    1.18  
    1.19 +
    1.20  #include <e32base.h>
    1.21  #include <s32std.h>
    1.22 +#include <s32strm.h>
    1.23  #include <tzdefines.h>
    1.24 +#include <tzid.h>
    1.25  #include <tzupdate.h>
    1.26 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
    1.27 +#include <tzlocalizedcityrecord.h> //This should be be included as it is internalTechnology.
    1.28 +#include <tzlocalizedtimezonerecord.h> // Same as above and probably should not be exported to the epoc include
    1.29 +#endif
    1.30  
    1.31 -class CTzChangeNotifier;
    1.32 +
    1.33 +// Forward class references.
    1.34  class CTzRules;
    1.35  class CTzRuleHolder;
    1.36 +class CTzLocalizedCityRecord;
    1.37 +#ifdef SYMBIAN_ENABLE_SPLIT_HEADERS // This can be forward declared i.e. it should not be included as it is internal.
    1.38 +class CTzLocalizedTimeZoneRecord;
    1.39 +#endif
    1.40  
    1.41 -//-------------------------------------------------------------------------
    1.42 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
    1.43  /**
    1.44 -Encapsulates a time zone identifier.
    1.45 +The CTzUserNames class is used to encapsulate the names for a user-defined
    1.46 +time zone.
    1.47  
    1.48 -The identifier may be either a name or a number.
    1.49 -@publishedAll
    1.50 +When creating an instance of this class the client can specify the following
    1.51 +names:
    1.52 +
    1.53 +- Long standard time name, for example "Mountain Standard Time"
    1.54 +- Short standard time name, for example "MST"
    1.55 +- Long daylight saving time name, for example "Mountain Daylight Time"
    1.56 +- Short daylight saving time name, for example "MDT"
    1.57 +- City name, for example "Shiprock"
    1.58 +- Region name, for example "America"
    1.59 +
    1.60 +The client can also read these names.  
    1.61 +
    1.62 +@publishedPartner
    1.63  @released
    1.64 -@since 9.1
    1.65 -*/
    1.66 -class CTzId : public CBase
    1.67 -	{
    1.68 +*/ 
    1.69 +class CTzUserNames : public CBase
    1.70 +    {
    1.71  public:
    1.72 -
    1.73 -	IMPORT_C ~CTzId();
    1.74 +    IMPORT_C static CTzUserNames* NewL(const TDesC& aStandardName,
    1.75 +    	const TDesC& aShortStandardName, const TDesC& aDaylightSaveName,
    1.76 +    	const TDesC& aShortDaylightSaveName, const TDesC& aCityName,
    1.77 +    	const TDesC& aRegionName);
    1.78 +    IMPORT_C static CTzUserNames* NewLC(const TDesC& aStandardName,
    1.79 +    	const TDesC& aShortStandardName, const TDesC& aDayLightSaveName,
    1.80 +    	const TDesC& aShortDaylightSaveName, const TDesC& aCityName,
    1.81 +    	const TDesC& aRegionName);
    1.82 +	IMPORT_C ~CTzUserNames();
    1.83  	
    1.84 -	/** 
    1.85 -	@internalComponent 
    1.86 -	*/
    1.87 -	IMPORT_C CTzId* CloneL() const;
    1.88 +	IMPORT_C const TDesC& StandardName() const;
    1.89 +	IMPORT_C const TDesC& ShortStandardName() const;
    1.90 +	IMPORT_C const TDesC& DaylightSaveName() const;
    1.91 +	IMPORT_C const TDesC& ShortDaylightSaveName() const;
    1.92 +	IMPORT_C const TDesC& CityName() const;
    1.93 +	IMPORT_C const TDesC& RegionName() const;
    1.94  	
    1.95 -	IMPORT_C static CTzId* NewL(TUint aNumericId);
    1.96 -	
    1.97 -	IMPORT_C static CTzId* NewL(const TDesC8& aNameIdentity);
    1.98 -	
    1.99 -	/** 
   1.100 -	@internalComponent 
   1.101 -	*/
   1.102 -	IMPORT_C static CTzId* NewL(RReadStream& aStream);
   1.103 -	
   1.104 -	/** 
   1.105 -	@internalComponent 
   1.106 -	*/
   1.107 -	IMPORT_C void SetId(TUint aNumericId);
   1.108 -	
   1.109 -	/** 
   1.110 -	@internalComponent 
   1.111 -	*/
   1.112 -	IMPORT_C void SetIdL(const TDesC8& aNameIdentity);
   1.113 -	
   1.114 -	/** 
   1.115 -	@internalComponent 
   1.116 -	*/
   1.117 +	IMPORT_C static CTzUserNames* NewL(RReadStream& aStream);
   1.118 +	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
   1.119  	IMPORT_C void InternalizeL(RReadStream& aStream);
   1.120 -	
   1.121 -	/** 
   1.122 -	@internalComponent 
   1.123 -	*/
   1.124 -	IMPORT_C void ExternalizeL(RWriteStream& aStream) const;
   1.125 -
   1.126 -	IMPORT_C const TDesC8& TimeZoneNameID() const;
   1.127 -	
   1.128 -	IMPORT_C TUint TimeZoneNumericID() const;
   1.129 -	
   1.130 -	IMPORT_C TBool operator==(const CTzId& aTZId) const;
   1.131 -
   1.132 -	inline TBool operator!=(const CTzId& aTZId) const;
   1.133 -
   1.134 -public:
   1.135 -	static CTzId* NewL(TUint aReferenceId, const TDesC8& aZoneIdentity);
   1.136 -	void SetIdL(TUint aNumRefId, const TDesC8& aZoneIdentity);
   1.137 +	IMPORT_C TInt SizeOfObject() const;
   1.138  
   1.139  private:
   1.140 -	void ConstructL(const TDesC8& aZoneIdentity);
   1.141 -	CTzId();
   1.142 -	CTzId(TUint aNumericId);
   1.143 -
   1.144 +    CTzUserNames();
   1.145 +	void ConstructL(const TDesC& aStandardName, const TDesC& aShortStandardName,
   1.146 +		const TDesC& aDayLightSaveName, const TDesC& aShortDayLightSaveName,
   1.147 +		const TDesC& aCityName, const TDesC& aRegionName);
   1.148 +	
   1.149  private:
   1.150 -	HBufC8* iZoneId;
   1.151 -	TUint32 iReferenceId;
   1.152 -	};
   1.153 -
   1.154 -
   1.155 +    HBufC* iStandardName;
   1.156 +    HBufC* iShortStandardName;
   1.157 +    HBufC* iDaylightName;
   1.158 +    HBufC* iShortDaylightName;	
   1.159 +    HBufC* iCityName;
   1.160 +    HBufC* iRegionName;
   1.161 +    };
   1.162 +#else
   1.163 +class CTzUserNames;
   1.164 +#endif //SYMBIAN_ENABLE_SPLIT_HEADERS
   1.165  /** 
   1.166  The client interface to the time zone server. 
   1.167  
   1.168  This class performs two basic functions:
   1.169 +
   1.170  1. Converts between UTC time and local time.
   1.171  2. Sets the current local time zone.
   1.172  
   1.173  NOTE: The presence of a time zone server will alter the behaviour of the 
   1.174  time zone related function calls User::SetUTCOffset() and 
   1.175 -User::SetUTCTimeAndOffset(). The time zone server is shutdown when the 
   1.176 -last session (RTz) is closed. Therefore, to maintain consistent time related behaviour, 
   1.177 -licensees may want to keep a system level time zone server session open at all times.
   1.178 +User::SetUTCTimeAndOffset().  The time zone server is shutdown when the last
   1.179 +session (RTz) is closed.  Therefore, to maintain consistent time related
   1.180 +behaviour, licensees may want to keep a system level time zone server session
   1.181 +open at all times.
   1.182  
   1.183 -@see User
   1.184 +Exceptional cases occur when a user requests conversion for a non-existent local
   1.185 +time or a double local time. 
   1.186  
   1.187 -Exceptional cases occur when a user requests conversion 
   1.188 -for a non-existent local time or a double local time. 
   1.189 +Non-existent local times occur when the local time changes from winter to summer
   1.190 +for DST.
   1.191  
   1.192 -Non-existent local times occur when the local time 
   1.193 -changes from winter to summer for DST.
   1.194 +For example, 01:59 local time is non-existent on the day of a change to BST in
   1.195 +Europe/London since the time changes directly from 12:59:59 to 2:00.
   1.196  
   1.197 -For example, 01:59 local time is non-existent on the day of a change to BST
   1.198 -in Europe/London since the time changes directly from 12:59:59 to 2:00.
   1.199 +A double local time occurs when the local time changes from summer to winter. 
   1.200  
   1.201 -A double local time occurs when the local time changes from
   1.202 -summer to winter. 
   1.203 +For example, if the time changes at 02:00 AM BST to 01:00 AM GMT then local
   1.204 +times between 01:00 and 01:59 occur twice.
   1.205  
   1.206 -For example, if the time changes at 02:00 AM BST to 01:00 AM GMT
   1.207 -then local times between 01:00 and 01:59 occur twice.
   1.208 +The conversion applies the DST offset if the local time value is double and
   1.209 +applies the standard UTC offset if the local time does not exists.
   1.210  
   1.211 -The conversion applies the DST offset if the local time value is double and applies
   1.212 -the standard UTC offset if the local time does not exists.
   1.213 +This decision makes the conversion process asymmetrical around the discontinuity
   1.214 +in the local time when there is a DST change.
   1.215  
   1.216 -This decision makes the conversion process asymmetrical around
   1.217 -the discontinuity in the local time when there is a DST change.
   1.218 -
   1.219 -An example conversion from a double local time to UTC and 
   1.220 -from UTC to a double local time is:
   1.221 +An example conversion from a double local time to UTC and from UTC to a double
   1.222 +local time is:
   1.223  
   1.224  	01:59 AM BST => 00:59 AM UTC
   1.225  	01:59 AM UTC => 01:59 AM GMT
   1.226 @@ -145,7 +146,6 @@
   1.227      01:59 AM GMT => 01:59 AM UTC
   1.228      01:59 AM UTC => 02:59 AM BST 	
   1.229  	
   1.230 -
   1.231  @publishedAll
   1.232  @released
   1.233  @since 9.1
   1.234 @@ -154,36 +154,43 @@
   1.235  	{
   1.236  public:
   1.237  	/**
   1.238 -	These enumerators are to describe different modes of the automatic 
   1.239 -	DST event handling.
   1.240 -
   1.241 -	These are used both as arguments for the API SetAutoUpdateBehaviorL, 
   1.242 -	and as notifications for the publish and subscribe.
   1.243 +	Automatic DST update mode.
   1.244  	*/
   1.245  	enum TTzAutoDSTUpdateModes
   1.246  		{
   1.247  		/** No auto update notification when a DST event occurs. */
   1.248  		ETZAutoDSTUpdateOff = 0,
   1.249  
   1.250 -		/** Automatic time update will occur and the client app will be notified. */
   1.251 +		/** Automatic time update will occur and the client app will be
   1.252 +			notified. */
   1.253  		ETZAutoDSTUpdateOn,
   1.254  
   1.255 -		/** Client app needs to confirm that the time should be updated whenever a DST event occurs. */
   1.256 +		/** Client app needs to confirm that the time should be updated whenever
   1.257 +			a DST event occurs. */
   1.258  		ETZAutoDSTNotificationOnly,
   1.259  		};
   1.260  
   1.261 +	/**
   1.262 +	Time zone server change events.
   1.263 +	*/
   1.264  	enum TTzChanges
   1.265  		{
   1.266  		/** Used for notifying that the timezone database has changed.*/
   1.267  		ETZDatabaseChanged = 1,
   1.268 -		/** Used for notifying that the system timezone database has changed.*/
   1.269 +		/** Used for notifying that the system timezone has changed.*/
   1.270  		ETZSystemTimeZoneChanged,
   1.271  		/** Used for notifying that the DST rule has changed. */
   1.272  		ETZDSTRuleChanged,
   1.273  		/** Used for notifying that an automatic time update has taken place. */
   1.274 -		ETZAutomaticTimeUpdate
   1.275 +		ETZAutomaticTimeUpdate,
   1.276 +		/** Used for notifying that a change in localization resources has taken
   1.277 +			place. */
   1.278 +		ETZLocalizationDataChanged
   1.279  		};
   1.280  
   1.281 +	/**
   1.282 +	Time zone server panic codes.
   1.283 +	*/
   1.284  	enum TPanic
   1.285  		{
   1.286  		/** This panic indicates that the time zone server has not been found.*/
   1.287 @@ -194,84 +201,142 @@
   1.288  		EPanicTimeZoneNameIdNotSet,
   1.289  		/** This panic indicates that an out of range index was accessed.*/
   1.290  		EPanicRulesIndexOutofRange,
   1.291 -		/** This panic indicates that there are no rules present for this time zone.*/
   1.292 +		/** This panic indicates that there are no rules present for this time
   1.293 +			zone.*/
   1.294  		EPanicTimeNotCoveredByRules,
   1.295  		/** This panic indicates that the time zone rules are unusable.*/
   1.296  		EPanicBadTimeZoneRules,
   1.297 -		/** This panic indicates  that an unsupported time reference has been accessed.*/
   1.298 +		/** This panic indicates  that an unsupported time reference has been
   1.299 +			accessed.*/
   1.300  		EPanicUnsupportedTimeReference,
   1.301  		/** This panic indicates that the time zone ID is not supported.*/
   1.302  		EPanicUnsupportedTimeZoneNoId,
   1.303 -		/** This panic indicates that a request for notification is already pending from the client.*/
   1.304 +		/** This panic indicates that a request for notification is already
   1.305 +			pending from the client.*/
   1.306  		EPanicNotificationRequestPending,
   1.307 -		/** This panic indicates that an incorrect data has been sent to the server.*/
   1.308 -		EPanicInvalidArgument
   1.309 +		/** This panic indicates that an incorrect data has been sent to the
   1.310 +			server.*/
   1.311 +		EPanicInvalidArgument,
   1.312 +		/** This panic indicates that a table in the user-defined time zone
   1.313 +			database has not conformed to the declared schema. */
   1.314 +		EPanicBadSchema
   1.315  		};
   1.316  	
   1.317 +	/**
   1.318 +	The software install observer plugin can distinguish between changes to the
   1.319 +	resource files or the rules database.  This enumeration indicates the filter
   1.320 +	index that is used for the resource files and rules database filters.
   1.321 +	This enum should not be used externally.
   1.322 +	*/
   1.323 +	enum TSWIObserverFilterIndex
   1.324 +		{
   1.325 +		/** The index of the Tz private directory filter. */
   1.326 +		EFilterTzPrivate=0,
   1.327 +		/** The index of the resources filter. */
   1.328 +		EFilterResourceTimezonelocalization
   1.329 +		};
   1.330 +		
   1.331 +public:
   1.332  	/** 
   1.333 -	@internalComponent 
   1.334 +	This should not be used externally.
   1.335  	*/
   1.336  	IMPORT_C static void Panic(TPanic aPanic);
   1.337  	
   1.338  	/** 
   1.339 -	@internalTechnology
   1.340 +	This should not be used externally.
   1.341  	*/
   1.342  	IMPORT_C CTzId* GetTimeZoneIdL() const;
   1.343  	
   1.344  	/** 
   1.345 -	@internalTechnology
   1.346 +	This should not be used externally.
   1.347  	*/
   1.348  	IMPORT_C void SetTimeZoneL(CTzId& aZone) const;
   1.349  
   1.350  	IMPORT_C void Close();
   1.351 -	
   1.352  	IMPORT_C TInt Connect();
   1.353  
   1.354  	IMPORT_C ~RTz();
   1.355 -	
   1.356  	IMPORT_C RTz();
   1.357  	
   1.358  	IMPORT_C TInt ConvertToLocalTime(TTime& aTime) const;
   1.359 -	
   1.360  	IMPORT_C TInt ConvertToLocalTime(TTime& aTime, const CTzId& aZone) const;
   1.361 -
   1.362  	IMPORT_C TInt ConvertToUniversalTime(TTime& aTime) const;
   1.363 -	
   1.364  	IMPORT_C TInt ConvertToUniversalTime(TTime& aTime, const CTzId& aZone) const;
   1.365  	
   1.366 -	IMPORT_C void GetOffsetsForTimeZoneIdsL(const RArray<TInt>& aTzNumericIds, RArray<TInt>& aOffsets) const; 
   1.367 +	IMPORT_C void GetOffsetsForTimeZoneIdsL(const RArray<TInt>& aTzNumericIds,
   1.368 +		RArray<TInt>& aOffsets) const; 
   1.369  	
   1.370  	IMPORT_C TInt AutoUpdateSettingL();
   1.371 -	
   1.372      IMPORT_C void SetAutoUpdateBehaviorL(TTzAutoDSTUpdateModes aUpdateEnabled);
   1.373      
   1.374      // Methods for setting the system time.
   1.375      IMPORT_C TInt SetHomeTime(const TTime& aLocalTime) const;
   1.376  
   1.377      IMPORT_C TBool IsDaylightSavingOnL(CTzId& aZone) const;
   1.378 -    
   1.379      IMPORT_C TBool IsDaylightSavingOnL(CTzId& aZone, const TTime& aUTCTime) const;
   1.380  
   1.381   	// Get Encoded Rules for Current Local Time Zone
   1.382 -	IMPORT_C CTzRules* GetTimeZoneRulesL(const TTime& aStartTime, const TTime& aEndTime, TTzTimeReference aTimeRef) const;
   1.383 -	
   1.384 -	IMPORT_C CTzRules* GetTimeZoneRulesL(const CTzId& aZone, const TTime& aStartTime, const TTime& aEndTime, TTzTimeReference aTimeRef) const;
   1.385 +	IMPORT_C CTzRules* GetTimeZoneRulesL(const TTime& aStartTime,
   1.386 +		const TTime& aEndTime, TTzTimeReference aTimeRef) const;
   1.387 +	IMPORT_C CTzRules* GetTimeZoneRulesL(const CTzId& aZone,
   1.388 +		const TTime& aStartTime, const TTime& aEndTime,
   1.389 +		TTzTimeReference aTimeRef) const;
   1.390  	
   1.391  	void RegisterTzChangeNotifier(TRequestStatus& aStatus) const;
   1.392  	TInt CancelRequestForNotice() const;
   1.393  	TVersion Version() const;
   1.394  	
   1.395 -	IMPORT_C void NotifyHomeTimeZoneChangedL(const NTzUpdate::TTimeZoneChange& aChange) const;
   1.396 +	IMPORT_C void NotifyHomeTimeZoneChangedL(const NTzUpdate::TTimeZoneChange&
   1.397 +		aChange) const;
   1.398  	
   1.399 -	IMPORT_C void SetUnknownZoneTimeL(const TTime& aUTCTime, const TInt aUTCOffset);
   1.400 +	IMPORT_C void SetUnknownZoneTimeL(const TTime& aUTCTime,
   1.401 +		const TInt aUTCOffset);
   1.402 +	IMPORT_C void SetUnknownZoneTimeL(const TTime& aUTCTime,
   1.403 +		const TInt aUTCOffset, TBool aPersistInCenRep);
   1.404  	
   1.405 -	IMPORT_C void SetUnknownZoneTimeL(const TTime& aUTCTime, const TInt aUTCOffset, TBool aPersistInCenRep);
   1.406 +	IMPORT_C void LocalizationReadCitiesL(RPointerArray<CTzLocalizedCityRecord>&
   1.407 +		aCities);
   1.408 +	IMPORT_C void LocalizationReadCitiesL(RPointerArray<CTzLocalizedCityRecord>&
   1.409 +		aCities, TInt aTimeZoneId);
   1.410 +	IMPORT_C void LocalizationReadCitiesInGroupL(RPointerArray<CTzLocalizedCityRecord>&
   1.411 +		aCities, TUint8 aGroupId);
   1.412 +	IMPORT_C CTzLocalizedTimeZoneRecord* LocalizationReadFrequentlyUsedZoneL(
   1.413 +		TInt aFrequentlyUsedZone);
   1.414 +	IMPORT_C CTzLocalizedCityRecord* LocalizationReadCachedTimeZoneCityL(
   1.415 +		TInt aFrequentlyUsedZone);
   1.416 +	IMPORT_C void LocalizationCloseDbL();
   1.417 +	IMPORT_C void LocalizationOpenDbL();
   1.418 +	IMPORT_C void LocalizationWriteCityL(const TDesC& aCityName, TInt aCityTzId,
   1.419 +		TUint8 aCityGroupId, TUint aCityTzResourceId);
   1.420 +	IMPORT_C void LocalizationDeleteCityL(const TDesC& aCityName,
   1.421 +		TInt aCityTzId);
   1.422 +	IMPORT_C void LocalizationWriteFrequentlyUsedZoneL(const CTzLocalizedTimeZoneRecord&
   1.423 +		aTimeZone, const CTzLocalizedCityRecord& aCity,
   1.424 +		TInt aFrequentlyUsedZone);
   1.425 +	IMPORT_C void LocalizationWriteAllFrequentlyUsedZonesL(const RPointerArray<CTzLocalizedTimeZoneRecord>& aTimeZones,
   1.426 +		const RPointerArray<CTzLocalizedCityRecord>& aCities);
   1.427 +	
   1.428 +	// Debug only methods.
   1.429 +	IMPORT_C void SwiObsBeginL();
   1.430 +	IMPORT_C void SwiObsFileChangedL(TSWIObserverFilterIndex aType);
   1.431 +	IMPORT_C void SwiObsEndL();
   1.432  
   1.433 +	// Debug only methods.
   1.434  	IMPORT_C void __dbgClearCacheL(TBool aRestartCaching);
   1.435 +	IMPORT_C TInt __dbgRequestAllocatedCellsL(TInt aHeapSizeInBytes);
   1.436 +	IMPORT_C void __dbgSetHeapFailL(RAllocator::TAllocFail aType, TInt aRate);
   1.437 +	IMPORT_C void __dbgResetHeapL();
   1.438  
   1.439      TBool StartCachingL();
   1.440      TUint16 CurrentCachedTzId();
   1.441  
   1.442 +	// User-defined time zone access.
   1.443 +    CTzId* CreateUserTimeZoneL(const CTzRules& aTzUserRules, const CTzUserNames& aTzUserNames);
   1.444 +    CTzUserNames* GetUserTimeZoneNamesL(const CTzId& aTzId) const;
   1.445 +    void UpdateUserTimeZoneL(const CTzId& aTzId, const CTzRules& aTzUserRules, const CTzUserNames& aTzUserNames);
   1.446 +    void DeleteUserTimeZoneL(const CTzId& aTzId);
   1.447 +	void GetUserTimeZoneIdsL(RPointerArray<CTzId>& aTzIds) const;
   1.448 +	
   1.449  private:
   1.450  	static TInt StartServer();
   1.451  	TInt DoConnect();
   1.452 @@ -279,13 +344,16 @@
   1.453  					TTzTimeReference aTimerRef) const;
   1.454  	void doConvertL(TTime& aTime, 
   1.455  					TTzTimeReference aTimerRef) const;
   1.456 +					
   1.457 +	
   1.458 +
   1.459  private:
   1.460  	CTzRuleHolder* iRulesHolder;
   1.461  	};
   1.462  
   1.463 +
   1.464  /**
   1.465  Encapsulates a TTime and a TTzTimeReference.
   1.466 -Use, for example, for iCalendar's DTSTART.
   1.467  
   1.468  @publishedAll
   1.469  @released
   1.470 @@ -294,9 +362,11 @@
   1.471  	{
   1.472  public:
   1.473  	static inline TTimeWithReference Max();
   1.474 +
   1.475  	inline TTimeWithReference();
   1.476  	inline TTimeWithReference(TTime aTime, TTzTimeReference aTimeReference=ETzUtcTimeReference);
   1.477  	inline TTimeWithReference(TDateTime aTime, TTzTimeReference aTimeReference=ETzUtcTimeReference);
   1.478 +
   1.479  	inline bool operator==(const TTimeWithReference& aTime) const;
   1.480  	inline bool operator!=(const TTimeWithReference& aTime) const;
   1.481  
   1.482 @@ -304,19 +374,7 @@
   1.483  	TTzTimeReference iTimeReference;
   1.484  	};
   1.485  
   1.486 -/** Inequality operator.
   1.487  
   1.488 -@param aTZId The time zone ID to compare with this one.
   1.489 -@return True if the two IDs are different. False if they are the same.
   1.490 -*/
   1.491 -inline TBool CTzId::operator!=(const CTzId& aTZId) const
   1.492 -	{
   1.493 -	return (!operator==(aTZId));
   1.494 -	}
   1.495 -
   1.496 -//////////////////////////////////
   1.497 -// TTimeWithReference
   1.498 -//////////////////////////////////
   1.499  inline TTimeWithReference TTimeWithReference::Max()
   1.500  	{
   1.501  	return TTimeWithReference(
   1.502 @@ -324,24 +382,75 @@
   1.503  		ETzUtcTimeReference);
   1.504  	}
   1.505  
   1.506 +
   1.507  inline TTimeWithReference::TTimeWithReference() 
   1.508 -		: iTime(0), iTimeReference(ETzUtcTimeReference)
   1.509 +	: iTime(0), iTimeReference(ETzUtcTimeReference)
   1.510  	{
   1.511  	}
   1.512 +
   1.513 +
   1.514  inline TTimeWithReference::TTimeWithReference(TTime aTime, TTzTimeReference aTimeReference)
   1.515 -		: iTime(aTime), iTimeReference(aTimeReference)
   1.516 +	: iTime(aTime), iTimeReference(aTimeReference)
   1.517  	{
   1.518  	}
   1.519 +
   1.520 +
   1.521  inline TTimeWithReference::TTimeWithReference(TDateTime aTime, TTzTimeReference aTimeReference)
   1.522 -		: iTime(aTime), iTimeReference(aTimeReference)
   1.523 +	: iTime(aTime), iTimeReference(aTimeReference)
   1.524  	{
   1.525  	}
   1.526 +
   1.527 +
   1.528  inline bool TTimeWithReference::operator==(const TTimeWithReference& aTime) const
   1.529  	{
   1.530  	return(aTime.iTime == iTime && aTime.iTimeReference == iTimeReference);
   1.531  	}
   1.532 +
   1.533 +
   1.534  inline bool TTimeWithReference::operator!=(const TTimeWithReference& aTime) const
   1.535  	{
   1.536  	return(!(*this == aTime));
   1.537  	}
   1.538 +
   1.539 +#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
   1.540 +/**
   1.541 +The CTzUserData class allows the client to create, read, update or delete
   1.542 +user-defined time zones. 
   1.543 +
   1.544 +A user-defined time zone is comprised of time zone rules (encapsulated in a
   1.545 +CTzRules object) and time zone names (encapsulated in a CTzUserNames object).
   1.546 +
   1.547 +A time zone identifier (encapsulated in a CTzId object) is used to uniquely
   1.548 +identify a user-defined time zone.
   1.549 +
   1.550 +The CTzUserData class also allows the time zone identifiers for all existing
   1.551 +user-defined time zones to be determined. 
   1.552 +
   1.553 +@publishedPartner
   1.554 +@released
   1.555 +*/
   1.556 +class CTzUserData : public CBase
   1.557 +    {
   1.558 +public:
   1.559 +    IMPORT_C static CTzUserData* NewL(RTz& aTzServer);
   1.560 +    IMPORT_C ~CTzUserData();
   1.561 +
   1.562 +    IMPORT_C CTzId* CreateL(const CTzRules& aTzUserRules, const CTzUserNames&
   1.563 +    	aTzUserNames);
   1.564 +    IMPORT_C CTzRules* ReadRulesL(const CTzId& aTzId) const;
   1.565 +	IMPORT_C CTzUserNames* ReadNamesL(const CTzId& aTzId) const;
   1.566 +    IMPORT_C void UpdateL(const CTzId& aTzId, const CTzRules& aTzUserRules,
   1.567 +    	const CTzUserNames& aTzUserNames);
   1.568 +    IMPORT_C void DeleteL(const CTzId& aTzId);
   1.569 +    IMPORT_C void GetTzIdsL(RPointerArray<CTzId>& aTzIds) const;
   1.570 +
   1.571 +private:
   1.572 +    CTzUserData(RTz& aTzServer);
   1.573 +	
   1.574 +private:
   1.575 +    RTz& iTzServer;
   1.576 +	};
   1.577 +	
   1.578 +#endif // SYMBIAN_ENABLE_SPLIT_HEADERS
   1.579 +
   1.580  #endif