CAlarm Class Reference

This class contains the API's to interact with alarm daemon as well store the alarm data's in the local calendar database. More...

#include <CAlarm.h>

Inheritance diagram for CAlarm:

CAlarmIface

Public Member Functions

 CAlarm ()
 CAlarm (CAlarm &ref)
 ~CAlarm ()
const CAlarmoperator= (const CAlarm &right)
 CAlarm (int iTrigger, int iRepeat, int iDuration, int iAction, string szAttach)
 CAlarm (int iTrigger, int iDuration)
bool setTrigger (int)
int getTrigger ()
bool setRepeat (int iRepeat)
int getRepeat ()
bool setDuration (int iDuration)
int getDuration ()
bool setTimeBefore (int iSecondsBeforeEvent)
int getTimeBefore ()
bool setAction (int iAction)
int getAction ()
bool setAttach (string szAttach)
string getAttach ()
vector< long > getCookie ()
bool setCookie (vector< long > icookie)
long addAlarmEvent (time_t event_time, string message, string location, time_t dateStart, time_t dateEnd, string compId, int iCalendarId, string szDescription, int iType, bool allday, string szZone, int &pErrorCode)
long registerAlarmForAutoDeletion (time_t alarm_time, int &pErrorCode)
int deleteAlarmEvent (long cookie, int &pErrorCode)
long modifyAlarmEvent (long oldcookie, time_t modify_time, string message, string location, time_t dateStart, time_t dateEnd, string sCompId, int iCalendarId, string szDescription, int iType, bool allday, string szZone, int &pErrorCode)
string toString ()

Static Public Member Functions

static int getDefaultTimeBefore (dataAlarm alarmType)

Private Attributes

int iTrigger
int iRepeat
int iDuration
int iAction
vector< long > vcookie
string szAttach

Detailed Description

This class contains the API's to interact with alarm daemon as well store the alarm data's in the local calendar database.

CAlarm class


Constructor & Destructor Documentation

CAlarm::CAlarm (  ) 

default constructor

Header files included here CAlarm Default constructor

References iAction, iDuration, iRepeat, and iTrigger.

CAlarm::CAlarm ( CAlarm ref  ) 

copy constructor

CAlarm:: CAlarm(CAlarm & ref) Copy constructor for CAlarm class

References iAction, iDuration, iRepeat, iTrigger, szAttach, and vcookie.

CAlarm::~CAlarm (  ) 

default destructor

~CAlarm Default destructor

CAlarm::CAlarm ( int  iTrigger,
int  iRepeat,
int  iDuration,
int  iAction,
string  szAttach 
)

parameterised constructor

Parameters:
trigger an integer
Repeat an integer
duration an integer
action an integer
attachments a string
Returns:
none
CAlarm Parameterised constructor

Parameters:
trigger an integer time in time_t format used to know the time of occurance of alarm
Repeat an integer number of times alarm gonna repeat
duration an integer, duration of alarm
action an integer, Action required to be taken Eg AUDIO ,EMAIL etc
attachments a string
Returns:
none

CAlarm::CAlarm ( int  iTrigger,
int  iDuration 
)

CAlarm Parameterized constructor

Parameters:
iTrigger Integer time in time_t format used to know the time of occurance of alarm duration Duration of alarm
cookie Alarm cookie value
Returns:
none

References iAction, and iRepeat.


Member Function Documentation

const CAlarm & CAlarm::operator= ( const CAlarm right  ) 

overloaded assignment operator

Overloaded assignment operator for CAlarm class

References iAction, iDuration, iRepeat, iTrigger, szAttach, and vcookie.

bool CAlarm::setTrigger ( int  iTrigger  ) 

setTrigger

Parameters:
int 
Returns:
TRUE/FALSE
setTrigger Function to set the trigger value in class

Parameters:
int 
Returns:
TRUE/FALSE

Referenced by ICalConverter::getAlarm(), CCalendar::getEvent(), CMulticalendar::getEventInList(), CCalendar::getEvents(), CCalendar::getTodo(), CCalendar::getTodos(), CMulticalendar::localBdayEventFromRemoteId(), CComponent::setAlarm(), and CComponent::updateAlarmTriggerTime().

int CAlarm::getTrigger (  ) 

getTrigger

Parameters:
none 
Returns:
int
getTrigger Function to get the trigger

Parameters:
none 
Returns:
int

References iTrigger.

Referenced by CCalendar::addAlarm(), ICalConverter::getAlarm(), ICalConverter::getIcalAlarm(), CCalendar::manageCookie(), CCalendar::registerAlarmForVisibleCalendar(), CCalendar::setNextAlarm(), and CComponent::updateAlarmTriggerTime().

bool CAlarm::setRepeat ( int  iRepeat  ) 

setRepeat

Parameters:
int 
Returns:
TRUE/FALSE
setRepeat Function to set the repeat value

Parameters:
int 
Returns:
TRUE/FALSE

Referenced by ICalConverter::getAlarm(), CCalendar::getEvent(), CMulticalendar::getEventInList(), CCalendar::getEvents(), CCalendar::getTodo(), CCalendar::getTodos(), and CMulticalendar::localBdayEventFromRemoteId().

int CAlarm::getRepeat (  ) 

getRepeat

Parameters:
none 
Returns:
int
getRepeat Function to get the repeat value

Parameters:
none 
Returns:
int

References iRepeat.

Referenced by CCalendar::addAlarm(), and ICalConverter::getIcalAlarm().

bool CAlarm::setDuration ( int  iDuration  ) 

setDuration

Parameters:
int 
Returns:
TRUE/FALSE
setDuration Function to set the duration

Parameters:
int 
Returns:
TRUE/FALSE

Referenced by ICalConverter::getAlarm(), CComponent::getAlarmProperties(), CCalendar::getEvent(), CMulticalendar::getEventInList(), CCalendar::getEvents(), CCalendar::getTodo(), CCalendar::getTodos(), CMulticalendar::localBdayEventFromRemoteId(), and CComponent::setAlarm().

int CAlarm::getDuration (  ) 

getDuration

Parameters:
none 
Returns:
int
getDuration Function to get the duration

Parameters:
none 
Returns:
int

References iDuration.

Referenced by CCalendar::addAlarm(), CComponent::getDuration(), ICalConverter::getIcalAlarm(), and CComponent::updateAlarmTriggerTime().

bool CAlarm::setTimeBefore ( int  iSecondsBeforeEvent  ) 

setTimeBefore

Parameters:
int 
Returns:
TRUE/FALSE

References iDuration.

Referenced by CComponent::getAlarmProperties(), and CComponent::setAlarm().

int CAlarm::getTimeBefore (  ) 

getTimeBefore

Parameters:
none 
Returns:
int

References getDefaultTimeBefore(), and iDuration.

Referenced by CCalendar::addAlarm(), CComponent::getAlarmBefore(), and CComponent::updateAlarmTriggerTime().

bool CAlarm::setAction ( int  iAction  ) 

setAction

Parameters:
int 
Returns:
TRUE/FALSE
setAction Function to set the value for Action

Parameters:
int 
Returns:
TRUE/FALSE

Referenced by ICalConverter::getAlarm(), CCalendar::getEvent(), CMulticalendar::getEventInList(), CCalendar::getEvents(), CCalendar::getTodo(), CCalendar::getTodos(), and CMulticalendar::localBdayEventFromRemoteId().

int CAlarm::getAction (  ) 

getAction

Parameters:
none 
Returns:
int sdfsd
getAction Function to get the value for Action

Parameters:
none 
Returns:
int

References iAction.

Referenced by CCalendar::addAlarm().

bool CAlarm::setAttach ( string  szAttach  ) 

setAttach

Parameters:
int 
Returns:
TRUE/FALSE
setAttach Function to set the value for Attach

Parameters:
int 
Returns:
TRUE/FALSE

Referenced by CComponent::getAlarmProperties(), CCalendar::getEvent(), CMulticalendar::getEventInList(), CCalendar::getEvents(), CCalendar::getTodo(), CCalendar::getTodos(), and CMulticalendar::localBdayEventFromRemoteId().

string CAlarm::getAttach (  ) 

getAttach

Parameters:
none @return string
getAttach Function to get the value for Attach

Parameters:
none @return string

References szAttach.

Referenced by CCalendar::addAlarm().

vector< long > CAlarm::getCookie (  ) 

getCookie()

Parameters:
None 
Returns:
vector<integer> cookie for an Alarm
Returns the cookie value for an Alarm

getCookie Function to get the cookie value

Parameters:
None 
Returns:
integer cookie for an Alarm

References vcookie.

Referenced by CCalendar::addAlarm().

bool CAlarm::setCookie ( vector< long >  vCookie  ) 

setCookie(int)

Parameters:
vector<integer> cookie value of an alarm
Returns:
boolean value to indicate success or failure
Sets the cookie value of an Alarm

setCookie Function to set the cookie value

Parameters:
vector<integer> cookie value of an alarm
Returns:
boolean value to indicate success or failure

References vcookie.

Referenced by CCalendar::destroyExistingValidAlarms(), CComponent::getAlarmProperties(), CCalendar::getEvent(), CMulticalendar::getEventInList(), CCalendar::getEvents(), CCalendar::getTodo(), CCalendar::getTodos(), CMulticalendar::localBdayEventFromRemoteId(), CCalendar::manageCookie(), CCalendar::registerAlarmForVisibleCalendar(), and CCalendar::setNextAlarm().

long CAlarm::addAlarmEvent ( time_t  event_time,
string  title,
string  location,
time_t  dateStart,
time_t  dateEnd,
string  sCompId,
int  iCalendarId,
string  szDescription,
int  iType,
bool  allday,
string  szZone,
int &  pErrorCode 
) [virtual]

addAlarmEvent Function to add the alarm event

Parameters:
event_time Event time in time_t format
message Event summary displays in alarm message
location Event location displays in alarm message
dateStart Event start date
dateEnd Event end date
compId component Id
iCalendarId Calendar Id
szdescription Description of the entry
iType Component Type
pErrorCode reference to integer
Returns:
long Alarm cookie value
addAlarmEvent

Parameters:
time_t Event time in time_t format
string Event summary displays in alarm message
string Event location displays in alarm message
time_t Date start
time_t Date End
string Component Id
int Calendar Id
string sDescription
iType Component Type
pErrorCode refernece to error code
Returns:
long Alarm cookie value
Function to add the alarm event

Implements CAlarmIface.

References CCalendar::checkEntryExist(), CMulticalendar::getCalendarById(), CCalendar::getCalendarTune(), CMulticalendar::getSystemTimeZone(), and CMulticalendar::MCInstance().

Referenced by CCalendar::manageCookie(), modifyAlarmEvent(), CCalendar::registerAlarmForVisibleCalendar(), and CCalendar::setNextAlarm().

long CAlarm::registerAlarmForAutoDeletion ( time_t  alarm_time,
int &  pErrorCode 
)

registerAlarmForAutoDeletion Function to register an alarm for automatic deletion of events.

Parameters:
alarm_time Event time in time_t format
pErrorCode refece to intger error code
Returns:
long Alarm cookie value
registerAlarmForAutoDeletion Function to register an alarm for automatic deletion of events.

Parameters:
alarm_time Event time in time_t format
Returns:
long Alarm cookie value

int CAlarm::deleteAlarmEvent ( long  cookie,
int &  pErrorCode 
) [virtual]

deleteAlarmEvent Function to delete the alarm event

Parameters:
long Alarm cookie value
pErrorCode refece to intger error code
Returns:
int Return value for delete alarm event
deleteAlarmEvent Function to delete the alarm event

Parameters:
long Alarm cookie value
Returns:
int Return value for delete alarm event

Implements CAlarmIface.

Referenced by CCalendar::deleteBirthDay(), CCalendar::deleteEvent(), CCalendar::deleteTodo(), CCalendar::destroyExistingValidAlarms(), CCalendar::manageCookie(), and modifyAlarmEvent().

long CAlarm::modifyAlarmEvent ( long  oldcookie,
time_t  modify_time,
string  title,
string  location,
time_t  dateStart,
time_t  dateEnd,
string  sCompId,
int  iCalendarId,
string  szDescription,
int  iType,
bool  allday,
string  szZone,
int &  pErrorCode 
) [virtual]

modifyAlarmEvent

Parameters:
oldcookie Old cookie value
modify_time Event time in time_t format
message Event summary displays in alarm message
location Event location displays in alarm message
dateStart Event start date
dateEnd Event end date
iCalendarId Calendar Id string
iType component type
pErrorCode reference to integer
Returns:
long New Alarm cookie value
Function to modify the alarm event

modifyAlarmEvent Function to modify the alarm event

Parameters:
long Old cookie value
time_t Event time in time_t format
string Event summary displays in alarm message
string Event location displays in alarm message
time_t Date start
time_t Date End
string Component Id
int Calendar Id
string sDescription
int& reference to error code
Returns:
long New Alarm cookie value

Implements CAlarmIface.

References addAlarmEvent(), and deleteAlarmEvent().

string CAlarm::toString (  ) 

int CAlarm::getDefaultTimeBefore ( dataAlarm  alarmType  )  [static]

Parameters:
alarmType 
Returns:

Referenced by getTimeBefore().


Field Documentation

int CAlarm::iTrigger [private]

Trigger parameter as per RFC

Referenced by CAlarm(), getTrigger(), operator=(), and toString().

int CAlarm::iRepeat [private]

Alarm repeat parameter

Referenced by CAlarm(), getRepeat(), operator=(), and toString().

int CAlarm::iDuration [private]

int CAlarm::iAction [private]

Combined value of "Minutes Before" alarm type (E_AM_XXX) as (MinsBefore * 10 + E_AM_XXX) Alarm action

Referenced by CAlarm(), getAction(), and operator=().

vector< long > CAlarm::vcookie [private]

Cookies vector to store them in database

Referenced by CAlarm(), getCookie(), operator=(), setCookie(), and toString().

string CAlarm::szAttach [private]

Attachements

Referenced by CAlarm(), getAttach(), operator=(), and toString().


The documentation for this class was generated from the following files:

Generated on Fri Nov 20 17:08:44 2009 for calendar-backend by  doxygen 1.5.6