API for MAPI handles management. More...
#include "mapiproxy/dcesrv_mapiproxy.h"
#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"
#include "libmapiproxy.h"
Functions | |
_PUBLIC_ enum MAPISTATUS | mapi_handles_add (struct mapi_handles_context *handles_ctx, uint32_t container_handle, struct mapi_handles **rec) |
_PUBLIC_ enum MAPISTATUS | mapi_handles_delete (struct mapi_handles_context *handles_ctx, uint32_t handle) |
_PUBLIC_ enum MAPISTATUS | mapi_handles_get_private_data (struct mapi_handles *handle, void **private_data) |
_PUBLIC_ struct mapi_handles_context * | mapi_handles_init (TALLOC_CTX *mem_ctx) |
_PUBLIC_ enum MAPISTATUS | mapi_handles_release (struct mapi_handles_context *handles_ctx) |
_PUBLIC_ enum MAPISTATUS | mapi_handles_search (struct mapi_handles_context *handles_ctx, uint32_t handle, struct mapi_handles **rec) |
_PUBLIC_ enum MAPISTATUS | mapi_handles_set_private_data (struct mapi_handles *handle, void *private_data) |
static enum MAPISTATUS | mapi_handles_tdb_free (struct mapi_handles_context *handles_ctx, uint32_t handle) |
static enum MAPISTATUS | mapi_handles_tdb_update (struct mapi_handles_context *handles_ctx, uint32_t handle, uint32_t container_handle) |
static int | mapi_handles_traverse_delete (TDB_CONTEXT *tdb_ctx, TDB_DATA key, TDB_DATA dbuf, void *state) |
static int | mapi_handles_traverse_null (TDB_CONTEXT *tdb_ctx, TDB_DATA key, TDB_DATA dbuf, void *state) |
API for MAPI handles management.
_PUBLIC_ enum MAPISTATUS mapi_handles_add | ( | struct mapi_handles_context * | handles_ctx, |
uint32_t | container_handle, | ||
struct mapi_handles ** | rec | ||
) |
Add a handles to the database and return a pointer on created record
handles_ctx | pointer to the MAPI handles context |
container_handle | the container handle if available |
rec | pointer on pointer to the MAPI handle structure the function returns |
References mapi_handles::handle, mapi_handles_context::handles, mapi_handles_context::last_handle, MAPI_HANDLES_RESERVED, MAPI_HANDLES_ROOT, mapi_handles_tdb_free(), mapi_handles_tdb_update(), mapi_handles_traverse_null(), mapi_handles::parent_handle, mapi_handles::private_data, and mapi_handles_context::tdb_ctx.
Referenced by EcDoRpc_RopCreateAttach(), EcDoRpc_RopCreateFolder(), EcDoRpc_RopCreateMessage(), EcDoRpc_RopFastTransferSourceCopyTo(), EcDoRpc_RopGetAttachmentTable(), EcDoRpc_RopGetContentsTable(), EcDoRpc_RopGetHierarchyTable(), EcDoRpc_RopGetPermissionsTable(), EcDoRpc_RopGetRulesTable(), EcDoRpc_RopLogon(), EcDoRpc_RopOpenAttach(), EcDoRpc_RopOpenEmbeddedMessage(), EcDoRpc_RopOpenFolder(), EcDoRpc_RopOpenMessage(), EcDoRpc_RopOpenStream(), EcDoRpc_RopRegisterNotification(), EcDoRpc_RopSyncConfigure(), EcDoRpc_RopSyncGetTransferState(), EcDoRpc_RopSyncImportMessageChange(), and EcDoRpc_RopSyncOpenCollector().
_PUBLIC_ enum MAPISTATUS mapi_handles_delete | ( | struct mapi_handles_context * | handles_ctx, |
uint32_t | handle | ||
) |
Remove the MAPI handle referenced by the handle parameter from the double chained list and mark its associated TDB record as null
handles_ctx | pointer to the MAPI handles context |
handle | the handle to delete |
References mapi_handles::handle, mapi_handles_context::handles, MAPI_HANDLES_RESERVED, mapi_handles_tdb_free(), mapi_handles_traverse_delete(), mapi_handles::next, and mapi_handles_context::tdb_ctx.
Referenced by EcDoRpc_RopCreateAttach(), EcDoRpc_RopCreateFolder(), EcDoRpc_RopGetAttachmentTable(), EcDoRpc_RopGetPermissionsTable(), EcDoRpc_RopOpenAttach(), EcDoRpc_RopOpenMessage(), EcDoRpc_RopRelease(), EcDoRpc_RopSyncImportMessageChange(), and mapi_handles_traverse_delete().
_PUBLIC_ enum MAPISTATUS mapi_handles_get_private_data | ( | struct mapi_handles * | handle, |
void ** | private_data | ||
) |
Get the private data associated to a MAPI handle
handle | pointer to the MAPI handle structure |
private_data | pointer on pointer to the private data the function returns |
References mapi_handles::private_data.
Referenced by EcDoRpc_RopCommitStream(), EcDoRpc_RopCopyFolder(), EcDoRpc_RopCopyTo(), EcDoRpc_RopCreateAttach(), EcDoRpc_RopCreateFolder(), EcDoRpc_RopCreateMessage(), EcDoRpc_RopDeleteFolder(), EcDoRpc_RopDeleteMessages(), EcDoRpc_RopEmptyFolder(), EcDoRpc_RopFastTransferSourceCopyTo(), EcDoRpc_RopFastTransferSourceGetBuffer(), EcDoRpc_RopFindRow(), EcDoRpc_RopGetAttachmentTable(), EcDoRpc_RopGetContentsTable(), EcDoRpc_RopGetHierarchyTable(), EcDoRpc_RopGetLocalReplicaIds(), EcDoRpc_RopGetPermissionsTable(), EcDoRpc_RopGetPropertiesAll(), EcDoRpc_RopGetPropertiesList(), EcDoRpc_RopGetPropertiesSpecific(), EcDoRpc_RopGetRulesTable(), EcDoRpc_RopGetStreamSize(), EcDoRpc_RopGetTransportFolder(), EcDoRpc_RopIdFromLongTermId(), EcDoRpc_RopLongTermIdFromId(), EcDoRpc_RopModifyPermissions(), EcDoRpc_RopModifyRecipients(), EcDoRpc_RopModifyRules(), EcDoRpc_RopMoveCopyMessages(), EcDoRpc_RopMoveFolder(), EcDoRpc_RopOpenAttach(), EcDoRpc_RopOpenEmbeddedMessage(), EcDoRpc_RopOpenFolder(), EcDoRpc_RopOpenMessage(), EcDoRpc_RopOpenStream(), EcDoRpc_RopQueryPosition(), EcDoRpc_RopQueryRows(), EcDoRpc_RopReadStream(), EcDoRpc_RopRegisterNotification(), EcDoRpc_RopReloadCachedInformation(), EcDoRpc_RopRemoveAllRecipients(), EcDoRpc_RopResetTable(), EcDoRpc_RopRestrict(), EcDoRpc_RopSaveChangesMessage(), EcDoRpc_RopSeekRow(), EcDoRpc_RopSeekStream(), EcDoRpc_RopSetColumns(), EcDoRpc_RopSetMessageReadFlag(), EcDoRpc_RopSetProperties(), EcDoRpc_RopSetStreamSize(), EcDoRpc_RopSortTable(), EcDoRpc_RopSubmitMessage(), EcDoRpc_RopSyncConfigure(), EcDoRpc_RopSyncGetTransferState(), EcDoRpc_RopSyncImportDeletes(), EcDoRpc_RopSyncImportHierarchyChange(), EcDoRpc_RopSyncImportMessageChange(), EcDoRpc_RopSyncImportMessageMove(), EcDoRpc_RopSyncImportReadStateChanges(), EcDoRpc_RopSyncOpenCollector(), EcDoRpc_RopSyncUploadStateStreamBegin(), EcDoRpc_RopSyncUploadStateStreamContinue(), EcDoRpc_RopSyncUploadStateStreamEnd(), EcDoRpc_RopTransportSend(), EcDoRpc_RopWriteStream(), emsmdbp_fill_notification(), RopEmptyFolder_GenericFolder(), RopGetReceiveFolder(), and RopSetReceiveFolder().
_PUBLIC_ struct mapi_handles_context* mapi_handles_init | ( | TALLOC_CTX * | mem_ctx) |
Initialize MAPI handles context
mem_ctx | pointer to the memory context |
References mapi_handles_context::handles, mapi_handles_context::last_handle, and mapi_handles_context::tdb_ctx.
Referenced by emsmdbp_init().
_PUBLIC_ enum MAPISTATUS mapi_handles_release | ( | struct mapi_handles_context * | handles_ctx) |
Release MAPI handles context
handles_ctx | pointer to the MAPI handles context |
References mapi_handles_context::tdb_ctx.
Referenced by emsmdbp_mapi_handles_destructor().
_PUBLIC_ enum MAPISTATUS mapi_handles_search | ( | struct mapi_handles_context * | handles_ctx, |
uint32_t | handle, | ||
struct mapi_handles ** | rec | ||
) |
Search for a record in the TDB database
handles_ctx | pointer to the MAPI handles context |
handle | MAPI handle to lookup |
rec | pointer to the MAPI handle structure the function returns |
References mapi_handles::handle, mapi_handles_context::handles, MAPI_HANDLES_NULL, MAPI_HANDLES_RESERVED, mapi_handles::next, and mapi_handles_context::tdb_ctx.
Referenced by EcDoRpc_RopCommitStream(), EcDoRpc_RopCopyFolder(), EcDoRpc_RopCopyTo(), EcDoRpc_RopCreateAttach(), EcDoRpc_RopCreateFolder(), EcDoRpc_RopCreateMessage(), EcDoRpc_RopDeleteFolder(), EcDoRpc_RopDeleteMessages(), EcDoRpc_RopEmptyFolder(), EcDoRpc_RopFastTransferSourceCopyTo(), EcDoRpc_RopFastTransferSourceGetBuffer(), EcDoRpc_RopFindRow(), EcDoRpc_RopGetAttachmentTable(), EcDoRpc_RopGetContentsTable(), EcDoRpc_RopGetHierarchyTable(), EcDoRpc_RopGetLocalReplicaIds(), EcDoRpc_RopGetPermissionsTable(), EcDoRpc_RopGetPropertiesAll(), EcDoRpc_RopGetPropertiesList(), EcDoRpc_RopGetPropertiesSpecific(), EcDoRpc_RopGetRulesTable(), EcDoRpc_RopGetStreamSize(), EcDoRpc_RopGetTransportFolder(), EcDoRpc_RopIdFromLongTermId(), EcDoRpc_RopLongTermIdFromId(), EcDoRpc_RopModifyPermissions(), EcDoRpc_RopModifyRecipients(), EcDoRpc_RopModifyRules(), EcDoRpc_RopMoveCopyMessages(), EcDoRpc_RopMoveFolder(), EcDoRpc_RopOpenAttach(), EcDoRpc_RopOpenEmbeddedMessage(), EcDoRpc_RopOpenFolder(), EcDoRpc_RopOpenMessage(), EcDoRpc_RopOpenStream(), EcDoRpc_RopQueryPosition(), EcDoRpc_RopQueryRows(), EcDoRpc_RopReadStream(), EcDoRpc_RopRegisterNotification(), EcDoRpc_RopReloadCachedInformation(), EcDoRpc_RopRemoveAllRecipients(), EcDoRpc_RopResetTable(), EcDoRpc_RopRestrict(), EcDoRpc_RopSaveChangesMessage(), EcDoRpc_RopSeekRow(), EcDoRpc_RopSeekStream(), EcDoRpc_RopSetColumns(), EcDoRpc_RopSetMessageReadFlag(), EcDoRpc_RopSetProperties(), EcDoRpc_RopSetStreamSize(), EcDoRpc_RopSortTable(), EcDoRpc_RopSubmitMessage(), EcDoRpc_RopSyncConfigure(), EcDoRpc_RopSyncGetTransferState(), EcDoRpc_RopSyncImportDeletes(), EcDoRpc_RopSyncImportHierarchyChange(), EcDoRpc_RopSyncImportMessageChange(), EcDoRpc_RopSyncImportMessageMove(), EcDoRpc_RopSyncImportReadStateChanges(), EcDoRpc_RopSyncOpenCollector(), EcDoRpc_RopSyncUploadStateStreamBegin(), EcDoRpc_RopSyncUploadStateStreamContinue(), EcDoRpc_RopSyncUploadStateStreamEnd(), EcDoRpc_RopTransportSend(), EcDoRpc_RopWriteStream(), emsmdbp_fill_notification(), RopGetReceiveFolder(), and RopSetReceiveFolder().
_PUBLIC_ enum MAPISTATUS mapi_handles_set_private_data | ( | struct mapi_handles * | handle, |
void * | private_data | ||
) |
Set the private data associated to a MAPI handle
handle | pointer to the MAPI handle structure |
private_data | pointer to the private data to associate to the MAPI handle |
References mapi_handles::private_data.
Referenced by EcDoRpc_RopCreateAttach(), EcDoRpc_RopCreateFolder(), EcDoRpc_RopCreateMessage(), EcDoRpc_RopFastTransferSourceCopyTo(), EcDoRpc_RopGetAttachmentTable(), EcDoRpc_RopGetContentsTable(), EcDoRpc_RopGetHierarchyTable(), EcDoRpc_RopGetPermissionsTable(), EcDoRpc_RopGetRulesTable(), EcDoRpc_RopLogon(), EcDoRpc_RopOpenAttach(), EcDoRpc_RopOpenEmbeddedMessage(), EcDoRpc_RopOpenFolder(), EcDoRpc_RopOpenMessage(), EcDoRpc_RopOpenStream(), EcDoRpc_RopRegisterNotification(), EcDoRpc_RopSyncConfigure(), EcDoRpc_RopSyncGetTransferState(), EcDoRpc_RopSyncImportMessageChange(), and EcDoRpc_RopSyncOpenCollector().
|
static |
Set a TDB record data as null meaning it can be reused in the future.
handles_ctx | pointer to the MAPI handles context |
handle | handle key value to free |
References MAPI_HANDLES_NULL, MAPI_HANDLES_RESERVED, and mapi_handles_context::tdb_ctx.
Referenced by mapi_handles_add(), and mapi_handles_delete().
|
static |
|
static |
Traverse TDB database and search for records which dbuf value is set to state.
tdb_ctx | pointer to the TDB context |
key | the current TDB key (potential child handle) |
dbuf | the current TDB value (parent handle) |
state | pointer on private data |
References mapi_handles_delete().
Referenced by mapi_handles_delete().
|
static |
Traverse TDB database and search for the first record which dbuf value is "null" string.
tdb_ctx | pointer to the TDB context |
key | the current TDB key |
dbuf | the current TDB value |
state | pointer on private data |
References mapi_handles::handle, and MAPI_HANDLES_NULL.
Referenced by mapi_handles_add().
![]() ![]() ![]() |
This content is licensed under the Creative Commons Attribution ShareAlike License v. 3.0: http://creativecommons.org/licenses/by-sa/3.0/ |