MAPIProxy 2.0 API Documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Functions
emsmdbp_object.c File Reference

Server-side specific objects init/release routines. More...

`#include <ctype.h>`
`#include "mapiproxy/dcesrv_mapiproxy.h"`
`#include "mapiproxy/libmapiproxy/libmapiproxy.h"`
`#include "mapiproxy/libmapiserver/libmapiserver.h"`
`#include "mapiproxy/libmapistore/mapistore_nameid.h"`
`#include "libmapi/property_tags.h"`
`#include "libmapi/property_altnames.h"`
`#include "dcesrv_exchange_emsmdb.h"`

## Functions
_PUBLIC_ uint32_t | emsmdbp_get_contextID (struct emsmdbp_object *object)
char * | emsmdbp_get_owner (struct emsmdbp_object *object)
bool | emsmdbp_is_mailboxstore (struct emsmdbp_object *object)
bool | emsmdbp_is_mapistore (struct emsmdbp_object *object)
_PUBLIC_ struct emsmdbp_object * | emsmdbp_object_attachment_init (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, uint64_t messageID, struct emsmdbp_object *parent)
_PUBLIC_ int | emsmdbp_object_copy_properties (struct emsmdbp_context *emsmdbp_ctx, struct emsmdbp_object *source_object, struct emsmdbp_object *target_object, struct SPropTagArray *excluded_properties, bool deep_copy)
static int | emsmdbp_object_destructor (void *data)
_PUBLIC_ struct emsmdbp_object * | emsmdbp_object_folder_init (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, uint64_t folderID, struct emsmdbp_object *parent_object)
_PUBLIC_ struct emsmdbp_object * | emsmdbp_object_ftcontext_init (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct emsmdbp_object *parent)
_PUBLIC_ struct emsmdbp_object * | emsmdbp_object_init (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct emsmdbp_object *parent_object)
_PUBLIC_ struct emsmdbp_object * | emsmdbp_object_mailbox_init (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, const char *essDN, bool mailboxstore)
_PUBLIC_ struct emsmdbp_object * | emsmdbp_object_message_init (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, uint64_t messageID, struct emsmdbp_object *parent)
_PUBLIC_ enum mapistore_error | emsmdbp_object_open_folder_by_fid (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct emsmdbp_object *context_object, uint64_t fid, struct emsmdbp_object **folder_object_p)
_PUBLIC_ struct emsmdbp_object * | emsmdbp_object_stream_init (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct emsmdbp_object *parent)
_PUBLIC_ struct emsmdbp_object * | emsmdbp_object_subscription_init (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct emsmdbp_object *parent)
_PUBLIC_ struct emsmdbp_object * | emsmdbp_object_synccontext_init (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct emsmdbp_object *parent_object)
_PUBLIC_ struct emsmdbp_object * | emsmdbp_object_table_init (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct emsmdbp_object *parent)

## Detailed Description

Server-side specific objects init/release routines.

## Function Documentation

_PUBLIC_ uint32_t emsmdbp_get_contextID | ( | struct emsmdbp_object * | object | ) |

Return the contextID associated to a handle

Parameters

  object | pointer to the emsmdp object

Returns
  contextID value on success, otherwise -1

Referenced by EcDoRpc_RopCopyFolder(), EcDoRpc_RopCreateAttach(), EcDoRpc_RopCreateMessage(), EcDoRpc_RopDeleteMessages(), EcDoRpc_RopFindRow(), EcDoRpc_RopModifyPermissions(), EcDoRpc_RopModifyRecipients(), EcDoRpc_RopOpenAttach(), EcDoRpc_RopOpenEmbeddedMessage(), EcDoRpc_RopReloadCachedInformation(), EcDoRpc_RopRemoveAllRecipients(), EcDoRpc_RopResetTable(), EcDoRpc_RopRestrict(), EcDoRpc_RopSaveChangesMessage(), EcDoRpc_RopSetColumns(), EcDoRpc_RopSetMessageReadFlag(), EcDoRpc_RopSortTable(), EcDoRpc_RopSubmitMessage(), EcDoRpc_RopSyncImportDeletes(), EcDoRpc_RopSyncImportMessageChange(), EcDoRpc_RopSyncImportReadStateChanges(), EcDoRpc_RopTransportSend(), emsmdbp_object_destructor(), oxcfxics_push_folderChange(), and oxcfxics_push_messageChange().

char* emsmdbp_get_owner | ( | struct emsmdbp_object * | object | ) |

Convenience function to determine the owner of an object

Parameters

  object | pointer to the emsmdp object

Returns
  true if parent is within mailbox store, otherwise false

Referenced by EcDoRpc_RopDeleteMessages(), EcDoRpc_RopSaveChangesMessage(), EcDoRpc_RopSubmitMessage(), EcDoRpc_RopSyncGetTransferState(), EcDoRpc_RopSyncImportDeletes(), EcDoRpc_RopSyncImportHierarchyChange(), EcDoRpc_RopSyncImportMessageChange(), and EcDoRpc_RopSyncImportReadStateChanges().

bool emsmdbp_is_mailboxstore | ( | struct emsmdbp_object * | object | ) |

Convenient function to determine whether specified mapi_handles refers to object within mailbox or public folders store.

Parameters

  object | pointer to the emsmdp object

Returns
  true if parent is within mailbox store, otherwise false

bool emsmdbp_is_mapistore | ( | struct emsmdbp_object * | object | ) |

Convenient function to determine whether specified object is using mapistore or not

Parameters

  object | pointer to the emsmdp object

Returns
  true if parent is using mapistore, otherwise false

Referenced by EcDoRpc_RopCopyFolder(), EcDoRpc_RopCreateAttach(), EcDoRpc_RopCreateMessage(), EcDoRpc_RopDeleteMessages(), EcDoRpc_RopEmptyFolder(), EcDoRpc_RopFindRow(), EcDoRpc_RopGetPermissionsTable(), EcDoRpc_RopModifyPermissions(), EcDoRpc_RopModifyRecipients(), EcDoRpc_RopOpenAttach(), EcDoRpc_RopOpenEmbeddedMessage(), EcDoRpc_RopReloadCachedInformation(), EcDoRpc_RopRemoveAllRecipients(), EcDoRpc_RopResetTable(), EcDoRpc_RopRestrict(), EcDoRpc_RopSaveChangesMessage(), EcDoRpc_RopSetColumns(), EcDoRpc_RopSetMessageReadFlag(), EcDoRpc_RopSortTable(), EcDoRpc_RopSubmitMessage(), EcDoRpc_RopSyncImportDeletes(), EcDoRpc_RopSyncImportMessageChange(), EcDoRpc_RopSyncImportReadStateChanges(), EcDoRpc_RopTransportSend(), emsmdbp_object_copy_properties(), emsmdbp_object_destructor(), oxcfxics_push_folderChange(), and oxcfxics_push_messageChange().

_PUBLIC_ struct emsmdbp_object* emsmdbp_object_attachment_init | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | uint64_t | messageID,
|  | struct emsmdbp_object * | parent
| ) |  |
| read

Initialize a attachment object

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider cotnext
  folderID | the folder identifier
  messageID | the message identifier
  parent | emsmdbp object of the parent

References emsmdbp_object_init().

Referenced by EcDoRpc_RopCreateAttach(), and EcDoRpc_RopOpenAttach().

_PUBLIC_ int emsmdbp_object_copy_properties | ( | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct emsmdbp_object * | source_object,
|  | struct emsmdbp_object * | target_object,
|  | struct SPropTagArray * | excluded_properties,
|  | bool | deep_copy
| ) |  |

Copy properties from an object to another object

Parameters

  emsmdbp_ctx | pointer to the emsmdb provider context
  source_object | pointer to the source object
  target_object | pointer to the target object
  excluded_properties | pointer to a SPropTagArray listing properties that must not be copied
  deep_copy | indicates whether subobjects must be copied

Returns
  Allocated emsmdbp object on success, otherwise NULL

References emsmdbp_is_mapistore().

Referenced by EcDoRpc_RopCopyTo().

static int emsmdbp_object_destructor | ( | void * | data | ) |
| static

talloc destructor for emsmdbp_objects

Parameters

  data | generic pointer on data

Returns
  0 on success, otherwise -1

References emsmdbp_get_contextID(), and emsmdbp_is_mapistore().

Referenced by emsmdbp_object_init().

_PUBLIC_ struct emsmdbp_object* emsmdbp_object_folder_init | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | uint64_t | folderID,
|  | struct emsmdbp_object * | parent_object
| ) |  |
| read

Initialize a folder object

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  folderID | the folder identifier
  parent | emsmdbp object of the parent folder for this folder

Returns
  Allocated emsmdbp object on success, otherwise NULL

References emsmdbp_object_init().

Referenced by emsmdbp_object_open_folder_by_fid().

_PUBLIC_ struct emsmdbp_object* emsmdbp_object_ftcontext_init | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct emsmdbp_object * | parent
| ) |  |
| read

Initialize a ftcontext object

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider cotnext
  whole_store | whether the subscription applies to the specified change on the entire store or stricly on the specified folder/message
  folderID | the folder identifier
  messageID | the message identifier
  parent | emsmdbp object of the parent

References emsmdbp_object_init().

Referenced by EcDoRpc_RopFastTransferSourceCopyTo(), and EcDoRpc_RopSyncGetTransferState().

_PUBLIC_ struct emsmdbp_object* emsmdbp_object_init | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct emsmdbp_object * | parent_object
| ) |  |
| read

Initialize an emsmdbp_object

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context

Returns
  Allocated emsmdbp object on success, otherwise NULL

References emsmdbp_object_destructor().

Referenced by emsmdbp_object_attachment_init(), emsmdbp_object_folder_init(), emsmdbp_object_ftcontext_init(), emsmdbp_object_mailbox_init(), emsmdbp_object_message_init(), emsmdbp_object_stream_init(), emsmdbp_object_subscription_init(), emsmdbp_object_synccontext_init(), and emsmdbp_object_table_init().

_PUBLIC_ struct emsmdbp_object* emsmdbp_object_mailbox_init | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | const char * | essDN,
|  | bool | mailboxstore
| ) |  |
| read

Initialize a mailbox object

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  request | pointer to the Logon MAPI request
  mailboxstore | boolean which specifies whether the mailbox object is a PF store or a private mailbox store

Returns
  Allocated emsmdbp object on success, otherwise NULL

References emsmdbp_object_init(), openchangedb_get_PublicFolderID(), and openchangedb_get_SystemFolderID().

Referenced by EcDoRpc_RopLogon().

_PUBLIC_ struct emsmdbp_object* emsmdbp_object_message_init | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | uint64_t | messageID,
|  | struct emsmdbp_object * | parent
| ) |  |
| read

Initialize a message object

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  messageID | the message identifier
  parent | emsmdbp object of the parent

Returns
  Allocated emsmdbp object on success, otherwise NULL

References emsmdbp_object_init().

Referenced by EcDoRpc_RopCreateMessage(), EcDoRpc_RopOpenEmbeddedMessage(), and EcDoRpc_RopSyncImportMessageChange().

_PUBLIC_ enum mapistore_error emsmdbp_object_open_folder_by_fid | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct emsmdbp_object * | context_object,
|  | uint64_t | fid,
|  | struct emsmdbp_object ** | folder_object_p
| ) |  |

Return the folder object associated to specified folder identified

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdbp context
  context_object | pointer to current context object
  fid | pointer to the Folder Identifier to lookup

Returns
  Valid emsmdbp object structure on success, otherwise NULL

References emsmdbp_object_folder_init().

Referenced by EcDoRpc_RopCreateFolder(), EcDoRpc_RopCreateMessage(), EcDoRpc_RopOpenFolder(), and EcDoRpc_RopSyncImportHierarchyChange().

_PUBLIC_ struct emsmdbp_object* emsmdbp_object_stream_init | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct emsmdbp_object * | parent
| ) |  |
| read

Initialize a stream object

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider cotnext
  property | the stream property identifier
  parent | emsmdbp object of the parent

References emsmdbp_object_init().

Referenced by EcDoRpc_RopOpenStream().

_PUBLIC_ struct emsmdbp_object* emsmdbp_object_subscription_init | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct emsmdbp_object * | parent
| ) |  |
| read

Initialize a notification subscription object

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider cotnext
  whole_store | whether the subscription applies to the specified change on the entire store or stricly on the specified folder/message
  folderID | the folder identifier
  messageID | the message identifier
  parent | emsmdbp object of the parent

References emsmdbp_object_init().

Referenced by EcDoRpc_RopRegisterNotification().

_PUBLIC_ struct emsmdbp_object* emsmdbp_object_synccontext_init | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct emsmdbp_object * | parent_object
| ) |  |
| read

Initialize a synccontext object

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider cotnext
  whole_store | whether the subscription applies to the specified change on the entire store or stricly on the specified folder/message
  folderID | the folder identifier
  messageID | the message identifier
  parent | emsmdbp object of the parent

References emsmdbp_object_init(), and openchangedb_get_MailboxReplica().

Referenced by EcDoRpc_RopSyncConfigure(), and EcDoRpc_RopSyncOpenCollector().

_PUBLIC_ struct emsmdbp_object* emsmdbp_object_table_init | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct emsmdbp_object * | parent
| ) |  |
| read

Initialize a table object

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  parent | emsmdbp object of the parent

Returns
  Allocated emsmdbp object on success, otherwise NULL

References emsmdbp_object_init().

Referenced by EcDoRpc_RopGetPermissionsTable().

| This content is licensed under the Creative Commons Attribution ShareAlike License v. 3.0: http://creativecommons.org/licenses/by-sa/3.0/