00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef __CALENDARD_PROCS_H__
00025 #define __CALENDARD_PROCS_H__
00026
00027 #include <vector>
00028 #include <time.h>
00029 #include <CCalendarDB.h>
00030
00031 class CComponent;
00032 class CBdayEvent;
00033 class CEvent;
00034
00035 class CCalendarProcs
00036 {
00037 public:
00038 CCalendarProcs(CCalendarDB *pDb);
00043 void dropInstances(int CompId, int &Error);
00044
00051 void updateInstances(int CompId, const std::vector<time_t> &InstanceTimes, int &Error);
00052
00059 void getInstances(int CompId, std::vector<time_t> &InstanceTimes, int &Error);
00060
00061
00065 int initBDay();
00066
00070 int dropBDays();
00071
00078 int addBDay(std::string CompId, time_t bday_date);
00079
00085 int delBDay(std::string CompId);
00086
00094 int getBDays(time_t iStart, time_t iEnd, std::vector<std::string> &CompIds);
00095
00103 int getBDays(time_t iStart, time_t iEnd, std::vector<CBdayEvent*> &Comps);
00104
00111 static CEvent *createComponentFromTableRecord(const char **pSqlRowData, int columns);
00112
00133 int getComponentsAllCalendars( int iStDate, int iEndDate,
00134 int iLimit,int iOffset, vector<CComponent*> &vComponents, int iQueryType=0);
00135
00152 int getComponentsAllCalendarsBySummary(std::string sSummary, int iLimit,int iOffset,
00153 vector<CComponent*> &vComponents);
00154 private:
00155 CCalendarDB *m_pDb;
00156
00157 bool time2monthday(time_t t, int &daymonth, int &year);
00158
00159 };
00160
00161 #endif