Oxmapi
Introduction
This document defines OXMAPI32 API. It provides access to a Open-Xchange 6 Server by using the Open-Xchange HTTP API. The OXMAPI32 API can be used for Windows applications. The OXMAPI32 API architecture bases on the Microsoft MAPI so the convention of constants and objects are similar.
This document describes the functionality of each object in the respective module, which are ordinated corresponding the object model. Each module provides code examples how to use the respective object written in Delphi.
OXMAPI Object Model
Constants
This topic provides a list of all constant in the object model. OlDefaultFolders relate to the default folder subordinated to the private folder of the current user.
Name | Value |
---|---|
OlAppointmentItem | 1 |
olContactItem | 2 |
OlDistributionListItem | 7 |
olTaskItem | 3 |
Name | Value |
---|---|
olFolderCalendar | 9 |
olFolderContacts | 10 |
olFolderlTasks | 13 |
Name | ID |
---|---|
private | 1 |
public | 2 |
shared | 3 |
App Object
Represents the root for any data source object. The App Object has several purposes:
- As the root object, it allows access to other objects in the oxmapi hierarchy.
- It allows access to a new item created by using CreateItem.
- It provides methods accessing certain special default folders directly.
- It provides the Entry Point for establishing the connection
Name | Type | Description |
---|---|---|
Application | IApp | Readonly: Reference to the App Object itself. |
Name | Variant | Readonly: Name of the Application. |
Session | ISession | Readonly: Reference to the current Session Object. |
Version | Variant | Readonly: Number of the current Version |
Name | Result | Parameters | Description |
---|---|---|---|
CreateItem | IItem | Item: OlDefaultItems | Creates a new item and returns it. The CreateItem method can only create items listet in Table 1 |
CreateRecipient | IRecipient | Value: Variant | Creates and returns a Recipient object. |
GetDefaultFolder | IMAPIFolder | Name: OlDefaultFolders | Returns a MAPIFolder object that represents the default folder of the requested type for the current profile. Default folders are described in Table 2 |
GetFolderFromID | IMAPIFolder | ID: Variant | Returns a MAPIFolder object identified by the specified entry ID (if valid). |
Quit | The associated session is closed completely; the user is logged out of the messaging system and any changes to items not already saved are discarded. |
Name | Result | Parameters | Description |
---|---|---|---|
Delete | HRESULT | Deletes the folder | |
MoveTo | HRESULT | DestinationFolder: MAPIFolder | Moves the folder to the specified destination folder |
Using the MAPIFolder Object
This example uses the GetDefaultFolder method to obtain the default Calendar folder for a user who is currently logged in. Use OlDefaultFolders described in Table 2 to obtain the default folder.
Delphi code example: GetDefaultFolder
var
Application: App;
Folder: MAPIFolder;
begin
Folder := App.GetDefaultFolder(olFolderCalendar);
end;