00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036 #ifndef INCL_CLIENTRECURRENCE
00037 #define INCL_CLIENTRECURRENCE
00038
00043 #include "outlook/defs.h"
00044 #include "outlook/ClientAppException.h"
00045
00046 #include <string>
00047 #include <list>
00048
00049 typedef std::list<ClientAppException> exceptionList;
00050 typedef exceptionList::iterator exceptionIterator;
00051
00052
00070 class ClientRecurrence {
00071
00072 private:
00073
00074
00075 int recurrenceType;
00076 int interval;
00077 int monthOfYear;
00078 int dayOfMonth;
00079 int dayOfWeekMask;
00080 int instance;
00081 std::wstring patternStartDate;
00082 BOOL noEndDate;
00083 std::wstring patternEndDate;
00084 int occurrences;
00085
00086 std::wstring start;
00087 BOOL isAllDay;
00090
00091 RecurrencePatternPtr pRec;
00092
00094 exceptionList appExceptions;
00095
00096
00100 bool recurring;
00101
00105 bool isUpdated;
00106
00108 int numRecursions;
00109
00110
00111
00113 void checkIfRecIsCorrect();
00114
00116 bool changeDay(const std::wstring dest);
00117
00118
00119
00120
00121
00123 ClientAppException* getExceptionOnClient(const int index);
00124 const int getExceptionsCountOnClient();
00125 int saveException(ClientAppException* cException);
00126
00127
00128
00129 public:
00130
00132 ClientRecurrence();
00133
00135 ~ClientRecurrence();
00136
00138 void setCOMPtr(RecurrencePatternPtr& ptr);
00139
00140
00141
00148 int read();
00149
00158 int save();
00159
00160
00161
00163 bool isRecurring();
00164
00167 void setRecurrence();
00168
00171 void clearRecurrence();
00172
00173
00174
00175
00176
00177
00178
00179
00180
00181 const int getRecurrenceType ();
00182 const int getInterval ();
00183 const int getMonthOfYear ();
00184 const int getDayOfMonth ();
00185 const int getDayOfWeekMask ();
00186 const int getInstance ();
00187 const std::wstring& getPatternStartDate();
00188 const BOOL getNoEndDate ();
00189 const std::wstring& getPatternEndDate ();
00190 const int getOccurrences ();
00191
00192
00193 const std::wstring getProperty(const std::wstring& propertyName);
00194
00195
00196
00197
00198
00199
00200
00201
00202
00203
00204
00205 void setRecurrenceType (const int val);
00206 void setInterval (const int val);
00207 void setMonthOfYear (const int val);
00208 void setDayOfMonth (const int val);
00209 void setDayOfWeekMask (const int val);
00210 void setInstance (const int val);
00211 void setPatternStartDate(const std::wstring& val);
00212 void setNoEndDate (const BOOL val);
00213 void setPatternEndDate (const std::wstring& val);
00214 void setOccurrences (const int val);
00215
00217 void setStart (const std::wstring& val);
00218 void setIsAllDay (const BOOL val);
00219
00220
00221 int setProperty(const std::wstring& propertyName, const std::wstring& propertyValue);
00222
00223
00224
00225
00226
00227
00228 ClientAppException* getException(const int index);
00229 const int getExceptionsCount();
00230 int addException(ClientAppException* cException);
00231 void resetExceptions();
00232 int saveAllExceptions();
00233 int removeDuplicatedExceptions();
00234
00235 _AppointmentItemPtr getOccurrence(const DATE originalDate);
00236
00237 };
00238
00241 #endif