williamr@2
|
1 |
// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@2
|
4 |
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@2
|
6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
#ifndef __CALCOMMON_H__
|
williamr@2
|
17 |
#define __CALCOMMON_H__
|
williamr@2
|
18 |
|
williamr@2
|
19 |
#include <caltime.h>
|
williamr@2
|
20 |
|
williamr@2
|
21 |
/** This system-wide #define is for version 2 of the Calendar component.
|
williamr@2
|
22 |
V1 is the CalInterimAPI. V2 is the refactored Calendar component which includes
|
williamr@2
|
23 |
support for Attachments, GEO, TRANSP, instance iterator, extended text searching.
|
williamr@2
|
24 |
@publishedAll
|
williamr@2
|
25 |
@released
|
williamr@2
|
26 |
*/
|
williamr@2
|
27 |
#define SYMBIAN_CALENDAR_V2
|
williamr@2
|
28 |
|
williamr@2
|
29 |
/** Calendar local entry ID.
|
williamr@2
|
30 |
This entry ID is assigned by the calendar server when an entry is created.
|
williamr@2
|
31 |
It will remain unchanged for the lifetime of that entry.
|
williamr@2
|
32 |
@publishedAll
|
williamr@2
|
33 |
@released
|
williamr@2
|
34 |
*/
|
williamr@2
|
35 |
typedef TUint32 TCalLocalUid;
|
williamr@2
|
36 |
|
williamr@2
|
37 |
/** Calendar file ID.
|
williamr@2
|
38 |
@publishedAll
|
williamr@2
|
39 |
@released
|
williamr@2
|
40 |
*/
|
williamr@2
|
41 |
typedef TInt64 TCalFileId;
|
williamr@2
|
42 |
|
williamr@2
|
43 |
/** Utility class containing common calendar-related enums.
|
williamr@2
|
44 |
|
williamr@2
|
45 |
@publishedAll
|
williamr@2
|
46 |
@released
|
williamr@2
|
47 |
*/
|
williamr@2
|
48 |
class CalCommon
|
williamr@2
|
49 |
{
|
williamr@2
|
50 |
public:
|
williamr@2
|
51 |
|
williamr@2
|
52 |
/** Entry filter used in the entry view and instance view, filter flags are defined by TCalViewFilterFlags
|
williamr@2
|
53 |
@publishedAll
|
williamr@2
|
54 |
@released
|
williamr@2
|
55 |
*/
|
williamr@2
|
56 |
typedef TUint TCalViewFilter;
|
williamr@2
|
57 |
|
williamr@2
|
58 |
/** Entry filter flags used in the entry view and instance view.
|
williamr@2
|
59 |
@publishedAll
|
williamr@2
|
60 |
@released
|
williamr@2
|
61 |
*/
|
williamr@2
|
62 |
enum TCalViewFilterFlags
|
williamr@2
|
63 |
{
|
williamr@2
|
64 |
/** Include appointments. */
|
williamr@2
|
65 |
EIncludeAppts=0x01,
|
williamr@2
|
66 |
/** Include reminders. */
|
williamr@2
|
67 |
EIncludeReminder=0x02,
|
williamr@2
|
68 |
/** Include all-day events. */
|
williamr@2
|
69 |
EIncludeEvents=0x04,
|
williamr@2
|
70 |
/** Include anniversaries. */
|
williamr@2
|
71 |
EIncludeAnnivs=0x08,
|
williamr@2
|
72 |
/** Include completed todos. */
|
williamr@2
|
73 |
EIncludeCompletedTodos=0x10,
|
williamr@2
|
74 |
/** Include incompleted todos. */
|
williamr@2
|
75 |
EIncludeIncompletedTodos=0x20,
|
williamr@2
|
76 |
/** Remove non-alarmed entries. This flag cannot be used by itself. */
|
williamr@2
|
77 |
EIncludeAlarmedOnly=0x40,
|
williamr@2
|
78 |
/** Include next only instance of a repeat entry. */
|
williamr@2
|
79 |
EIncludeRptsNextInstanceOnly=0x80,
|
williamr@2
|
80 |
|
williamr@2
|
81 |
/** By default all instances which overlap the time range are found. Use the EInstanceStartTimeWithinRange
|
williamr@2
|
82 |
flag to only include instances whose start time is inside the search time range.
|
williamr@2
|
83 |
|
williamr@2
|
84 |
Note that setting both the EInstanceStartTimeWithinRange and EInstanceEndTimeWithinRange flags will
|
williamr@2
|
85 |
only include instances which are completely within the search time range. */
|
williamr@2
|
86 |
EInstanceStartTimeWithinRange=0x100,
|
williamr@2
|
87 |
|
williamr@2
|
88 |
/** By default all instances which overlap the time range are found. Use the EInstanceEndTimeWithinRange
|
williamr@2
|
89 |
flag to only include instances whose end time is inside the search time range.
|
williamr@2
|
90 |
|
williamr@2
|
91 |
Note that setting both the EInstanceStartTimeWithinRange and EInstanceEndTimeWithinRange flags will
|
williamr@2
|
92 |
only include instances which are completely within the search time range.
|
williamr@2
|
93 |
*/
|
williamr@2
|
94 |
EInstanceEndTimeWithinRange=0x200,
|
williamr@2
|
95 |
|
williamr@2
|
96 |
/** By default all instances which adjoin the search range are found. Use the EExcludeInstanceAdjoiningRange
|
williamr@2
|
97 |
flag to exclude instances that are outside, but adjoin the search range.
|
williamr@2
|
98 |
|
williamr@2
|
99 |
Instances that are outside, but adjoin the search start or end time are excluded.
|
williamr@2
|
100 |
Instances that both start and end on the search start time are included.
|
williamr@2
|
101 |
Instances that both start and end on the search end time are excluded.
|
williamr@2
|
102 |
*/
|
williamr@2
|
103 |
EExcludeInstanceAdjoiningRange=0x400,
|
williamr@2
|
104 |
|
williamr@2
|
105 |
/** Include all entries (appointments, day events, reminders, anniversaries and todos). */
|
williamr@2
|
106 |
EIncludeAll=EIncludeAppts|EIncludeReminder|EIncludeEvents|EIncludeAnnivs|
|
williamr@2
|
107 |
EIncludeCompletedTodos|EIncludeIncompletedTodos,
|
williamr@2
|
108 |
};
|
williamr@2
|
109 |
|
williamr@2
|
110 |
/** The range of instances referred to in a recurrence ID or instance view.
|
williamr@2
|
111 |
@publishedAll
|
williamr@2
|
112 |
@released
|
williamr@2
|
113 |
*/
|
williamr@2
|
114 |
enum TRecurrenceRange
|
williamr@2
|
115 |
{
|
williamr@2
|
116 |
/** Only this instance is referenced.
|
williamr@2
|
117 |
If the user set EThisOnly when a repeating child entry is created and stored to the file, only the parent instance
|
williamr@2
|
118 |
referred to by the child's recurrence ID will be replaced. */
|
williamr@2
|
119 |
EThisOnly,
|
williamr@2
|
120 |
/** This and all other instances are referenced. */
|
williamr@2
|
121 |
EThisAndAll,
|
williamr@2
|
122 |
/** This and all future instances are referenced. */
|
williamr@2
|
123 |
EThisAndFuture,
|
williamr@2
|
124 |
/** This and all previous instances are referenced. */
|
williamr@2
|
125 |
EThisAndPrior
|
williamr@2
|
126 |
};
|
williamr@2
|
127 |
|
williamr@2
|
128 |
|
williamr@2
|
129 |
/** Search filter for use in the CCalInstanceView::FindInstanceL() function.
|
williamr@2
|
130 |
Note that a folded text search is used if exact text search is not specified.
|
williamr@2
|
131 |
The summary text field is always searched. It is possible to specify additional text fields to be
|
williamr@2
|
132 |
searched as well.
|
williamr@2
|
133 |
@publishedAll
|
williamr@2
|
134 |
@released
|
williamr@2
|
135 |
*/
|
williamr@2
|
136 |
enum TCalSearchBehaviour
|
williamr@2
|
137 |
{
|
williamr@2
|
138 |
/** Search for folded text. */
|
williamr@2
|
139 |
EFoldedTextSearch=0x0,
|
williamr@2
|
140 |
|
williamr@2
|
141 |
/** Search for the exact text. */
|
williamr@2
|
142 |
EExactTextSearch=0x1,
|
williamr@2
|
143 |
|
williamr@2
|
144 |
/** Search location during a text search.
|
williamr@2
|
145 |
@publishedPartner
|
williamr@2
|
146 |
@released
|
williamr@2
|
147 |
*/
|
williamr@2
|
148 |
ESearchEntryLocation=0x2,
|
williamr@2
|
149 |
|
williamr@2
|
150 |
/** Search description during a text search.
|
williamr@2
|
151 |
@publishedPartner
|
williamr@2
|
152 |
@released
|
williamr@2
|
153 |
*/
|
williamr@2
|
154 |
ESearchEntryDescription=0x4,
|
williamr@2
|
155 |
|
williamr@2
|
156 |
/** Search attendee addresses during a text search.
|
williamr@2
|
157 |
@publishedPartner
|
williamr@2
|
158 |
@released
|
williamr@2
|
159 |
*/
|
williamr@2
|
160 |
ESearchAttendeeAddress=0x8,
|
williamr@2
|
161 |
|
williamr@2
|
162 |
/** Search attendee sent by addresses during a text search.
|
williamr@2
|
163 |
@publishedPartner
|
williamr@2
|
164 |
@released
|
williamr@2
|
165 |
*/
|
williamr@2
|
166 |
ESearchAttendeeSentByAddress=0x10,
|
williamr@2
|
167 |
|
williamr@2
|
168 |
/** Search attendee common names during a text search.
|
williamr@2
|
169 |
@publishedPartner
|
williamr@2
|
170 |
@released
|
williamr@2
|
171 |
*/
|
williamr@2
|
172 |
ESearchAttendeeCommonName=0x20,
|
williamr@2
|
173 |
|
williamr@2
|
174 |
/** Search organizer's address during a text search.
|
williamr@2
|
175 |
@publishedPartner
|
williamr@2
|
176 |
@released
|
williamr@2
|
177 |
*/
|
williamr@2
|
178 |
ESearchOrganizerAddress=0x40,
|
williamr@2
|
179 |
|
williamr@2
|
180 |
/** Search organizer's sent by address during a text search.
|
williamr@2
|
181 |
@publishedPartner
|
williamr@2
|
182 |
@released
|
williamr@2
|
183 |
*/
|
williamr@2
|
184 |
ESearchOrganizerSentByAddress=0x80,
|
williamr@2
|
185 |
|
williamr@2
|
186 |
/** Search organizer's common name during a text search.
|
williamr@2
|
187 |
@publishedPartner
|
williamr@2
|
188 |
@released
|
williamr@2
|
189 |
*/
|
williamr@2
|
190 |
ESearchOrganizerCommonName=0x100,
|
williamr@2
|
191 |
|
williamr@2
|
192 |
/** Include all possible text fields during a text search. */
|
williamr@2
|
193 |
ESearchAllTextFields=ESearchEntryLocation|ESearchEntryDescription|
|
williamr@2
|
194 |
ESearchAttendeeAddress|ESearchAttendeeSentByAddress|ESearchAttendeeCommonName|
|
williamr@2
|
195 |
ESearchOrganizerAddress|ESearchOrganizerSentByAddress|ESearchOrganizerCommonName,
|
williamr@2
|
196 |
};
|
williamr@2
|
197 |
|
williamr@2
|
198 |
/** Class to implement a time range in the Instance view and Entry view.
|
williamr@2
|
199 |
@publishedAll
|
williamr@2
|
200 |
@released
|
williamr@2
|
201 |
*/
|
williamr@2
|
202 |
class TCalTimeRange
|
williamr@2
|
203 |
{
|
williamr@2
|
204 |
public:
|
williamr@2
|
205 |
IMPORT_C TCalTimeRange(TCalTime aStartTime, TCalTime aEndTime);
|
williamr@2
|
206 |
|
williamr@2
|
207 |
IMPORT_C TCalTime StartTime() const;
|
williamr@2
|
208 |
IMPORT_C TCalTime EndTime() const;
|
williamr@2
|
209 |
|
williamr@2
|
210 |
private:
|
williamr@2
|
211 |
TCalTime iStartTime;
|
williamr@2
|
212 |
TCalTime iEndTime;
|
williamr@2
|
213 |
};
|
williamr@2
|
214 |
|
williamr@2
|
215 |
/** Enumeration returned when opening a file to indicate whether the file is the current version,
|
williamr@2
|
216 |
needs converting, or is unsupported.
|
williamr@2
|
217 |
@publishedPartner
|
williamr@2
|
218 |
@released
|
williamr@2
|
219 |
*/
|
williamr@2
|
220 |
enum TCalFileVersionSupport
|
williamr@2
|
221 |
{
|
williamr@2
|
222 |
/** The file is the current version and can be loaded immediately. */
|
williamr@2
|
223 |
EFileIsCurrentVersion,
|
williamr@2
|
224 |
/** The file is an older version and will be converted when it is used. */
|
williamr@2
|
225 |
EFileNeedsConverting,
|
williamr@2
|
226 |
/** The file is an old version that is not supported. */
|
williamr@2
|
227 |
EUnsupportedFileVersion
|
williamr@2
|
228 |
};
|
williamr@2
|
229 |
};
|
williamr@2
|
230 |
#endif // __CALCOMMON_H__
|