Provider operations. More...
#include "libmapi/libmapi.h"
Functions | |
enum MAPISTATUS | GetNewLogonId (struct mapi_session *session, uint8_t *logon_id) |
_PUBLIC_ enum MAPISTATUS | Logoff (mapi_object_t *obj_store) |
enum MAPISTATUS | Logon (struct mapi_session *session, struct mapi_provider *provider, enum PROVIDER_ID provider_id) |
_PUBLIC_ enum MAPISTATUS | RegisterAsyncNotification (struct mapi_session *session, uint32_t *resultFlag) |
_PUBLIC_ enum MAPISTATUS | RegisterNotification (struct mapi_session *session, uint16_t ulEventMask) |
_PUBLIC_ enum MAPISTATUS | RfrGetFQDNFromLegacyDN (struct mapi_context *mapi_ctx, struct mapi_session *session, const char **serverFQDN) |
_PUBLIC_ enum MAPISTATUS | RfrGetNewDSA (struct mapi_context *mapi_ctx, struct mapi_session *session, const char *server, const char *userDN, char **dsa) |
Provider operations.
enum MAPISTATUS GetNewLogonId | ( | struct mapi_session * | session, |
uint8_t * | logon_id | ||
) |
Retrieve a free logon identifier within the session
session | pointer to the MAPI session context |
logon_id | pointer to the logon identifier the function returns |
References OPENCHANGE_RETVAL_IF, and mapi_session::logon_ids.
Referenced by OpenPublicFolder(), and OpenUserMailbox().
_PUBLIC_ enum MAPISTATUS Logoff | ( | mapi_object_t * | obj_store | ) |
Logoff an Exchange store
This function uninitializes the MAPI session associated to the object.
obj_store | pointer to the store object |
References mapi_object_get_session(), OPENCHANGE_RETVAL_IF, mapi_session::mapi_ctx, mapi_context::session, mapi_session::next, mapi_object_release(), and MAPIFreeBuffer().
enum MAPISTATUS Logon | ( | struct mapi_session * | session, |
struct mapi_provider * | provider, | ||
enum PROVIDER_ID | provider_id | ||
) |
References mapi_context::mem_ctx, mapi_profile::server, OPENCHANGE_RETVAL_IF, mapi_session::profile, mapi_session::mapi_ctx, PROVIDER_ID_EMSMDB, mapi_profile::credentials, mapi_context::lp_ctx, mapi_profile::exchange_version, mapi_provider::ctx, emsmdb_connect(), emsmdb_connect_ex(), mapi_profile::seal, server_version_at_least(), emsmdb_context::async_rpc_connection, emsmdb_async_connect(), PROVIDER_ID_NSPI, RfrGetNewDSA(), mapi_profile::mailbox, nspi_bind(), mapi_profile::codepage, mapi_profile::language, mapi_profile::method, and OPENCHANGE_RETVAL_ERR.
Referenced by MapiLogonProvider().
_PUBLIC_ enum MAPISTATUS RegisterAsyncNotification | ( | struct mapi_session * | session, |
uint32_t * | resultFlag | ||
) |
Create an asynchronous notification
This function initializes the notification subsystem and configures the server to send notifications. Note that this call will block.
session | the session context to register for notifications on. |
resultFlag | the result of the operation (true if there was anything returned) |
References OPENCHANGE_RETVAL_IF, mapi_session::emsmdb, mapi_provider::ctx, mapi_session::notify_ctx, emsmdb_context::mem_ctx, mapi_notify_ctx::notifications, notifications::prev, notifications::next, and emsmdb_async_waitex().
_PUBLIC_ enum MAPISTATUS RegisterNotification | ( | struct mapi_session * | session, |
uint16_t | ulEventMask | ||
) |
Initialize the notification subsystem
This function initializes the notification subsystem, binds a local UDP port to receive Exchange (server side) notifications and configures the server to send notifications on this port.
session | the session context to register for notifications on. |
ulEventMask | the mask of events to provide notifications for. |
References emsmdb_context::mem_ctx, OPENCHANGE_RETVAL_IF, mapi_session::emsmdb, mapi_provider::ctx, mapi_session::mapi_ctx, mapi_session::notify_ctx, emsmdb_bind_notification(), and emsmdb_register_notification().
_PUBLIC_ enum MAPISTATUS RfrGetFQDNFromLegacyDN | ( | struct mapi_context * | mapi_ctx, |
struct mapi_session * | session, | ||
const char ** | serverFQDN | ||
) |
Returns the FQDN of the NSPI server corresponding to a DN
mapi_ctx | pointer to the MAPI context |
session | pointer to the MAPI session context |
serverFQDN | pointer to the server FQDN string (return value) |
References RfrGetFQDNFromLegacyDN(), OPENCHANGE_RETVAL_IF, mapi_session::profile, mapi_profile::server, mapi_profile::credentials, mapi_context::lp_ctx, and mapi_profile::homemdb.
Referenced by RfrGetFQDNFromLegacyDN().
_PUBLIC_ enum MAPISTATUS RfrGetNewDSA | ( | struct mapi_context * | mapi_ctx, |
struct mapi_session * | session, | ||
const char * | server, | ||
const char * | userDN, | ||
char ** | dsa | ||
) |
Returns the name of an NSPI server
mapi_ctx | pointer to the MAPI context |
session | pointer to the MAPI session context |
server | the Exchange server address (IP or FQDN) |
userDN | optional user mailbox DN |
dsa | pointer to a new dsa (return value), containing a valid allocated string on success, otherwise NULL |
It is up to the developer to free the returned string when not needed anymore.
References RfrGetNewDSA(), mapi_context::session, mapi_session::profile, mapi_profile::credentials, and mapi_context::lp_ctx.
Referenced by RfrGetNewDSA(), and Logon().
![]() ![]() ![]() |
This content is licensed under the Creative Commons Attribution ShareAlike License v. 3.0: http://creativecommons.org/licenses/by-sa/3.0/ |