EMSABP TDB database API.
More...
#include "mapiproxy/dcesrv_mapiproxy.h"
#include "dcesrv_exchange_nsp.h"
|
| _PUBLIC_ enum MAPISTATUS | emsabp_tdb_close (TDB_CONTEXT *tdb_ctx) |
| _PUBLIC_ enum MAPISTATUS | emsabp_tdb_fetch (TDB_CONTEXT *tdb_ctx, const char *keyname, TDB_DATA *result) |
| _PUBLIC_ enum MAPISTATUS | emsabp_tdb_fetch_dn_from_MId (TALLOC_CTX *mem_ctx, TDB_CONTEXT *tdb_ctx, uint32_t MId, char **dn) |
| _PUBLIC_ enum MAPISTATUS | emsabp_tdb_fetch_MId (TDB_CONTEXT *tdb_ctx, const char *keyname, uint32_t *MId) |
| _PUBLIC_ TDB_CONTEXT * | emsabp_tdb_init (TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx) |
| _PUBLIC_ TDB_CONTEXT * | emsabp_tdb_init_tmp (TALLOC_CTX *mem_ctx) |
| _PUBLIC_ enum MAPISTATUS | emsabp_tdb_insert (TDB_CONTEXT *tdb_ctx, const char *keyname) |
| _PUBLIC_ bool | emsabp_tdb_lookup_MId (TDB_CONTEXT *tdb_ctx, uint32_t MId) |
◆ emsabp_tdb_close()
| _PUBLIC_ enum MAPISTATUS emsabp_tdb_close |
( |
TDB_CONTEXT * | tdb_ctx | ) |
|
Close EMSABP TDB database
- Returns
- MAPI_E_SUCCESS on success, otherwise MAPI_E_INVALID_PARAMETER
◆ emsabp_tdb_fetch()
| _PUBLIC_ enum MAPISTATUS emsabp_tdb_fetch |
( |
TDB_CONTEXT * | tdb_ctx, |
|
|
const char * | keyname, |
|
|
TDB_DATA * | result ) |
Fetch an element within a TDB database given its key
- Parameters
-
| tdb_ctx | pointer to the EMSABP TDB context |
| keyname | pointer to the TDB key to fetch |
| result | pointer on TDB results |
- Returns
- MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND
Referenced by emsabp_tdb_init(), and emsabp_tdb_insert().
◆ emsabp_tdb_fetch_dn_from_MId()
| _PUBLIC_ enum MAPISTATUS emsabp_tdb_fetch_dn_from_MId |
( |
TALLOC_CTX * | mem_ctx, |
|
|
TDB_CONTEXT * | tdb_ctx, |
|
|
uint32_t | MId, |
|
|
char ** | dn ) |
Traverse the EMSABP TDB and fetch the DN associated with the MId
- Parameters
-
| mem_ctx | pointer to the memory context |
| tdb_ctx | pointer to the EMSABP TDB context |
| MId | MID to search |
| dn | pointer on pointer to the dn to return |
- Returns
- MAPI_E_SUCCESS on success, otherwise false
◆ emsabp_tdb_fetch_MId()
| _PUBLIC_ enum MAPISTATUS emsabp_tdb_fetch_MId |
( |
TDB_CONTEXT * | tdb_ctx, |
|
|
const char * | keyname, |
|
|
uint32_t * | MId ) |
Retrieve the Minimal EntryID associated to a given DN
- Parameters
-
| tdb_ctx | pointer to the EMSABP TDB context |
| keyname | pointer to the TDB key to search for |
| MId | pointer on the integer the function returns |
- Returns
- MAPI_E_SUCCESS on success, otherwise MAPI error
◆ emsabp_tdb_init()
| _PUBLIC_ TDB_CONTEXT * emsabp_tdb_init |
( |
TALLOC_CTX * | mem_ctx, |
|
|
struct loadparm_context * | lp_ctx ) |
◆ emsabp_tdb_init_tmp()
| _PUBLIC_ TDB_CONTEXT * emsabp_tdb_init_tmp |
( |
TALLOC_CTX * | mem_ctx | ) |
|
Initialize a temporary (on-memory) TDB database. This database is used to store temporary MId used within a session lifetime.
- Parameters
-
| mem_ctx | pointer to the memory context |
- Returns
- Allocated TDB context on success, otherwise NULL
◆ emsabp_tdb_insert()
| _PUBLIC_ enum MAPISTATUS emsabp_tdb_insert |
( |
TDB_CONTEXT * | tdb_ctx, |
|
|
const char * | keyname ) |
Insert an element into TDB database
- Parameters
-
| tdb_ctx | pointer to the EMSABP TDB context |
| keyname | pointer to the TDB key name string |
- Returns
- MAPI_E_SUCCESS on success, otherwise MAPI error
References emsabp_tdb_fetch().
◆ emsabp_tdb_lookup_MId()
| _PUBLIC_ bool emsabp_tdb_lookup_MId |
( |
TDB_CONTEXT * | tdb_ctx, |
|
|
uint32_t | MId ) |
Traverse the EMSABP TDB database and look for the input MId
- Parameters
-
| tdb_ctx | pointer to the EMSABP TDB context |
| MId | MID to lookup |
- Returns
- true on success, otherwise false