LDB routines for the cache module.
More...
#include "mapiproxy/dcesrv_mapiproxy.h"
#include "mapiproxy/libmapiproxy/libmapiproxy.h"
#include "mapiproxy/modules/mpm_cache.h"
#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"
|
| NTSTATUS | mpm_cache_ldb_add_attachment (TALLOC_CTX *mem_ctx, struct ldb_context *ldb_ctx, struct mpm_attachment *attach) |
| static NTSTATUS | mpm_cache_ldb_add_folder (TALLOC_CTX *mem_ctx, struct ldb_context *ldb_ctx, uint64_t FolderId) |
| NTSTATUS | mpm_cache_ldb_add_message (TALLOC_CTX *mem_ctx, struct ldb_context *ldb_ctx, struct mpm_message *message) |
| NTSTATUS | mpm_cache_ldb_add_stream (struct mpm_cache *mpm, struct ldb_context *ldb_ctx, struct mpm_stream *stream) |
| NTSTATUS | mpm_cache_ldb_createdb (struct dcesrv_context *dce_ctx, const char *database, struct ldb_context **ldb_ctx) |
LDB routines for the cache module.
◆ mpm_cache_ldb_add_attachment()
| NTSTATUS mpm_cache_ldb_add_attachment |
( |
TALLOC_CTX * | mem_ctx, |
|
|
struct ldb_context * | ldb_ctx, |
|
|
struct mpm_attachment * | attach ) |
Add an attachment record to the TDB store
- Parameters
-
| mem_ctx | pointer to the memory context |
| ldb_ctx | pointer to the LDB context |
| attach | pointer to the mpm_attachment entry |
- Returns
- NT_STATUS_OK on success, otherwise a NT error
◆ mpm_cache_ldb_add_folder()
| NTSTATUS mpm_cache_ldb_add_folder |
( |
TALLOC_CTX * | mem_ctx, |
|
|
struct ldb_context * | ldb_ctx, |
|
|
uint64_t | FolderId ) |
|
static |
Add a folder record to the TDB store
- Parameters
-
| mem_ctx | pointer to the memory context |
| ldb_ctx | pointer to the LDB context |
| FolderId | the ID we will be using to uniquely create the record |
- Returns
- NT_STATUS_OK on success, otherwise NT_STATUS_NOT_FOUND
Referenced by mpm_cache_ldb_add_message().
◆ mpm_cache_ldb_add_message()
| NTSTATUS mpm_cache_ldb_add_message |
( |
TALLOC_CTX * | mem_ctx, |
|
|
struct ldb_context * | ldb_ctx, |
|
|
struct mpm_message * | message ) |
Add a message record to the TDB store
- Parameters
-
| mem_ctx | pointer to the memory context |
| ldb_ctx | pointer to the LDB context |
| message | pointer to the mpm_message entry with the folder and message ID |
- Returns
- NT_STATUS_OK on success, otherwise a NT error
References mpm_cache_ldb_add_folder().
◆ mpm_cache_ldb_add_stream()
| NTSTATUS mpm_cache_ldb_add_stream |
( |
struct mpm_cache * | mpm, |
|
|
struct ldb_context * | ldb_ctx, |
|
|
struct mpm_stream * | stream ) |
Add stream references to a message or attachment in the TDB store
- Parameters
-
| mpm | pointer to the cache module general structure |
| ldb_ctx | pointer to the LDB context |
| stream | pointer to the mpm_stream entry |
- Returns
- NT_STATUS_OK on success, otherwise NT error
◆ mpm_cache_ldb_createdb()
| NTSTATUS mpm_cache_ldb_createdb |
( |
struct dcesrv_context * | dce_ctx, |
|
|
const char * | database, |
|
|
struct ldb_context ** | ldb_ctx ) |
Create the cache database
- Parameters
-
| dce_ctx | pointer to the session context |
| database | the complete path to the tdb store |
| ldb_ctx | pointer to pointer on the the LDB context |
- Returns
- NT_STATUS_OK on success, otherwise NT_ERROR: NT_STATUS_NO_MEMORY, NT_STATUS_NOT_FOUND.