MAPI notifications functions. More...
#include <libmapi/libmapi.h>
Functions | |
_PUBLIC_ enum MAPISTATUS | MonitorNotification (struct mapi_session *session, void *private_data) |
_PUBLIC_ enum MAPISTATUS | Subscribe (mapi_object_t *obj, uint32_t *connection, uint16_t NotificationFlags, bool WholeStore, mapi_notify_callback_t notify_callback) |
_PUBLIC_ enum MAPISTATUS | Unsubscribe (struct mapi_session *session, uint32_t ulConnection) |
MAPI notifications functions.
_PUBLIC_ enum MAPISTATUS MonitorNotification | ( | struct mapi_session * | session, | |
void * | private_data | |||
) |
Wait for notifications and process them
This function indefinively waits for notifications on the UDP port and generates the traffic needed to receive MAPI notifications. These MAPI notifications are next compared to the registered ones and the callback specified in Subscribe() called if it matches.
Note that the function will loop indefinitively until an error occurs.
References emsmdb_transaction_null().
_PUBLIC_ enum MAPISTATUS Subscribe | ( | mapi_object_t * | obj, | |
uint32_t * | connection, | |||
uint16_t | NotificationFlags, | |||
bool | WholeStore, | |||
mapi_notify_callback_t | notify_callback | |||
) |
Register an object to receive notifications
This function registers notifications on the Exchange server for an object. The function holds the notifications intended to be monitored in as a bitmask.
obj | the object to get notifications for | |
connection | connection identifier for callabck function | |
NotificationFlags | mask for events to provide notifications for (see below) | |
WholeStore | whether the scope for this notification is whole database | |
notify_callback | notification callback function. |
The Notification Flags can take the following values:
References emsmdb_transaction(), mapi_object_get_handle(), mapi_object_get_id(), mapi_object_get_logon_id(), mapi_object_get_session(), mapi_object_init(), and mapi_object_set_handle().
_PUBLIC_ enum MAPISTATUS Unsubscribe | ( | struct mapi_session * | session, | |
uint32_t | ulConnection | |||
) |
Unregister notifications on a given object.
Cancel any notification registrations associated with the notify object. This function unregisters notifications on the Exchange server for the object specified with its connection number ulConnection. The function will releases the notification on the Exchange server and remove the entry from the internal notifications list.
The function takes a callback to execute when such notification occurs and returns the ulConnection identifier we can use in further management.
References GetLastError(), and Release().
![]() ![]() ![]() |
This content is licensed under the Creative Commons Attribution ShareAlike License v. 3.0: http://creativecommons.org/licenses/by-sa/3.0/ |