pimappservices/calendar/inc/caltime.h
changeset 0 f979ecb2b13e
equal deleted inserted replaced
-1:000000000000 0:f979ecb2b13e
       
     1 // Copyright (c) 2005-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 __CALTIME_H__
       
    17 #define __CALTIME_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 
       
    21 /** Represents a date/time, as used in the Calendar API.
       
    22 
       
    23 This stores a single TTime, which may be set in UTC or local or floating local 
       
    24 time, and can be retrieved in either UTC or system local time.
       
    25 
       
    26 There are references to null time throughout the Interim API - this means Time::NullTTime().
       
    27 
       
    28 @publishedAll
       
    29 @released
       
    30 */
       
    31 NONSHARABLE_CLASS(TCalTime)
       
    32 	{
       
    33 public:
       
    34 
       
    35 	/** The time mode for a calendar time
       
    36 	@publishedAll
       
    37 	@released
       
    38 	*/
       
    39 	enum TTimeMode
       
    40 		{
       
    41 		/** Floating time. */
       
    42 		EFloating,
       
    43 		/** Fixed time in UTC format. */
       
    44 		EFixedUtc,
       
    45 		/** Fixed time in local time with time zone reference format. */
       
    46 		EFixedTimeZone
       
    47 		};
       
    48 
       
    49 public:
       
    50 	IMPORT_C TCalTime();
       
    51 	
       
    52 	IMPORT_C void SetTimeLocalFloatingL(const TTime& aLocalTime);
       
    53 	IMPORT_C void SetTimeUtcL(const TTime& aUtcTime);
       
    54 	IMPORT_C void SetTimeLocalL(const TTime& aLocalTime);
       
    55 	IMPORT_C TTimeMode TimeMode() const; 
       
    56 	IMPORT_C TTime TimeUtcL() const;
       
    57 	IMPORT_C TTime TimeLocalL() const;
       
    58 	
       
    59 	IMPORT_C static TTime MaxTime();
       
    60 	IMPORT_C static TTime MinTime();
       
    61 private:
       
    62 	TTime	iTime;
       
    63 	TUint8	iTimeMode;  
       
    64 	TInt8	iReserved1;
       
    65 	TInt16 	iReserved2;
       
    66 	};
       
    67 	
       
    68 #endif // __CALTIME_H__