00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef INCL_CLIENTRECURRENCE
00020 #define INCL_CLIENTRECURRENCE
00021
00026 #include "outlook/defs.h"
00027 #include "outlook/ClientAppException.h"
00028
00029 #include <string>
00030 #include <list>
00031
00032 typedef std::list<ClientAppException> exceptionList;
00033 typedef exceptionList::iterator exceptionIterator;
00034
00035
00053 class ClientRecurrence {
00054
00055 private:
00056
00057
00058 int recurrenceType;
00059 int interval;
00060 int monthOfYear;
00061 int dayOfMonth;
00062 int dayOfWeekMask;
00063 int instance;
00064 std::wstring patternStartDate;
00065 BOOL noEndDate;
00066 std::wstring patternEndDate;
00067 int occurrences;
00068
00069 std::wstring start;
00070 BOOL isAllDay;
00073
00074 RecurrencePatternPtr pRec;
00075
00077 exceptionList appExceptions;
00078
00079
00083 bool recurring;
00084
00088 bool isUpdated;
00089
00091 int numRecursions;
00092
00093
00094
00096 void checkIfRecIsCorrect();
00097
00099 bool changeDay(const std::wstring dest);
00100
00101
00102
00103
00104
00106 ClientAppException* getExceptionOnClient(const int index);
00107 const int getExceptionsCountOnClient();
00108 int saveException(ClientAppException* cException);
00109
00110
00111
00112 public:
00113
00115 ClientRecurrence();
00116
00118 ~ClientRecurrence();
00119
00121 void setCOMPtr(RecurrencePatternPtr& ptr);
00122
00123
00124
00131 int read();
00132
00141 int save();
00142
00143
00144
00146 bool isRecurring();
00147
00150 void setRecurrence();
00151
00154 void clearRecurrence();
00155
00156
00157
00158
00159
00160
00161
00162
00163
00164 const int getRecurrenceType ();
00165 const int getInterval ();
00166 const int getMonthOfYear ();
00167 const int getDayOfMonth ();
00168 const int getDayOfWeekMask ();
00169 const int getInstance ();
00170 const std::wstring& getPatternStartDate();
00171 const BOOL getNoEndDate ();
00172 const std::wstring& getPatternEndDate ();
00173 const int getOccurrences ();
00174
00175
00176 const std::wstring getProperty(const std::wstring& propertyName);
00177
00178
00179
00180
00181
00182
00183
00184
00185
00186
00187
00188 void setRecurrenceType (const int val);
00189 void setInterval (const int val);
00190 void setMonthOfYear (const int val);
00191 void setDayOfMonth (const int val);
00192 void setDayOfWeekMask (const int val);
00193 void setInstance (const int val);
00194 void setPatternStartDate(const std::wstring& val);
00195 void setNoEndDate (const BOOL val);
00196 void setPatternEndDate (const std::wstring& val);
00197 void setOccurrences (const int val);
00198
00200 void setStart (const std::wstring& val);
00201 void setIsAllDay (const BOOL val);
00202
00203
00204 int setProperty(const std::wstring& propertyName, const std::wstring& propertyValue);
00205
00206
00207
00208
00209
00210
00211 ClientAppException* getException(const int index);
00212 const int getExceptionsCount();
00213 int addException(ClientAppException* cException);
00214 void resetExceptions();
00215 int saveAllExceptions();
00216 int removeDuplicatedExceptions();
00217
00218 _AppointmentItemPtr getOccurrence(const DATE originalDate);
00219
00220 };
00221
00224 #endif