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,int& pErrorCode);
00197
00207 long registerAlarmForAutoDeletion (time_t alarm_time,int& pErrorCode);
00208
00218 int deleteAlarmEvent(long cookie,int& pErrorCode);
00219
00237 long modifyAlarmEvent(long oldcookie, time_t modify_time,
00238 string message, string location, time_t dateStart,
00239 time_t dateEnd, string sCompId, int iCalendarId,
00240 string szDescription,int iType, int& pErrorCode);
00241
00242
00243 private:
00244
00245
00246
00247 int iTrigger;
00249 int iRepeat;
00251 int iDuration;
00253 int iAction;
00255 vector < long > vcookie;
00257 string szAttach;
00258 };
00259
00260 #endif