POOMThe Pocket Office Object Model

< BACK  NEXT >
[oR]

POOM The Pocket Office Object Model

This chapter looks at accessing the Pocket Outlook (such as Contact, Task, or Calendar) information using the Pocket Office Object Model (POOM). In times past, applications used Windows CE API functions or manipulated the Outlook property databases directly. Now, though, POOM is the recommended mechanism to use.

POOM is implemented as a set of COM interfaces that are related together to form an object model (Figure 14.2). Figure 14.2 expresses two types of relationships between interfaces.

Figure 14.2. The Pocket Office Object Model
graphics/14fig02.gif
  • The thin lines represent a "returns interface" relationship. For example, IPOutlookApp has a function GetDefaultFolder that returns an IFolder interface for one of the folder types (Contacts, Tasks, and so on).

  • The bold, arrowed lines represent an "implements" relationship. For example, the interface IPOItems implements the IPOutlookFolderItemCollection interface and adds a single new function called SetColumns.

A brief description of the POOM interfaces is provided in Table 14.1. Each interface has a number of functions that allow the data associated with the object to be modified and perhaps to return another interface. Examples of these functions are provided throughout this chapter.

Table 14.1. POOM interfaces
Interface Purpose
IPOutlookApp Allows application to login to Outlook and obtain folder, city, and time zone interfaces.
ICity Represents a city in the World Clock application. Can be used to add new cities or change the properties of existing cities.
ITimeZone View information about a time zone, such as name, daylight saving information, and bias from Greenwich mean time (GMT, or universal time).
IFolder Allows a standard folder to be opened, such as Calendar, Contacts, or Tasks. Also allows an object to be sent via infrared or to obtain a collection of cities.
IPOutlookItemCollection A collection of items from a standard folder such as Calendar, Contacts, or Tasks.
IContact Interface representing an existing or new contact.
IAppointment Interface representing an existing or new appointment.
ITask Interface representing an existing or new task.
IPOItems Interface derived from IPOutlookItemCollection optimized to allow the properties for each contact to be defined. However, this data is read only.
IRecurrencePattern Interface for managing recurring appointment information.
IRecipients Interface for managing recipient lists for appointments.
IPOlRecipient Interface for resolving recipients against the contact list on the device.
IExceptions Interface for managing list of exceptions generated for a recurring appointment.

Each item (such as a task, appointment, or contact) has a unique object identifier that is used to reference the item. Each class representing an item (such as ITask) has a get_Oid function that returns the item's OID. Once you know the OID, the IPOutlookApp::GetItemFromOid function can return the item directly from its OID without having to open folders, etc. You might choose to save this OID in your own database so that you can, for example, store primary contact information in Pocket Outlook and additional data, together with the OID, in your own database.


< BACK  NEXT >


Windows CE 3. 0 Application Programming
Windows CE 3.0: Application Programming (Prentice Hall Series on Microsoft Technologies)
ISBN: 0130255920
EAN: 2147483647
Year: 2002
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net