|
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 CESMRICalRuleSegment. |
|
15 * |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CESMRICALRULESEGMENT_H |
|
21 #define CESMRICALRULESEGMENT_H |
|
22 |
|
23 // System includes |
|
24 #include <e32base.h> // CBase |
|
25 |
|
26 // Forward class declarations |
|
27 class CESMRICalValue; |
|
28 |
|
29 /** |
|
30 Class representing a recurrence rule value segment. |
|
31 @publishedPartner |
|
32 */ |
|
33 class CESMRICalRuleSegment : public CBase |
|
34 { |
|
35 public: // Enumerations. |
|
36 enum TSegmentType |
|
37 { |
|
38 /** A frequency (FREQ) segment.*/ |
|
39 ESegFreq, |
|
40 /** An UNTIL segment.*/ |
|
41 ESegUntil, |
|
42 /** A COUNT segment.*/ |
|
43 ESegCount, |
|
44 /** An INTERVAL segment.*/ |
|
45 ESegInterval, |
|
46 /** A BYSECOND segment.*/ |
|
47 ESegBySecond, |
|
48 /** A BYMINUTE segment.*/ |
|
49 ESegByMinute, |
|
50 /** A BYHOUR segment.*/ |
|
51 ESegByHour, |
|
52 /** A BYDAY segment.*/ |
|
53 ESegByDay, |
|
54 /** A BYMONTHDAY segment.*/ |
|
55 ESegByMonthDay, |
|
56 /** A BYYEARDAY segment.*/ |
|
57 ESegByYearDay, |
|
58 /** A BYWEEKNO segment.*/ |
|
59 ESegByWeekNo, |
|
60 /** A BYMONTH segment.*/ |
|
61 ESegByMonth, |
|
62 /** A BYSETPOS segment.*/ |
|
63 ESegByPos, |
|
64 /** A WKST segment.*/ |
|
65 ESegWkSt, |
|
66 /** An X-name extension segment.*/ |
|
67 ESegExtension |
|
68 }; |
|
69 |
|
70 enum TFreq |
|
71 { |
|
72 /** Frequency in seconds.*/ |
|
73 EFreqSecondly, |
|
74 /** Frequency in minutes.*/ |
|
75 EFreqMinutely, |
|
76 /** Frequency in hours.*/ |
|
77 EFreqHourly, |
|
78 /** Frequency in days.*/ |
|
79 EFreqDaily, |
|
80 /** Frequency in weeks.*/ |
|
81 EFreqWeekly, |
|
82 /** Frequency in months.*/ |
|
83 EFreqMonthly, |
|
84 /** Frequency in years.*/ |
|
85 EFreqYearly |
|
86 }; |
|
87 |
|
88 public: // Construction/destruction. |
|
89 static CESMRICalRuleSegment* NewL(const TDesC& aSource); |
|
90 static CESMRICalRuleSegment* NewLC(const TDesC& aSource); |
|
91 ~CESMRICalRuleSegment(); |
|
92 |
|
93 public: // Methods. |
|
94 IMPORT_C const TDesC& TypeName() const; |
|
95 IMPORT_C const RPointerArray<CESMRICalValue>& Values() const; |
|
96 IMPORT_C TSegmentType Type() const; |
|
97 IMPORT_C TFreq FreqL() const; |
|
98 |
|
99 private: // Construction. |
|
100 CESMRICalRuleSegment(); |
|
101 void ConstructL(const TDesC& aSource); |
|
102 void SetTypeL(const TDesC& aType); |
|
103 |
|
104 private: // Attributes. |
|
105 TSegmentType iType; |
|
106 HBufC* iTypeString; |
|
107 RPointerArray<CESMRICalValue> iValues; |
|
108 }; |
|
109 |
|
110 #endif // CESMRICALRULESEGMENT_H |
|
111 |
|
112 // End of File |