|
1 #ifndef ICALRULESEGMENT_H |
|
2 #define ICALRULESEGMENT_H/* |
|
3 * Copyright (c) 2005 Nokia Corporation and/or its subsidiary(-ies). |
|
4 * All rights reserved. |
|
5 * This component and the accompanying materials are made available |
|
6 * under the terms of "Eclipse Public License v1.0" |
|
7 * which accompanies this distribution, and is available |
|
8 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
9 * |
|
10 * Initial Contributors: |
|
11 * Nokia Corporation - initial contribution. |
|
12 * |
|
13 * Contributors: |
|
14 * |
|
15 * Description: Holds the definition of CICalRuleSegment. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 |
|
21 // System includes |
|
22 #include <e32base.h> // CBase |
|
23 |
|
24 // Forward class declarations |
|
25 class CICalValue; |
|
26 |
|
27 /** |
|
28 Class representing a recurrence rule value segment. |
|
29 @publishedPartner |
|
30 */ |
|
31 class CICalRuleSegment : public CBase |
|
32 { |
|
33 public: // Enumerations. |
|
34 enum TSegmentType |
|
35 { |
|
36 /** A frequency (FREQ) segment.*/ |
|
37 ESegFreq, |
|
38 /** An UNTIL segment.*/ |
|
39 ESegUntil, |
|
40 /** A COUNT segment.*/ |
|
41 ESegCount, |
|
42 /** An INTERVAL segment.*/ |
|
43 ESegInterval, |
|
44 /** A BYSECOND segment.*/ |
|
45 ESegBySecond, |
|
46 /** A BYMINUTE segment.*/ |
|
47 ESegByMinute, |
|
48 /** A BYHOUR segment.*/ |
|
49 ESegByHour, |
|
50 /** A BYDAY segment.*/ |
|
51 ESegByDay, |
|
52 /** A BYMONTHDAY segment.*/ |
|
53 ESegByMonthDay, |
|
54 /** A BYYEARDAY segment.*/ |
|
55 ESegByYearDay, |
|
56 /** A BYWEEKNO segment.*/ |
|
57 ESegByWeekNo, |
|
58 /** A BYMONTH segment.*/ |
|
59 ESegByMonth, |
|
60 /** A BYSETPOS segment.*/ |
|
61 ESegByPos, |
|
62 /** A WKST segment.*/ |
|
63 ESegWkSt, |
|
64 /** An X-name extension segment.*/ |
|
65 ESegExtension |
|
66 }; |
|
67 |
|
68 enum TFreq |
|
69 { |
|
70 /** Frequency in seconds.*/ |
|
71 EFreqSecondly, |
|
72 /** Frequency in minutes.*/ |
|
73 EFreqMinutely, |
|
74 /** Frequency in hours.*/ |
|
75 EFreqHourly, |
|
76 /** Frequency in days.*/ |
|
77 EFreqDaily, |
|
78 /** Frequency in weeks.*/ |
|
79 EFreqWeekly, |
|
80 /** Frequency in months.*/ |
|
81 EFreqMonthly, |
|
82 /** Frequency in years.*/ |
|
83 EFreqYearly |
|
84 }; |
|
85 |
|
86 public: // Construction/destruction. |
|
87 static CICalRuleSegment* NewL(const TDesC& aSource); |
|
88 static CICalRuleSegment* NewLC(const TDesC& aSource); |
|
89 ~CICalRuleSegment(); |
|
90 |
|
91 public: // Methods. |
|
92 IMPORT_C const TDesC& TypeName() const; |
|
93 IMPORT_C const RPointerArray<CICalValue>& Values() const; |
|
94 IMPORT_C TSegmentType Type() const; |
|
95 IMPORT_C TFreq FreqL() const; |
|
96 |
|
97 private: // Construction. |
|
98 CICalRuleSegment(); |
|
99 void ConstructL(const TDesC& aSource); |
|
100 void SetTypeL(const TDesC& aType); |
|
101 |
|
102 private: // Attributes. |
|
103 TSegmentType iType; |
|
104 HBufC* iTypeString; |
|
105 RPointerArray<CICalValue> iValues; |
|
106 }; |
|
107 |
|
108 #endif // ICALRULESEGMENT_H |
|
109 |
|
110 // End of File |