openchangedb_message.c File Reference

OpenChange Dispatcher database message routines. More...

#include <inttypes.h>
#include "mapiproxy/dcesrv_mapiproxy.h"
#include "mapiproxy/libmapistore/mapistore.h"
#include "libmapiproxy.h"
#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"
#include "mapiproxy/libmapiproxy/backends/openchangedb_backends.h"

Functions

_PUBLIC_ enum MAPISTATUS openchangedb_message_create (TALLOC_CTX *mem_ctx, struct openchangedb_context *oc_ctx, const char *username, uint64_t messageID, uint64_t folderID, bool fai, void **message_object)
 
_PUBLIC_ enum MAPISTATUS openchangedb_message_get_property (TALLOC_CTX *mem_ctx, struct openchangedb_context *oc_ctx, void *message_object, uint32_t proptag, void **data)
 
_PUBLIC_ enum MAPISTATUS openchangedb_message_open (TALLOC_CTX *mem_ctx, struct openchangedb_context *oc_ctx, const char *username, uint64_t messageID, uint64_t folderID, void **message_object, void **msgp)
 
_PUBLIC_ enum MAPISTATUS openchangedb_message_save (struct openchangedb_context *oc_ctx, void *msg, uint8_t SaveFlags)
 
_PUBLIC_ enum MAPISTATUS openchangedb_message_set_properties (TALLOC_CTX *mem_ctx, struct openchangedb_context *oc_ctx, void *message_object, struct SRow *row)
 

Detailed Description

OpenChange Dispatcher database message routines.

Function Documentation

_PUBLIC_ enum MAPISTATUS openchangedb_message_create ( TALLOC_CTX *  mem_ctx,
struct openchangedb_context *  oc_ctx,
const char *  username,
uint64_t  messageID,
uint64_t  folderID,
bool  fai,
void **  message_object 
)

Initialize and create a message object

Parameters
mem_ctxpointer to the memory context to use for allocation
oc_ctxpointer to the openchangedb context
usernameThe name of the mailbox where the parent folder of the message is.
messageIDthe identifier of the message to create
folderIDthe identifier of the folder where the message is created
message_objectpointer on pointer to the message object to return
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error

Referenced by EcDoRpc_RopCreateMessage(), and emsmdbp_mailbox_provision_public_freebusy().

_PUBLIC_ enum MAPISTATUS openchangedb_message_get_property ( TALLOC_CTX *  mem_ctx,
struct openchangedb_context *  oc_ctx,
void *  message_object,
uint32_t  proptag,
void **  data 
)

Retrieve a property on a LDB message

Parameters
mem_ctxpointer to the memory context
message_objectthe openchangedb message to retrieve data from
proptagthe MAPI property tag to lookup
datapointer on pointer to the data to return
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error

Referenced by emsmdbp_object_get_properties_message().

_PUBLIC_ enum MAPISTATUS openchangedb_message_open ( TALLOC_CTX *  mem_ctx,
struct openchangedb_context *  oc_ctx,
const char *  username,
uint64_t  messageID,
uint64_t  folderID,
void **  message_object,
void **  msgp 
)

Initialize and open a message object

Parameters
mem_ctxpointer to the memory context to use for allocation
oc_ctxpointer to the openchangedb context
usernamethe name of the mailbox where the parent folder of the message is.
messageIDthe identifier of the message to open
folderIDthe identifier of the folder where the message is stored
message_objectpointer on pointer to the message object to return
msgppointer on pointer to the mapistore message to return
Returns
MAPI_E_SUCCESS on success, otherwise MAPISTORE error

Referenced by emsmdbp_object_message_open().

_PUBLIC_ enum MAPISTATUS openchangedb_message_save ( struct openchangedb_context *  oc_ctx,
void *  msg,
uint8_t  SaveFlags 
)

Save (commit) message in openchangedb database

Parameters
msgthe message object
SaveFlagsflags associated to the save operation
Returns
MAPI_E_SUCCESS on success, otherwise MAPI error

Referenced by EcDoRpc_RopSaveChangesMessage(), and emsmdbp_mailbox_provision_public_freebusy().

_PUBLIC_ enum MAPISTATUS openchangedb_message_set_properties ( TALLOC_CTX *  mem_ctx,
struct openchangedb_context *  oc_ctx,
void *  message_object,
struct SRow *  row 
)

Set a list of properties on a message

Parameters
mem_ctxpointer to the memory context
message_objectpointer to the openchangedb message object
rowpointer to the SRow structure holding the array of properties to set on the message
Returns
MAPI_E_SUCCESS on success, otherwise MAPI errors.

Referenced by emsmdbp_mailbox_provision_public_freebusy(), and emsmdbp_object_set_properties().


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