1 #ifndef __OBJECTS_CALENDAROBJECT_CALENDAROBJECT_H__
2 #define __OBJECTS_CALENDAROBJECT_CALENDAROBJECT_H__
12 #include "../../common/text.h"
13 #include "../../version.h"
17 enum CalendarObjectLoadResult {
18 CALENDAROBJECTLOAD_UNITTESTFAIL = -1,
19 CALENDAROBJECTLOAD_OK,
20 CALENDAROBJECTLOAD_MISSING,
21 CALENDAROBJECTLOAD_INVALIDFORMAT,
22 CALENDAROBJECTLOAD_CANNOTOPEN
25 enum CalendarObjectSaveResult {
26 CALENDAROBJECTSAVE_UNITTESTFAIL = -1,
27 CALENDAROBJECTSAVE_OK,
28 CALENDAROBJECTSAVE_CANNOTOPEN
31 enum CalendarObjectValidResult{
32 CALENDAROBJECTVALID_UNITTESTFAIL = -1,
33 CALENDAROBJECTVALID_OK,
34 CALENDAROBJECTVALID_INVALIDFORMAT
37 enum CalendarAlarmAction{
38 CALENDARALARM_UNSPECIFIED = -1,
40 CALENDARALARM_DISPLAY,
44 struct CalendarAlarmDataStruct{
46 CalendarAlarmAction AlarmType = CALENDARALARM_UNSPECIFIED;
49 string AlarmActionTokens;
53 string TriggerRelated;
56 string DescriptionData;
57 string DescriptionAltRep;
58 string DescriptionLanguage;
59 string DescriptionTokens;
66 string SummaryLanguage;
69 vector<string> AttendeeList;
70 vector<string> AttendeeListMember;
71 vector<string> AttendeeListDelegatedFrom;
72 vector<string> AttendeeListDelegatedTo;
73 vector<string> AttendeeListRole;
74 vector<string> AttendeeListRSVP;
75 vector<string> AttendeeListDirectoryEntry;
76 vector<string> AttendeeListSentBy;
77 vector<string> AttendeeListCommonName;
78 vector<string> AttendeeListCalendarUserType;
79 vector<string> AttendeeListParticipationStatus;
80 vector<string> AttendeeListLanguage;
81 vector<string> AttendeeListTokens;
84 string DurationTokens;
86 vector<string> AttachList;
87 vector<string> AttachListTokens;
88 vector<string> AttachListEncoding;
89 vector<string> AttachListFormatType;
90 vector<string> AttachListValue;
92 vector<string> XTokensData;
93 vector<string> XTokensDataTokens;
100 CalendarObjectLoadResult LoadFile(string LoadFilename);
101 CalendarObjectLoadResult LoadString(string *LoadStringData);
102 CalendarObjectSaveResult SaveFile(string SaveFilename);
103 CalendarObjectSaveResult SaveString(string *SaveStringData);
104 CalendarObjectValidResult ValidBaseObject();
105 void ProcessBaseData();
107 // Setup virtual subroutines for use by objects
108 // inheriting from CalendarObject later on.
110 virtual CalendarObjectValidResult ValidObject() { return CALENDAROBJECTVALID_OK; };
111 virtual void Clear() {};
112 virtual void SaveObjectData(string *SaveData) {};
119 string CalendarScaleData;
120 string CalendarScaleTokens;
123 string UniqueIDTokens;
125 vector<string> AttachList;
126 vector<string> AttachListTokens;
127 vector<string> AttachListEncoding;
128 vector<string> AttachListFormatType;
129 vector<string> AttachListValue;
131 vector<string> CategoriesList;
132 vector<string> CategoriesListLanguage;
133 vector<string> CategoriesListTokens;
136 string ClassDataTokens;
138 string CompletedData;
139 string CompletedDataTokens;
141 vector<string> CommentList;
142 vector<string> CommentListAltRep;
143 vector<string> CommentListLanguage;
144 vector<string> CommentListTokens;
146 vector<string> DescriptionList;
147 vector<string> DescriptionListAltRep;
148 vector<string> DescriptionListLanguage;
149 vector<string> DescriptionListTokens;
151 string GeographicData;
152 string GeographicTokens;
155 string LocationDataAltRep;
156 string LocationDataLanguage;
157 string LocationDataTokens;
159 string PercentCompleteData;
160 string PercentCompleteTokens;
162 int PriorityData = -1;
163 string PriorityTokens;
165 vector<string> ResourcesData;
166 vector<string> ResourcesDataAltRep;
167 vector<string> ResourcesDataLanguage;
168 vector<string> ResourcesDataTokens;
171 string StatusLanguage;
175 string SummaryDataAltRep;
176 string SummaryDataLanguage;
177 string SummaryDataTokens;
179 string DateTimeEndData;
180 string DateTimeEndDataValue;
181 string DateTimeEndDataTimeZoneID;
182 string DateTimeEndDataTokens;
186 string DueDataTimeZoneID;
187 string DueDataTokens;
189 string DateTimeStartData;
190 string DateTimeStartDataValue;
191 string DateTimeStartDataTimeZoneID;
192 string DateTimeStartDataTokens;
195 string DurationDataTokens;
197 vector<string> FreeBusyList;
198 vector<string> FreeBusyListType;
199 vector<string> FreeBusyListTokens;
201 string TimeTransparencyData;
202 string TimeTransparencyDataTokens;
205 string TimeZoneDataTokens;
207 vector<string> TimeZoneNameList;
208 vector<string> TimeZoneNameListLanguage;
209 vector<string> TimeZoneNameListTokens;
211 string TimeZoneOffsetFromData;
212 string TimeZoneOffsetFromDataTokens;
214 string TimeZoneOffsetToData;
215 string TimeZoneOffsetToDataTokens;
217 string TimeZoneURLData;
218 string TimeZoneURLTokens;
220 vector<string> AttendeeList;
221 vector<string> AttendeeListMember;
222 vector<string> AttendeeListDelegatedFrom;
223 vector<string> AttendeeListDelegatedTo;
224 vector<string> AttendeeListRole;
225 vector<string> AttendeeListRSVP;
226 vector<string> AttendeeListDirectoryEntry;
227 vector<string> AttendeeListSentBy;
228 vector<string> AttendeeListCommonName;
229 vector<string> AttendeeListCalendarUserType;
230 vector<string> AttendeeListParticipationStatus;
231 vector<string> AttendeeListLanguage;
232 vector<string> AttendeeListTokens;
234 vector<string> ContactList;
235 vector<string> ContactListAltRep;
236 vector<string> ContactListLanguage;
237 vector<string> ContactListTokens;
239 string OrganiserData;
240 string OrganiserDataCommonName;
241 string OrganiserDataDirectoryEntry;
242 string OrganiserDataSentByParam;
243 string OrganiserDataLanguage;
244 string OrganiserDataTokens;
246 string RecurranceIDData;
247 string RecurranceIDDataTimeZoneParam;
248 string RecurranceIDDataRangeParam;
249 string RecurranceIDDataValue;
250 string RecurranceIDDataTokens;
252 vector<string> RelatedToData;
253 vector<string> RelatedToDataRelationType;
254 vector<string> RelatedToDataTokens;
257 string URLDataTokens;
259 vector<string> ExcludeDateData;
260 vector<string> ExcludeDateDataValue;
261 vector<string> ExcludeDateDataTimeZoneParam;
262 vector<string> ExcludeDateDataTokens;
264 vector<string> RecurranceDateData;
265 vector<string> RecurranceDateDataValue;
266 vector<string> RecurranceDateDataTimeZoneParam;
267 vector<string> RecurranceDateDataTokens;
269 string RecurranceRuleData;
270 string RecurranceRuleDataTokens;
272 string TriggerDataList;
273 string TriggerDataValue;
274 string TriggerDataRelatedParam;
275 string TriggerDataTokens;
277 string DateTimeCreatedData;
278 string DateTimeCreatedTokens;
280 string DateTimeStampData;
281 string DateTimeStampTokens;
283 string LastModifiedData;
284 string LastModifiedTokens;
286 int SequenceData = -1;
287 string SequenceTokens;
289 vector<string> XTokensData;
290 vector<string> XTokensDataTokens;
292 vector<string> RequestStatusData;
293 vector<string> RequestStatusLanguage;
294 vector<string> RequestStatusTokens;
296 vector<CalendarAlarmDataStruct> CalendarAlarmData;
299 // Initial Loading Data.
300 vector<string> ObjectName;
301 vector<string> ObjectData;
303 vector<vector<string>> EventAlarmName;
304 vector<vector<string>> EventAlarmData;
307 virtual void ProcessData() {};