Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Version 0.08 release
[xestiacalendar/.git] / objects / calendarobject / CalendarObject.h
1 #ifndef __OBJECTS_CALENDAROBJECT_CALENDAROBJECT_H__
2 #define __OBJECTS_CALENDAROBJECT_CALENDAROBJECT_H__
4 #include <string>
5 #include <iostream>
6 #include <fstream>
7 #include <sstream>
8 #include <vector>
9 #include <stdexcept>
10 #include <map>
12 #include "../../common/text.h"
13 #include "../../version.h"
15 using namespace std;
17 enum CalendarObjectLoadResult {
18         CALENDAROBJECTLOAD_UNITTESTFAIL = -1,
19         CALENDAROBJECTLOAD_OK,
20         CALENDAROBJECTLOAD_MISSING,
21         CALENDAROBJECTLOAD_INVALIDFORMAT,
22         CALENDAROBJECTLOAD_CANNOTOPEN
23 };
25 enum CalendarObjectSaveResult {
26         CALENDAROBJECTSAVE_UNITTESTFAIL = -1,
27         CALENDAROBJECTSAVE_OK,
28         CALENDAROBJECTSAVE_CANNOTOPEN
29 };
31 enum CalendarObjectValidResult{
32         CALENDAROBJECTVALID_UNITTESTFAIL = -1,
33         CALENDAROBJECTVALID_OK,
34         CALENDAROBJECTVALID_INVALIDFORMAT
35 };
37 enum CalendarAlarmAction{
38         CALENDARALARM_UNSPECIFIED = -1,
39         CALENDARALARM_AUDIO,
40         CALENDARALARM_DISPLAY,
41         CALENDARALARM_EMAIL
42 };
44 struct CalendarAlarmDataStruct{
45         
46         CalendarAlarmAction AlarmType = CALENDARALARM_UNSPECIFIED;
47         
48         string AlarmAction;
49         string AlarmActionTokens;
50         
51         string TriggerData;
52         string TriggerValue;
53         string TriggerRelated;
54         string TriggerTokens;
55         
56         string DescriptionData;
57         string DescriptionAltRep;
58         string DescriptionLanguage;
59         string DescriptionTokens;
60         
61         string RepeatData;
62         string RepeatTokens;
63         
64         string SummaryData;
65         string SummaryAltRep;
66         string SummaryLanguage;
67         string SummaryTokens;
68         
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;
82         
83         string DurationData;
84         string DurationTokens;
85         
86         vector<string> AttachList;
87         vector<string> AttachListTokens;
88         vector<string> AttachListEncoding;
89         vector<string> AttachListFormatType;
90         vector<string> AttachListValue;
91         
92         vector<string> XTokensData;
93         vector<string> XTokensDataTokens;
94         
95 };
97 class CalendarObject{
99         public:
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();
106         
107         // Setup virtual subroutines for use by objects
108         // inheriting from CalendarObject later on.
109         
110         virtual CalendarObjectValidResult ValidObject() { return CALENDAROBJECTVALID_OK; };
111         virtual void Clear() {};
112         virtual void SaveObjectData(string *SaveData) {};
113         
114         // Object data.
115         
116         string MethodData;
117         string MethodTokens;
118         
119         string CalendarScaleData;
120         string CalendarScaleTokens;
121         
122         string UniqueID;
123         string UniqueIDTokens;
124         
125         vector<string> AttachList;
126         vector<string> AttachListTokens;
127         vector<string> AttachListEncoding;
128         vector<string> AttachListFormatType;
129         vector<string> AttachListValue;
130         
131         vector<string> CategoriesList;
132         vector<string> CategoriesListLanguage;
133         vector<string> CategoriesListTokens;
134         
135         string ClassData;
136         string ClassDataTokens;
137         
138         string CompletedData;
139         string CompletedDataTokens;
140         
141         vector<string> CommentList;
142         vector<string> CommentListAltRep;
143         vector<string> CommentListLanguage;
144         vector<string> CommentListTokens;
145         
146         vector<string> DescriptionList;
147         vector<string> DescriptionListAltRep;
148         vector<string> DescriptionListLanguage;
149         vector<string> DescriptionListTokens;
150         
151         string GeographicData;
152         string GeographicTokens;
153         
154         string LocationData;
155         string LocationDataAltRep;
156         string LocationDataLanguage;
157         string LocationDataTokens;
158         
159         string PercentCompleteData;
160         string PercentCompleteTokens;
161         
162         int PriorityData = -1;
163         string PriorityTokens;
164         
165         vector<string> ResourcesData;
166         vector<string> ResourcesDataAltRep;
167         vector<string> ResourcesDataLanguage;
168         vector<string> ResourcesDataTokens;
170         string StatusData;
171         string StatusLanguage;
172         string StatusTokens;
173         
174         string SummaryData;
175         string SummaryDataAltRep;
176         string SummaryDataLanguage;
177         string SummaryDataTokens;
178         
179         string DateTimeEndData;
180         string DateTimeEndDataValue;
181         string DateTimeEndDataTimeZoneID;
182         string DateTimeEndDataTokens;
184         string DueData;
185         string DueDataValue;
186         string DueDataTimeZoneID;
187         string DueDataTokens;
189         string DateTimeStartData;
190         string DateTimeStartDataValue;
191         string DateTimeStartDataTimeZoneID;
192         string DateTimeStartDataTokens;
194         string DurationData;
195         string DurationDataTokens;
197         vector<string> FreeBusyList;
198         vector<string> FreeBusyListType;
199         vector<string> FreeBusyListTokens;
201         string TimeTransparencyData;
202         string TimeTransparencyDataTokens;
203         
204         string TimeZoneData;
205         string TimeZoneDataTokens;
206         
207         vector<string> TimeZoneNameList;
208         vector<string> TimeZoneNameListLanguage;
209         vector<string> TimeZoneNameListTokens;
210         
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;
238         
239         string OrganiserData;
240         string OrganiserDataCommonName;
241         string OrganiserDataDirectoryEntry;
242         string OrganiserDataSentByParam;
243         string OrganiserDataLanguage;
244         string OrganiserDataTokens;
245         
246         string RecurranceIDData;
247         string RecurranceIDDataTimeZoneParam;
248         string RecurranceIDDataRangeParam;
249         string RecurranceIDDataValue;
250         string RecurranceIDDataTokens;
251         
252         vector<string> RelatedToData;
253         vector<string> RelatedToDataRelationType;
254         vector<string> RelatedToDataTokens;
255         
256         string URLData;
257         string URLDataTokens;
259         vector<string> ExcludeDateData;
260         vector<string> ExcludeDateDataValue;
261         vector<string> ExcludeDateDataTimeZoneParam;
262         vector<string> ExcludeDateDataTokens;
263         
264         vector<string> RecurranceDateData;
265         vector<string> RecurranceDateDataValue;
266         vector<string> RecurranceDateDataTimeZoneParam;
267         vector<string> RecurranceDateDataTokens;
268         
269         string RecurranceRuleData;
270         string RecurranceRuleDataTokens;
271         
272         string TriggerDataList;
273         string TriggerDataValue;
274         string TriggerDataRelatedParam;
275         string TriggerDataTokens;
276         
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;
295         
296         vector<CalendarAlarmDataStruct> CalendarAlarmData;
297         
298         protected:
299         // Initial Loading Data.
300         vector<string> ObjectName;
301         vector<string> ObjectData;
302         
303         vector<vector<string>> EventAlarmName;
304         vector<vector<string>> EventAlarmData;
305         
306         private:
307         virtual void ProcessData() {};
308   
309 };
311 #endif
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy