00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef __CALARM__H_
00018 #define __CALARM__H_
00019
00020
00021 #include <vector>
00022 #include <string>
00023 #include "CAlarmIface.h"
00024 #include "time.h"
00025
00026
00027
00028 enum dataAlarm {
00029 E_AM_NONE = 0,
00030 E_AM_ETIME,
00031 E_AM_5MIN,
00032 E_AM_15MIN,
00033 E_AM_30MIN,
00034 E_AM_1HR,
00035 E_AM_3HR,
00036 E_AM_DAYBEFORE
00037 };
00038
00039
00040 using namespace std;
00041 using std::vector;
00042
00048 class CAlarm : public CAlarmIface{
00049
00050 public:
00051
00056 CAlarm();
00057
00061 CAlarm(CAlarm & ref);
00062
00066 ~CAlarm();
00067
00071 const CAlarm & operator=(const CAlarm & right);
00072
00083 CAlarm(int iTrigger, int iRepeat, int iDuration, int iAction, string szAttach);
00084
00085 CAlarm(int iTrigger, int iDuration);
00086
00092 bool setTrigger(int);
00093
00099 int getTrigger();
00100
00107 bool setRepeat(int iRepeat);
00114 int getRepeat();
00121 bool setDuration(int iDuration);
00128 int getDuration();
00135 bool setAction(int iAction);
00142 int getAction();
00149 bool setAttach(string szAttach);
00150
00156 string getAttach();
00157
00165 vector < long > getCookie();
00173 bool setCookie(vector < long > icookie);
00174
00175
00193 long addAlarmEvent(time_t event_time, string message,
00194 string location, time_t dateStart,
00195 time_t dateEnd, string compId, int iCalendarId,
00196 string szDescription,int iType,bool allday,
00197 string szZone,int& pErrorCode);
00198
00208 long registerAlarmForAutoDeletion (time_t alarm_time,int& pErrorCode);
00209
00219 int deleteAlarmEvent(long cookie,int& pErrorCode);
00220
00238 long modifyAlarmEvent(long oldcookie, time_t modify_time,
00239 string message, string location, time_t dateStart,
00240 time_t dateEnd, string sCompId, int iCalendarId,
00241 string szDescription,int iType,bool allday, string szZone,int& pErrorCode);
00245 string toString();
00246
00247
00248 private:
00249
00250
00251
00252 int iTrigger;
00254 int iRepeat;
00256 int iDuration;
00258 int iAction;
00260 vector < long > vcookie;
00262 string szAttach;
00263 };
00264
00265 #endif