#include <CAlarm.h>
Public Member Functions | |
CAlarm () | |
CAlarm (CAlarm &ref) | |
~CAlarm () | |
const CAlarm & | operator= (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 |
CAlarm class
CAlarm::CAlarm | ( | ) |
CAlarm::CAlarm | ( | CAlarm & | ref | ) |
CAlarm::~CAlarm | ( | ) |
default destructor
~CAlarm Default destructor
CAlarm::CAlarm | ( | int | iTrigger, | |
int | iRepeat, | |||
int | iDuration, | |||
int | iAction, | |||
string | szAttach | |||
) |
parameterised constructor
trigger | an integer | |
Repeat | an integer | |
duration | an integer | |
action | an integer | |
attachments | a string |
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 |
CAlarm::CAlarm | ( | int | iTrigger, | |
int | iDuration | |||
) |
bool CAlarm::setTrigger | ( | int | iTrigger | ) |
setTrigger
int |
int |
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
none |
none |
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
int |
int |
Referenced by ICalConverter::getAlarm(), CCalendar::getEvent(), CMulticalendar::getEventInList(), CCalendar::getEvents(), CCalendar::getTodo(), CCalendar::getTodos(), and CMulticalendar::localBdayEventFromRemoteId().
int CAlarm::getRepeat | ( | ) |
getRepeat
none |
none |
References iRepeat.
Referenced by CCalendar::addAlarm(), and ICalConverter::getIcalAlarm().
bool CAlarm::setDuration | ( | int | iDuration | ) |
setDuration
int |
int |
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
none |
none |
References iDuration.
Referenced by CCalendar::addAlarm(), CComponent::getDuration(), ICalConverter::getIcalAlarm(), and CComponent::updateAlarmTriggerTime().
bool CAlarm::setTimeBefore | ( | int | iSecondsBeforeEvent | ) |
setTimeBefore
int |
References iDuration.
Referenced by CComponent::getAlarmProperties(), and CComponent::setAlarm().
int CAlarm::getTimeBefore | ( | ) |
getTimeBefore
none |
References getDefaultTimeBefore(), and iDuration.
Referenced by CCalendar::addAlarm(), CComponent::getAlarmBefore(), and CComponent::updateAlarmTriggerTime().
bool CAlarm::setAction | ( | int | iAction | ) |
setAction
int |
int |
Referenced by ICalConverter::getAlarm(), CCalendar::getEvent(), CMulticalendar::getEventInList(), CCalendar::getEvents(), CCalendar::getTodo(), CCalendar::getTodos(), and CMulticalendar::localBdayEventFromRemoteId().
int CAlarm::getAction | ( | ) |
getAction
none |
none |
References iAction.
Referenced by CCalendar::addAlarm().
bool CAlarm::setAttach | ( | string | szAttach | ) |
setAttach
int |
int |
Referenced by CComponent::getAlarmProperties(), CCalendar::getEvent(), CMulticalendar::getEventInList(), CCalendar::getEvents(), CCalendar::getTodo(), CCalendar::getTodos(), and CMulticalendar::localBdayEventFromRemoteId().
string CAlarm::getAttach | ( | ) |
getAttach
none | @return string |
none | @return string |
References szAttach.
Referenced by CCalendar::addAlarm().
vector< long > CAlarm::getCookie | ( | ) |
None |
getCookie Function to get the cookie value
None |
References vcookie.
Referenced by CCalendar::addAlarm().
bool CAlarm::setCookie | ( | vector< long > | vCookie | ) |
setCookie(int)
vector<integer> | cookie value of an alarm |
setCookie Function to set the cookie value
vector<integer> | cookie value of an alarm |
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
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 |
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 |
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.
alarm_time | Event time in time_t format | |
pErrorCode | refece to intger error code |
alarm_time | Event time in time_t format |
int CAlarm::deleteAlarmEvent | ( | long | cookie, | |
int & | pErrorCode | |||
) | [virtual] |
deleteAlarmEvent Function to delete the alarm event
long | Alarm cookie value | |
pErrorCode | refece to intger error code |
long | Alarm cookie value |
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
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 |
modifyAlarmEvent Function to modify the alarm event
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 |
Implements CAlarmIface.
References addAlarmEvent(), and deleteAlarmEvent().
string CAlarm::toString | ( | ) |
toString
References iDuration, iRepeat, iTrigger, szAttach, and vcookie.
Referenced by CTodo::toString(), CJournal::toString(), CEvent::toString(), CComponentDetails::toString(), CComponent::toString(), and CBdayEvent::toString().
int CAlarm::getDefaultTimeBefore | ( | dataAlarm | alarmType | ) | [static] |
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] |
Alarm Duration
Referenced by CAlarm(), getDuration(), getTimeBefore(), operator=(), setTimeBefore(), and toString().
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().