S60 3.2 Calendar Launcher API Specification Document |
DN0739892 |
CONFIDENTIAL |
Version |
Date |
Status |
Description |
---|---|---|---|
1.0 |
11.04.2007 |
Approved |
|
![]() |
The purpose of Calendar Launcher API is to enable applications to launch the S60 Calendar application.
![]() |
Calendar Launcher API is a part of Calendar API, which provides an interface class to operate on the Calendar. This API allows client applications to launch the S60 Calendar application with different options.
Calendar is opened as a standalone application by default, not as embedded. The Calendar application closes after the user closes the viewer or editor. This happens even if the Calendar application was already running in the background before Calendar Launcher API was called.
![]() |
The main use cases of the Calendar Launcher API are the following:
![]() |
The main class of Calendar Launcher API is shown in Figure 1.
![]() |
The class CalenLauncher is used to launch the Calendar application. The argument aFlags in all methods is kept for future use, and it currently defaults to zero.
![]() |
The most common use cases of Calendar Launcher API are described below.
![]() |
The client application can launch Calendar into the entry editor. This entry can be a new entry or an existing entry. If the existing entry is a repeating entry, the application can either display the entire series or a single instance of the series. A single instance can be selected by specifying an instance time.
The example below is to demonstrate how to launch the calendar with the entry editor view.
#include "calenlauncher.h" //launch the calendar and edit a new appointment entry. // CalenLauncher::NewEntryL(CCalEntry::EAppt); … //launch the calendar in the entry editor. //Assumption: uid holds the local id of the entry to be edited. // CalenLauncher::EditEntryL(uid); … //launch the calendar in the entry editor, and open an instance of a repeating entry. //Assumption: uid holds the id of the local entry to be edited, and time holds the instance time. // CalenLauncher::EditEntryL(uid, time);
In the first case, The input argument of the method CalenLauncher::NewEntryL() has the type CCalEntry::TType, which is defined in the header file calentry.h.
And in the second and third cases, the input argument ‘uid’ has the type TCalLocalUid, which is defined in the header file calcommon.h.
![]() |
The client application can launch Calendar and view an entry. If the existing entry is a repeating entry, the application can either display the entire series or a single instance of the series. A single instance can be selected by specifying an instance time.
The example below is to demonstrate how to launch Calendar with the entry viewer.
#include "calenlauncher.h" //launch the calendar in the entry viewer. //Assumption: uid holds the local id of the entry to be opened. // CalenLauncher::ViewEntryL(uid); … //launch the calendar in the entry viewer, and open an instance of a repeating entry. //Assumption: uid holds the local id of the entry to be opened, and time holds the instance time. // CalenLauncher::ViewEntryL(uid, time);
![]() |
The client application can launch Calendar to the default view or some specified view, and focused on the specified time. The views are defined in the header file calenlauncher.h. The meanings of the views are listed below:
Label | Meaning |
TUid KCalMonthViewUid | S60 month view uid |
TUid KCalWeekViewUid | S60 week view uid |
TUid KCalDayViewUid | S60 day view uid |
TUid KCalTodoViewUid | S60 todo view uid |
TUid KCalDefaultViewUid | S60 default view uid |
The default view is set by user in the Calendar settings.
The example below is to launch Calendar to the month view:
#include "calenlauncher.h" //launch the calendar to the month view. // CalenLauncher::LaunchL(KCalMonthViewUid); … // launch the calendar to the month view, and focus to the specified time. // Assumption: time holds the specified time. // CalenLauncher::LaunchL(KCalMonthViewUid, time);
![]() |
All methods may leave, for example when running out of memory. Normal Symbian OS error handling practises should be used, including using cleanup stack and TRAP harness.
If the entry requested by the ’uid’ parameter is not found in the database, the methods do not leave. The Calendar application is silently opened and closed in the background under this circumstance. Also if the Calendar application was already running in the background, it is closed.
If the instance time specified does not correspond to a valid instance of a repeating entry or if the entry is not repeating at all, the time parameter is ignored and the Calendar application is still opened.
![]() |