GEOS SDK TechDocs
|
|
Introduction
|
2 Examples
MSG_CALENDAR_ADD_EVENT MSG_CALENDAR_GET_EVENT_BY_ID MSG_CALENDAR_MODIFY_EVENT_BY_ID MSG_CALENDAR_DELETE_EVENT_BY_ID MSG_CALENDAR_CHECK_IF_EVENT_EXISTS
These five messages correspond to the operations you can perform on the user's calendar database: add an event, get an event you added, modify an event you added, delete an event you added, and search for the existence of any event within a specified time interval.
Because these messages are sent via IACP to the Calendar application, they cannot directly return status values. In each case, you specify a callback message and an object to receive it; status values and requested information (if any) are processed by your callback method.
CALENDAR_ADD_EVENT_CALLBACK_MSGMSG_CALENDAR_ADD_EVENT;
passes status value and the assigned event ID.
CALENDAR_GET_EVENT_CALLBACK_MSGMSG_CALENDAR_GET_EVENT_BY_ID; passes status value and handle to
a CalendarReturnedEventStruct.
CALENDAR_ACCESS_EVENT_COMMON_CALLBACK_MSGMSG_CALENDAR_MODIFY_EVENT_BY_ID,
MSG_CALENDAR_DELETE_EVENT_BY_ID, and
MSG_CALENDAR_CHECK_IF_EVENT_EXISTS; passes status value.
Only the start date is mandatory; if no start time
(CAL_NO_TIME) is specified, the event is listed as a daily
reminder (before the time-ordered list for its day). If only a start date
and time are specified (the end date and time are CAL_NO_DATE
and CAL_NO_TIME), the event is listed at the start time without
an associated interval. If an end time is also specified, the event is
shown spanning a time interval on a single day; if both an end date and time
are specified, the event is shown spanning the entire interval
from the start date and time until the end date and time.
If you specify a start time and an end date, you must also specify an end time; if the end time (or date and time) is specified, it must be later than the start time.
If you specify a start date and no start time (a daily reminder), do not
specify an end time; specify an end date if you wish to have a multi-day
daily reminder. Do not use the CEPS_reserveWholeDay parameter
to create a multi-day daily reminder; if you omit the start and end times,
you will instead create a multi-day event (see below) with the default start
and end times of 00:00 and 23:59.
| Start Param Specified | End Param Specified | Result | ||
|---|---|---|---|---|
| Date | Time | Date | Time | |
| Yes | No | No | No | Daily reminder, listed at beginning of day. |
| Yes | No | Yes | No | Multi-day daily reminder, listed at the beginning of each day. |
| Yes | No | * | Yes | Not defined. Typically creates a daily reminder. |
| Yes | Yes | No | No | Event listed (at the start time) with no interval. |
| Yes | Yes | No | Yes | Event spanning a time interval on one day. |
| Yes | Yes | Yes | Yes | Event (possibly) spanning multiple days. |
| Yes | Yes | Yes | No | Not allowed. |
| * = Doesn't matter "No" = CAL_NO_DATE or CAL_NO_TIME was specified | ||||
CEPS_reserveWholeDay in CalendarEventParamStruct;
also specify the start and end time (which will apply to each day) and the
start day. The end day value is ignored when
CEPS_reserveWholeDay is non-zero. If you omit the start or end
time (using CAL_NO_TIME), it defaults to 00:00 (start time) or
23:59 (end time).
CAL_NO_DATE and the start time to the event's status.
CEE_EVENT_NOT_SUPPORTED will be returned if
you specify a non-zero CEPS_repeatInfo field when adding or
modifying event, or if you attempt to get, modify, or delete a repeating
event. Also, MSG_CALENDAR_CHECK_IF_EVENT_EXISTS will not check
for repeating events in the specified range.
CalendarAlarmStruct
field in the event's parameter structure, CalendarEventParamStruct.
CalendarAlarmStruct is actually a WordFlag that
encodes whether an alarm is set and how long before the event's start
time it should sound. On the Nokia 9000i Communicator, this time must be
specified in minutes.
Alarms use the RTCM (Real-Time Clock Manager) library, which allows them to activate when Calendar is not running or when the device is sleeping.
[Calendar] calApi = True
See GEOS .INI Files for more information on INI files; also see this example.
structures:
CalendarEventParamStruct CalendarReturnedEventStruct CalendarEventRepeatInfo CalendarEventRepeatDurationDataWordFlags:
CalendarAlarmStruct CalendarEventRepeatLengthByteEnums:
CalendarEventDescType CalendarAlarmIntervalType CalendarEventRepeatDuration CalendarEventRepeatLengthUnitType CalendarEventRepeatWeekday CalendarEventRepeatIntervalType CalendarEventRepeatIntervalenums:
CalendarEventError CalendarToDoItemStatus
MSG_CALENDAR_REQUEST_SEARCH MSG_CALENDAR_DELETE_EVENTS_BEFORE_DATE MSG_CALENDAR_GET_NEXT_EVENT_ID MSG_CALENDAR_SET_NEXT_EVENT_ID
GEOS SDK TechDocs
|
|
Introduction
|
2 Examples