|
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 __CALCOMMON_H__ |
|
17 #define __CALCOMMON_H__ |
|
18 |
|
19 #include <caltime.h> |
|
20 |
|
21 /** This system-wide #define is for version 2 of the Calendar component. |
|
22 V1 is the CalInterimAPI. V2 is the refactored Calendar component which includes |
|
23 support for Attachments, GEO, TRANSP, instance iterator, extended text searching. |
|
24 @publishedAll |
|
25 @released |
|
26 */ |
|
27 #define SYMBIAN_CALENDAR_V2 |
|
28 |
|
29 /** Calendar local entry ID. |
|
30 This entry ID is assigned by the calendar server when an entry is created. |
|
31 It will remain unchanged for the lifetime of that entry. |
|
32 @publishedAll |
|
33 @released |
|
34 */ |
|
35 typedef TUint32 TCalLocalUid; |
|
36 |
|
37 /** Calendar file ID. |
|
38 @publishedAll |
|
39 @released |
|
40 */ |
|
41 typedef TInt64 TCalFileId; |
|
42 |
|
43 /** Calendar Collection ID. |
|
44 It identifies the same file as TCalFileId does |
|
45 @publishedAll |
|
46 @released |
|
47 */ |
|
48 typedef TUint8 TCalCollectionId; |
|
49 |
|
50 /** Calendar NULL file ID. |
|
51 The file ID will be set to KNullFileId if the file is not opened. |
|
52 @publishedAll |
|
53 @released |
|
54 */ |
|
55 const TCalFileId KNullFileId = 0; |
|
56 |
|
57 /** Utility class containing common calendar-related enums. |
|
58 |
|
59 @publishedAll |
|
60 @released |
|
61 */ |
|
62 |
|
63 |
|
64 |
|
65 class CalCommon |
|
66 { |
|
67 public: |
|
68 |
|
69 /** Entry filter used in the entry view and instance view, filter flags are defined by TCalViewFilterFlags |
|
70 @publishedAll |
|
71 @released |
|
72 */ |
|
73 typedef TUint TCalViewFilter; |
|
74 |
|
75 /** Entry filter flags used in the entry view and instance view. |
|
76 @publishedAll |
|
77 @released |
|
78 */ |
|
79 enum TCalViewFilterFlags |
|
80 { |
|
81 /** Include appointments. */ |
|
82 EIncludeAppts=0x01, |
|
83 /** Include reminders. */ |
|
84 EIncludeReminder=0x02, |
|
85 /** Include all-day events. */ |
|
86 EIncludeEvents=0x04, |
|
87 /** Include anniversaries. */ |
|
88 EIncludeAnnivs=0x08, |
|
89 /** Include completed todos. */ |
|
90 EIncludeCompletedTodos=0x10, |
|
91 /** Include incompleted todos. */ |
|
92 EIncludeIncompletedTodos=0x20, |
|
93 /** Remove non-alarmed entries. This flag cannot be used by itself. */ |
|
94 EIncludeAlarmedOnly=0x40, |
|
95 /** Include next only instance of a repeat entry. */ |
|
96 EIncludeRptsNextInstanceOnly=0x80, |
|
97 |
|
98 /** By default all instances which overlap the time range are found. Use the EInstanceStartTimeWithinRange |
|
99 flag to only include instances whose start time is inside the search time range. |
|
100 |
|
101 Note that setting both the EInstanceStartTimeWithinRange and EInstanceEndTimeWithinRange flags will |
|
102 only include instances which are completely within the search time range. */ |
|
103 EInstanceStartTimeWithinRange=0x100, |
|
104 |
|
105 /** By default all instances which overlap the time range are found. Use the EInstanceEndTimeWithinRange |
|
106 flag to only include instances whose end time is inside the search time range. |
|
107 |
|
108 Note that setting both the EInstanceStartTimeWithinRange and EInstanceEndTimeWithinRange flags will |
|
109 only include instances which are completely within the search time range. |
|
110 */ |
|
111 EInstanceEndTimeWithinRange=0x200, |
|
112 |
|
113 /** By default all instances which adjoin the search range are found. Use the EExcludeInstanceAdjoiningRange |
|
114 flag to exclude instances that are outside, but adjoin the search range. |
|
115 |
|
116 Instances that are outside, but adjoin the search start or end time are excluded. |
|
117 Instances that both start and end on the search start time are included. |
|
118 Instances that both start and end on the search end time are excluded. |
|
119 */ |
|
120 EExcludeInstanceAdjoiningRange=0x400, |
|
121 |
|
122 /** Include all entries (appointments, day events, reminders, anniversaries and todos). */ |
|
123 EIncludeAll=EIncludeAppts|EIncludeReminder|EIncludeEvents|EIncludeAnnivs| |
|
124 EIncludeCompletedTodos|EIncludeIncompletedTodos, |
|
125 }; |
|
126 |
|
127 /** The range of instances referred to in a recurrence ID or instance view. |
|
128 @publishedAll |
|
129 @released |
|
130 */ |
|
131 enum TRecurrenceRange |
|
132 { |
|
133 /** Only this instance is referenced. |
|
134 If the user set EThisOnly when a repeating child entry is created and stored to the file, only the parent instance |
|
135 referred to by the child's recurrence ID will be replaced. */ |
|
136 EThisOnly, |
|
137 /** This and all other instances are referenced. */ |
|
138 EThisAndAll, |
|
139 /** This and all future instances are referenced. */ |
|
140 EThisAndFuture, |
|
141 /** This and all previous instances are referenced. */ |
|
142 EThisAndPrior |
|
143 }; |
|
144 |
|
145 |
|
146 /** Search filter for use in the CCalInstanceView::FindInstanceL() function. |
|
147 Note that a folded text search is used if exact text search is not specified. |
|
148 The summary text field is always searched. It is possible to specify additional text fields to be |
|
149 searched as well. |
|
150 @publishedAll |
|
151 @released |
|
152 */ |
|
153 enum TCalSearchBehaviour |
|
154 { |
|
155 /** Search for folded text. */ |
|
156 EFoldedTextSearch=0x0, |
|
157 |
|
158 /** Search for the exact text. */ |
|
159 EExactTextSearch=0x1, |
|
160 |
|
161 /** Search location during a text search. |
|
162 @publishedPartner |
|
163 @released |
|
164 */ |
|
165 ESearchEntryLocation=0x2, |
|
166 |
|
167 /** Search description during a text search. |
|
168 @publishedPartner |
|
169 @released |
|
170 */ |
|
171 ESearchEntryDescription=0x4, |
|
172 |
|
173 /** Search attendee addresses during a text search. |
|
174 @publishedPartner |
|
175 @released |
|
176 */ |
|
177 ESearchAttendeeAddress=0x8, |
|
178 |
|
179 /** Search attendee sent by addresses during a text search. |
|
180 @publishedPartner |
|
181 @released |
|
182 */ |
|
183 ESearchAttendeeSentByAddress=0x10, |
|
184 |
|
185 /** Search attendee common names during a text search. |
|
186 @publishedPartner |
|
187 @released |
|
188 */ |
|
189 ESearchAttendeeCommonName=0x20, |
|
190 |
|
191 /** Search organizer's address during a text search. |
|
192 @publishedPartner |
|
193 @released |
|
194 */ |
|
195 ESearchOrganizerAddress=0x40, |
|
196 |
|
197 /** Search organizer's sent by address during a text search. |
|
198 @publishedPartner |
|
199 @released |
|
200 */ |
|
201 ESearchOrganizerSentByAddress=0x80, |
|
202 |
|
203 /** Search organizer's common name during a text search. |
|
204 @publishedPartner |
|
205 @released |
|
206 */ |
|
207 ESearchOrganizerCommonName=0x100, |
|
208 |
|
209 /** Include all possible text fields during a text search. */ |
|
210 ESearchAllTextFields=ESearchEntryLocation|ESearchEntryDescription| |
|
211 ESearchAttendeeAddress|ESearchAttendeeSentByAddress|ESearchAttendeeCommonName| |
|
212 ESearchOrganizerAddress|ESearchOrganizerSentByAddress|ESearchOrganizerCommonName, |
|
213 }; |
|
214 |
|
215 /** Class to implement a time range in the Instance view and Entry view. |
|
216 @publishedAll |
|
217 @released |
|
218 */ |
|
219 class TCalTimeRange |
|
220 { |
|
221 public: |
|
222 IMPORT_C TCalTimeRange(TCalTime aStartTime, TCalTime aEndTime); |
|
223 |
|
224 IMPORT_C TCalTime StartTime() const; |
|
225 IMPORT_C TCalTime EndTime() const; |
|
226 |
|
227 private: |
|
228 TCalTime iStartTime; |
|
229 TCalTime iEndTime; |
|
230 }; |
|
231 |
|
232 /** Enumeration returned when opening a file to indicate whether the file is the current version, |
|
233 needs converting, or is unsupported. |
|
234 @publishedPartner |
|
235 @released |
|
236 */ |
|
237 enum TCalFileVersionSupport |
|
238 { |
|
239 /** The file is the current version and can be loaded immediately. */ |
|
240 EFileIsCurrentVersion, |
|
241 /** The file is an older version and will be converted when it is used. */ |
|
242 EFileNeedsConverting, |
|
243 /** The file is an old version that is not supported. */ |
|
244 EUnsupportedFileVersion |
|
245 }; |
|
246 |
|
247 /** Class to implement a priority range. This is used to set a priority range when using |
|
248 CCalFindInstanceSettings. |
|
249 @publishedAll |
|
250 @prototype |
|
251 */ |
|
252 class TCalPriorityRange |
|
253 { |
|
254 public: |
|
255 IMPORT_C TCalPriorityRange(); |
|
256 IMPORT_C TCalPriorityRange(TUint aHighestPriority, TUint aLowestPriority); |
|
257 |
|
258 IMPORT_C TUint LowestPriority() const; |
|
259 IMPORT_C TUint HighestPriority() const; |
|
260 |
|
261 private: |
|
262 TUint iHighestPriority; |
|
263 TUint iLowestPriority; |
|
264 }; |
|
265 |
|
266 /** Enumeration to define the sort-able attributes that can be sorted on in the |
|
267 * instance view |
|
268 @publishedAll |
|
269 @prototype |
|
270 */ |
|
271 enum TCalSortAttribute |
|
272 { |
|
273 ESortAttrStartTime, |
|
274 ESortAttrEndTime, |
|
275 ESortAttrLastModified, |
|
276 ESortAttrPriority, |
|
277 ESortAttrType |
|
278 }; |
|
279 |
|
280 /** Enumeration to define the sort directions that can be used in sort criteria, |
|
281 @publishedAll |
|
282 @prototype |
|
283 */ |
|
284 enum TCalSortDirection |
|
285 { |
|
286 /** Sort by ascending order */ |
|
287 EAscendingOrder, |
|
288 /** Sort by descending order */ |
|
289 EDescendingOrder |
|
290 }; |
|
291 |
|
292 }; |
|
293 #endif // __CALCOMMON_H__ |