williamr@2: // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: #ifndef __CALTIME_H__ williamr@2: #define __CALTIME_H__ williamr@2: williamr@2: #include williamr@2: williamr@2: /** Represents a date/time, as used in the Calendar API. williamr@2: williamr@2: This stores a single TTime, which may be set in UTC or local or floating local williamr@2: time, and can be retrieved in either UTC or system local time. williamr@2: williamr@2: There are references to null time throughout the Interim API - this means Time::NullTTime(). williamr@2: williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: NONSHARABLE_CLASS(TCalTime) williamr@2: { williamr@2: public: williamr@2: williamr@2: /** The time mode for a calendar time williamr@2: @publishedAll williamr@2: @released williamr@2: */ williamr@2: enum TTimeMode williamr@2: { williamr@2: /** Floating time. */ williamr@2: EFloating, williamr@2: /** Fixed time in UTC format. */ williamr@2: EFixedUtc, williamr@2: /** Fixed time in local time with time zone reference format. */ williamr@2: EFixedTimeZone williamr@2: }; williamr@2: williamr@2: public: williamr@2: IMPORT_C TCalTime(); williamr@2: williamr@2: IMPORT_C void SetTimeLocalFloatingL(const TTime& aLocalTime); williamr@2: IMPORT_C void SetTimeUtcL(const TTime& aUtcTime); williamr@2: IMPORT_C void SetTimeLocalL(const TTime& aLocalTime); williamr@2: IMPORT_C TTimeMode TimeMode() const; williamr@2: IMPORT_C TTime TimeUtcL() const; williamr@2: IMPORT_C TTime TimeLocalL() const; williamr@2: williamr@2: IMPORT_C static TTime MaxTime(); williamr@2: IMPORT_C static TTime MinTime(); williamr@2: private: williamr@2: TTime iTime; williamr@2: TUint8 iTimeMode; williamr@2: TInt8 iReserved1; williamr@2: TInt16 iReserved2; williamr@2: }; williamr@2: williamr@2: #endif // __CALTIME_H__