![]() |
![]() |
| ||||||||||||||||||||||||||||||||||||||||||
Chapter 10Integrating with CalendarThe Calendar application program interface (API) provides a programmatic way to access and manage calendar data in a networked environment. The API supports inserting, deleting, and modifying of entries as well as browse and find capabilities. It also supports calendar administration functions. The Calendar API is an implementation of the X.400 Application Programming Interface Association's (XAPIA) Calendaring and Scheduling API (CSA API). CSA API defines a set of high-level functions so that applications that are calendar enabled can access the varied features of the calendaring and scheduling service. For more information about the latest XAPIA Specification, contact the X.400 API Association, 800 El Camino Real, Mountain View, California 94043. This chapter describes the Calendar API in these sections: Library and Header FilesTo use the Calendar API, you need to link with the libcsa library. The header file is csa/csa.h. Demo ProgramA demo program containing an example of how to use the Calendar API is in /usr/dt/examples/dtcalendar. Using the Calendar API
|
Element Type | Prefix | Case |
|---|---|---|
Data type | CSA_ | Lower |
Data value | CSA_ | Upper |
Function | csa_ | Lower |
Function argument | none | Lower |
Function result | none | Lower |
Constant | CSA_ | Upper |
Error | CSA_E_ | Upper |
Macro | CSA_ | Upper |
Reserved for extension sets | CSA_XS_ | Any |
Reserved for extensions | CSA_X_ | Any |
Reserved for use by implementors | CSAP | Any |
Reserved for vendor function extensions | csa_x | Lower |
Structure Tag | CSA_TAG_ | Upper |
Elements with the prefix CSAP (any case) are reserved for internal proprietary use by implementors of the CSA service. They are not intended for direct use by programs written using the CSA interface.
The prefixes CSA_XS_, CSA_X_ (in either uppercase or lowercase), and csa_x are reserved for extensions of the interface by vendors or groups. The specification defines these interface extensions as extensions to the base set of functions.
For constant data values, an additional string is usually appended to CSA_ to indicate the data structure or function for the constant data value.
This section describes the functional architecture of services supporting the CSA API. It provides an abstract implementation model, an abstract data model, and a functional overview.
The abstract implementation model is provided as a reference aid to help you understand the scope of the CSA API.
The CSA interface is defined between a calendar-enabled application and a calendaring service. All functions in this interface are designed to be independent of the calendaring service; however, the API does allow protocol-specific extensions to the common functions to be invoked through the use of extensions. See Extensions for more information. The relationship of the CSA interface to a calendar-enabled application and the calendar service is shown in Figure 10-1.
Figure 10-1 Positioning of the Calendaring and Scheduling API

The model of the CSA interface can be divided into three components: administration, calendar management, and entry management. These components are shown in Figure 10-2.
Figure 10-2 Components of the Calendaring and Scheduling API

Access to the calendaring service is established through a calendaring session. The session provides for a valid connection to the calendaring service and assists in ensuring the integrity of the calendaring information maintained by the service. A calendar-enabled application logs on to an individual calendar within the calendaring service to establish a valid session or connection. The session is terminated by the calendar-enabled application logging off from the calendar.
The calendaring service maintains one or more calendars. The calendar service provides some level of administration support for these calendars. A calendar-enabled application might access a list of the calendars maintained by a particular calendar service. In addition, the calendar service might provide support for archive and restore of calendar information into some implementation-specific, persistent format. Where a calendar service provides support for maintaining more than one calendar, support functions are defined for creating and deleting calendars. In addition, functions are provided to support administering the characteristics of the calendar.
The majority of the functions within the CSA interface manage individual calendar entries. Calendar entries may be either events, to dos, or memos. Entries can be added, deleted, updated, and read from a particular calendar. A calendar-enabled application can also add reminders to calendar entries.
Previous Contents Index Next ![]() |