MAPIProxy 2.0 API Documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Functions
oxcstor.c File Reference

Server-side store objects routines and Rops. More...

`#include "mapiproxy/dcesrv_mapiproxy.h"`
`#include "mapiproxy/libmapiproxy/libmapiproxy.h"`
`#include "mapiproxy/libmapiserver/libmapiserver.h"`
`#include "dcesrv_exchange_emsmdb.h"`
`#include <string.h>`

## Functions
_PUBLIC_ enum MAPISTATUS | EcDoRpc_RopGetPerUserGuid (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl, uint32_t *handles, uint16_t *size)
_PUBLIC_ enum MAPISTATUS | EcDoRpc_RopGetPerUserLongTermIds (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl, uint32_t *handles, uint16_t *size)
_PUBLIC_ enum MAPISTATUS | EcDoRpc_RopGetReceiveFolder (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl, uint32_t *handles, uint16_t *size)
_PUBLIC_ enum MAPISTATUS | EcDoRpc_RopGetStoreState (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl, uint32_t *handles, uint16_t *size)
_PUBLIC_ enum MAPISTATUS | EcDoRpc_RopIdFromLongTermId (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl, uint32_t *handles, uint16_t *size)
_PUBLIC_ enum MAPISTATUS | EcDoRpc_RopLogon (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl, uint32_t *handles, uint16_t *size)
_PUBLIC_ enum MAPISTATUS | EcDoRpc_RopLongTermIdFromId (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl, uint32_t *handles, uint16_t *size)
_PUBLIC_ enum MAPISTATUS | EcDoRpc_RopReadPerUserInformation (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl, uint32_t *handles, uint16_t *size)
_PUBLIC_ enum MAPISTATUS | EcDoRpc_RopRelease (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *request, uint32_t *handles, uint16_t *size)
_PUBLIC_ enum MAPISTATUS | EcDoRpc_RopSetReceiveFolder (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl, uint32_t *handles, uint16_t *size)
static enum MAPISTATUS | RopGetReceiveFolder (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl, uint32_t *handles)
static enum MAPISTATUS | RopLogon_Mailbox (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl)
static enum MAPISTATUS | RopLogon_PublicFolder (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl)
static enum MAPISTATUS | RopSetReceiveFolder (TALLOC_CTX *mem_ctx, struct emsmdbp_context *emsmdbp_ctx, struct EcDoRpc_MAPI_REQ *mapi_req, struct EcDoRpc_MAPI_REPL *mapi_repl, uint32_t *handles)

## Detailed Description

Server-side store objects routines and Rops.

## Function Documentation

_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetPerUserGuid | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl,
|  | uint32_t * | handles,
|  | uint16_t * | size
| ) |  |

EcDoRpc GetPerUserGuid (0x61) Rop. This operation gets the GUID of a public folder's per-user information.

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the GetPerUserLongTermIds EcDoRpc_MAPI_REQ
  mapi_repl | pointer to the GetPerUserLongTermIds EcDoRpc_MAPI_REPL
  handles | pointer to the MAPI handles array
  size | pointer to the mapi_response size to update

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References libmapiserver_RopGetPerUserGuid_size().

_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetPerUserLongTermIds | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl,
|  | uint32_t * | handles,
|  | uint16_t * | size
| ) |  |

EcDoRpc GetPerUserLongTermIds (0x60) Rop. This operations gets the long-term ID of a public folder that is identified by the per-user GUID of the logged on user.

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the GetPerUserLongTermIds EcDoRpc_MAPI_REQ
  mapi_repl | pointer to the GetPerUserLongTermIds EcDoRpc_MAPI_REPL
  handles | pointer to the MAPI handles array
  size | pointer to the mapi_response size to update

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References libmapiserver_RopGetPerUserLongTermIds_size().

_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetReceiveFolder | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl,
|  | uint32_t * | handles,
|  | uint16_t * | size
| ) |  |

EcDoRpc GetReceiveFolder (0x27) Rop. This operation gets the receive folder for incoming messages of a particular message class

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the GetReceiveFolder EcDoRpc_MAPI_REQ
  mapi_repl | pointer to the GetReceiveFolder EcDoRpc_MAPI_REPL
  handles | pointer to the MAPI handles array
  size | pointer to the mapi_response size to update

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References libmapiserver_RopGetReceiveFolder_size(), and RopGetReceiveFolder().

_PUBLIC_ enum MAPISTATUS EcDoRpc_RopGetStoreState | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl,
|  | uint32_t * | handles,
|  | uint16_t * | size
| ) |  |

EcDoRpc GetStoreState (0x63) Rop. This operation gets per-user information for a public folder.

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the GetStoreState EcDoRpc_MAPI_REQ
  mapi_repl | pointer to the GetStoreState EcDoRpc_MAPI_REPL
  handles | pointer to the MAPI handles array
  size | pointer to the mapi_response size to update

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References libmapiserver_RopGetStoreState_size().

_PUBLIC_ enum MAPISTATUS EcDoRpc_RopIdFromLongTermId | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl,
|  | uint32_t * | handles,
|  | uint16_t * | size
| ) |  |

EcDoRpc (0x44) Rop. This operation sets or clears the message read flag.

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the SetMessageReadFlag EcDoRpc_MAPI_REQ structure
  mapi_repl | pointer to the SetMessageReadFlag EcDoRpc_MAPI_REPL structure
  handles | pointer to the MAPI handles array
  size | pointer to the mapi_response size to update

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References libmapiserver_RopIdFromLongTermId_size(), mapi_handles_get_private_data(), and mapi_handles_search().

_PUBLIC_ enum MAPISTATUS EcDoRpc_RopLogon | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl,
|  | uint32_t * | handles,
|  | uint16_t * | size
| ) |  |

EcDoRpc Logon (0xFE) Rop. This operation logs on to a private mailbox or public folder.

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the Logon EcDoRpc_MAPI_REQ structure
  mapi_repl | pointer to the Logon EcDoRpc_MAPI_REPL structure the function returns
  handles | pointer to the MAPI handles array
  size | pointer to the mapi_response size to update

Note
  Users are only allowed to open their own mailbox at the moment. This limitation will be removed when significant progress have been made.

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References emsmdbp_object_mailbox_init(), libmapiserver_RopLogon_size(), mapi_handles_add(), mapi_handles_set_private_data(), RopLogon_Mailbox(), and RopLogon_PublicFolder().

_PUBLIC_ enum MAPISTATUS EcDoRpc_RopLongTermIdFromId | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl,
|  | uint32_t * | handles,
|  | uint16_t * | size
| ) |  |

EcDoRpc EcDoRpc_RopLongTermIdFromId (0x43) Rop.

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the LongTermIdFromId EcDoRpc_MAPI_REQ structure
  mapi_repl | pointer to the LongTermIdFromId EcDoRpc_MAPI_REPL structure
  handles | pointer to the MAPI handles array
  size | pointer to the mapi_response size to update

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References libmapiserver_RopLongTermIdFromId_size(), mapi_handles_get_private_data(), and mapi_handles_search().

_PUBLIC_ enum MAPISTATUS EcDoRpc_RopReadPerUserInformation | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl,
|  | uint32_t * | handles,
|  | uint16_t * | size
| ) |  |

EcDoRpc ReadPerUserInformation (0x63) Rop. This operation gets per-user information for a public folder.

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the ReadPerUserInformation EcDoRpc_MAPI_REQ
  mapi_repl | pointer to the ReadPerUserInformation EcDoRpc_MAPI_REPL
  handles | pointer to the MAPI handles array
  size | pointer to the mapi_response size to update

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References libmapiserver_RopReadPerUserInformation_size().

_PUBLIC_ enum MAPISTATUS EcDoRpc_RopRelease | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | request,
|  | uint32_t * | handles,
|  | uint16_t * | size
| ) |  |

EcDoRpc Release (0x01) Rop. This operation releases an existing MAPI handle.

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  request | pointer to the Release EcDoRpc_MAPI_REQ
  handles | pointer to the MAPI handles array
  size | pointer to the mapi_response size to update

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References mapi_handles_delete().

_PUBLIC_ enum MAPISTATUS EcDoRpc_RopSetReceiveFolder | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl,
|  | uint32_t * | handles,
|  | uint16_t * | size
| ) |  |

EcDoRpc SetReceiveFolder (0x26) Rop. This operation sets the receive folder for incoming messages of a particular message class

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the SetReceiveFolder EcDoRpc_MAPI_REQ
  mapi_repl | pointer to the SetReceiveFolder EcDoRpc_MAPI_REPL
  handles | pointer to the MAPI handles array
  size | pointer to the mapi_response size to update

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References libmapiserver_RopSetReceiveFolder_size(), and RopSetReceiveFolder().

static enum MAPISTATUS RopGetReceiveFolder | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl,
|  | uint32_t * | handles
| ) |  |
| static

EcDoRpc GetReceiveFolder (0x27) Rop Internals. This routine performs the GetReceiveFolder internals.

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the GetReceiveFolder EcDoRpc_MAPI_REQ
  mapi_repl | pointer to the GetReceiveFolder EcDoRpc_MAPI_REPL
  handles | pointer to the MAPI handles array

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References mapi_handles_get_private_data(), mapi_handles_search(), and openchangedb_get_ReceiveFolder().

Referenced by EcDoRpc_RopGetReceiveFolder().

static enum MAPISTATUS RopLogon_Mailbox | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl
| ) |  |
| static

Logs on a private mailbox

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the RopLogon EcDoRpc_MAPI_REQ structure
  mapi_repl | pointer to the RopLogon EcDoRpc_MAPI_REPL structure the function returns

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References emsmdbp_mailbox_provision(), openchangedb_get_MailboxGuid(), openchangedb_get_MailboxReplica(), and openchangedb_get_SystemFolderID().

Referenced by EcDoRpc_RopLogon().

static enum MAPISTATUS RopLogon_PublicFolder | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl
| ) |  |
| static

Logs on a public folder store

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the RopLogon EcDoRpc_MAPI_REQ structure
  mapi_repl | pointer to the RopLogon EcDoRpc_MAPI_REPL structure that the function returns

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References openchangedb_get_PublicFolderID(), and openchangedb_get_PublicFolderReplica().

Referenced by EcDoRpc_RopLogon().

static enum MAPISTATUS RopSetReceiveFolder | ( | TALLOC_CTX * | mem_ctx,
|  | struct emsmdbp_context * | emsmdbp_ctx,
|  | struct EcDoRpc_MAPI_REQ * | mapi_req,
|  | struct EcDoRpc_MAPI_REPL * | mapi_repl,
|  | uint32_t * | handles
| ) |  |
| static

EcDoRpc SetReceiveFolder (0x26) Rop Internals. This routine performs the SetReceiveFolder internals.

Parameters

  mem_ctx | pointer to the memory context
  emsmdbp_ctx | pointer to the emsmdb provider context
  mapi_req | pointer to the SetReceiveFolder EcDoRpc_MAPI_REQ
  mapi_repl | pointer to the SetReceiveFolder EcDoRpc_MAPI_REPL
  handles | pointer to the MAPI handles array

Returns
  MAPI_E_SUCCESS on success, otherwise MAPI error

References mapi_handles_get_private_data(), mapi_handles_search(), and openchangedb_set_ReceiveFolder().

Referenced by EcDoRpc_RopSetReceiveFolder().

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