include/CAlarm.h

00001 /*
00002  * @file CAlarm.h
00003  * This file is part of Maemo calendar.
00004  * Copyright (C) 2008 Nokia Corporation. All rights reserved.
00005  *
00006  * Contact: Biris Ilias <ilias.biris@nokia.com>
00007  *
00008  * This software, including documentation, is protected by copyright 
00009  * controlled by Nokia Corporation. All rights are reserved. Copying, 
00010  * including reproducing, storing, adapting or translating, any or all
00011  * of this material requires the prior written consent of Nokia Corporation.
00012  * This material also contains confidential information which may not be
00013  * disclosed to others without the prior written consent of Nokia.
00014  */
00015 
00016 
00017 #ifndef __CALARM__H_
00018 #define __CALARM__H_
00019 
00020 /* Headers */
00021 #include <vector>
00022 #include <string>
00023 #include "CAlarmIface.h"
00024 #include "time.h"
00025 
00026 
00027 /* Time definition for alarm notification */
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     /* Private variables are declared as per RFC */
00246 
00247     int iTrigger; 
00249     int iRepeat; 
00251     int iDuration; 
00253     int iAction; 
00255     vector < long > vcookie; 
00257     string szAttach; 
00258 };
00259 
00260 #endif

Generated on Tue Feb 24 16:21:31 2009 for calendar-backend by  doxygen 1.5.1