|
1 /* |
|
2 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Holds the definition of CESMRICalValue. |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CESMRICALVALUE_H |
|
21 #define CESMRICALVALUE_H |
|
22 |
|
23 |
|
24 // System includes. |
|
25 #include <e32base.h> // CBase |
|
26 |
|
27 // Forward declarations. |
|
28 class CESMRICalRuleSegment; |
|
29 |
|
30 /** |
|
31 Class representing a property-, property parameter- or rule segement value. |
|
32 @publishedPartner |
|
33 */ |
|
34 class CESMRICalValue : public CBase |
|
35 { |
|
36 public: // Enumerations. |
|
37 enum TTimeZoneType |
|
38 { |
|
39 /** Local "floating" time.*/ |
|
40 EFloatingTime, |
|
41 /** UTC time.*/ |
|
42 EUtcTime, |
|
43 /** User specified time zone.*/ |
|
44 ESpecifiedTimeZone |
|
45 }; |
|
46 |
|
47 public: // Construction/destruction. |
|
48 IMPORT_C static CESMRICalValue* NewL(); |
|
49 IMPORT_C static CESMRICalValue* NewLC(); |
|
50 ~CESMRICalValue(); |
|
51 |
|
52 public: // Methods. |
|
53 IMPORT_C HBufC8* BinaryLC() const; |
|
54 IMPORT_C void SetBinaryL(const TDesC8& aBuffer); |
|
55 IMPORT_C TBool BooleanL() const; |
|
56 IMPORT_C void SetBooleanL(TBool aBool); |
|
57 IMPORT_C void GetDateL(TTime& aDate) const; |
|
58 IMPORT_C void SetDateL(const TTime& aDate); |
|
59 IMPORT_C void GetTimeL(TTime& aTime, TTimeZoneType& aTzType) const; |
|
60 IMPORT_C void SetTimeL(const TTime& aTime, TTimeZoneType aTzType); |
|
61 IMPORT_C void GetDateTimeL(TTime& aDateTime, TTimeZoneType& aTzType, TInt aFirstCharacterNum = 0) const; |
|
62 IMPORT_C void SetDateTimeL(const TTime& aDateTime, TTimeZoneType aTzType); |
|
63 IMPORT_C TTimeIntervalSeconds DurationL() const; |
|
64 IMPORT_C void SetDurationL(TTimeIntervalSeconds aDuration); |
|
65 IMPORT_C void GetFloatL(TReal& aFloat) const; |
|
66 IMPORT_C void SetFloatL(const TReal& aFloat); |
|
67 IMPORT_C TInt IntegerL() const; |
|
68 IMPORT_C void SetIntegerL(TInt aInt); |
|
69 |
|
70 IMPORT_C void GetPeriodL( |
|
71 TTime& aStartTime, |
|
72 TTimeZoneType& aStartTzType, |
|
73 TTime& aEndTime, |
|
74 TTimeZoneType& aEndTzType) const; |
|
75 |
|
76 IMPORT_C void SetPeriodL( |
|
77 const TTime& aStartTime, |
|
78 TTimeZoneType aStartTzType, |
|
79 const TTime& aEndTime, |
|
80 TTimeZoneType aEndTzType); |
|
81 |
|
82 IMPORT_C void GetDayL(TDay& aDay, TInt& aPos) const; |
|
83 IMPORT_C void SetDayL(TDay aDay, TInt aPos = 0); |
|
84 IMPORT_C TMonth MonthL() const; |
|
85 IMPORT_C void SetMonthL(TMonth aMonth); |
|
86 IMPORT_C void GetRecurrenceRuleL(RPointerArray<CESMRICalRuleSegment>& aRuleSegmentArray) const; |
|
87 IMPORT_C void SetRecurrenceRuleL(const TDesC& aRuleValue); |
|
88 IMPORT_C const TDesC& TextL() const; |
|
89 IMPORT_C void SetTextL(const TDesC& aText); |
|
90 IMPORT_C TTimeIntervalSeconds UtcOffsetL() const; |
|
91 IMPORT_C void SetUtcOffsetL(TTimeIntervalSeconds aOffset); |
|
92 |
|
93 private: // Construction. |
|
94 CESMRICalValue(); |
|
95 void ConstructL(); |
|
96 |
|
97 private: // Methods. |
|
98 void CheckNullValueL() const; |
|
99 void PrepareValuePointer(); |
|
100 TInt ReadIntL(const TDesC& aDes) const; |
|
101 void AppendDateToValueL(const TTime& aDate); |
|
102 void GetDateFromValueL(TTime& aDate, TInt aFirstCharacterNum = 0) const; |
|
103 void AppendTimeToValueL(const TTime& aTime); |
|
104 void GetTimeFromValueL(TTime& aTime, TTimeZoneType& aTzType, TInt aFirstCharacterNum = 0) const; |
|
105 void GetTimeIntervalFromValueL(TTimeIntervalSeconds& aTime, TInt aFirstCharacterNum = 0) const; |
|
106 TBool GetDurDateL(TInt& aIntervalSecs, TInt& aCurrentCharNumber) const; |
|
107 TBool GetDurTimeL(TInt& aIntervalSecs, TInt& aCurrentCharNumber) const; |
|
108 TBool GetDurHourL(TInt& aIntervalSecs, TInt& aCurrentCharNumber) const; |
|
109 TBool GetDurMinuteL(TInt& aIntervalSecs, TInt& aCurrentCharNumber) const; |
|
110 TBool GetDurSecondL(TInt& aIntervalSecs, TInt& aCurrentCharNumber) const; |
|
111 TBool GetDurWeekL(TInt& aIntervalSecs, TInt& aCurrentCharNumber) const; |
|
112 |
|
113 private: // Attributes. |
|
114 HBufC* iValue; |
|
115 }; |
|
116 |
|
117 #endif // CESMRICALVALUE_H |
|
118 |
|
119 // End of File |