dcesrv_mapiproxy_server.c File Reference

mapiproxy server modules management More...

#include "mapiproxy/dcesrv_mapiproxy.h"
#include "libmapiproxy.h"
#include <util/debug.h>

Functions

struct mapiproxy_modulemapiproxy_server_byname (const char *name)
 
struct mapiproxy_modulemapiproxy_server_bystatus (const char *name, enum mapiproxy_status status)
 
NTSTATUS mapiproxy_server_dispatch (struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r, struct mapiproxy *mapiproxy)
 
_PUBLIC_ TDB_CONTEXT * mapiproxy_server_emsabp_tdb_init (struct loadparm_context *lp_ctx)
 
_PUBLIC_ NTSTATUS mapiproxy_server_init (struct dcesrv_context *dce_ctx)
 
static NTSTATUS mapiproxy_server_load (struct dcesrv_context *dce_ctx)
 
_PUBLIC_ bool mapiproxy_server_loaded (const char *endpoint)
 
_PUBLIC_ void * mapiproxy_server_openchange_ldb_init (struct loadparm_context *lp_ctx)
 
static NTSTATUS mapiproxy_server_overwrite (TALLOC_CTX *mem_ctx, const char *name, const char *endpoint)
 
NTSTATUS mapiproxy_server_register (const void *_server_module)
 
NTSTATUS mapiproxy_server_unbind (struct server_id server_id, uint32_t context_id)
 

Variables

static TDB_CONTEXT * emsabp_tdb_ctx = NULL
 
int num_server_modules
 
static void * openchange_ldb_ctx = NULL
 
static struct
mapiproxy_module_list
server_list = NULL
 
static struct server_module * server_modules = NULL
 

Detailed Description

mapiproxy server modules management

Function Documentation

struct mapiproxy_module* mapiproxy_server_byname ( const char *  name)
struct mapiproxy_module* mapiproxy_server_bystatus ( const char *  name,
enum mapiproxy_status  status 
)
NTSTATUS mapiproxy_server_dispatch ( struct dcesrv_call_state *  dce_call,
TALLOC_CTX *  mem_ctx,
void *  r,
struct mapiproxy mapiproxy 
)
_PUBLIC_ TDB_CONTEXT* mapiproxy_server_emsabp_tdb_init ( struct loadparm_context *  lp_ctx)

Initialize an EMSABP TDB context available to all instances when Samba is not run in single mode.

Parameters
lp_ctxpointer to the loadparm context
Note
TDB database can't be opened twice with O_RDWR flags. We ensure here we have a general context initialized, which we'll reopen within forked instances

return Allocated TDB context on success, otherwise NULL

References emsabp_tdb_ctx, and EMSABP_TDB_NAME.

Referenced by emsabp_tdb_init().

_PUBLIC_ NTSTATUS mapiproxy_server_init ( struct dcesrv_context *  dce_ctx)

Initialize mapiproxy servers modules

Parameters
dce_ctxpointer to the connection context
Returns
NT_STATUS_OK on success otherwise NT error

References load_openchange_plugins(), and mapiproxy_server_load().

Referenced by mapiproxy_op_init_server().

_PUBLIC_ bool mapiproxy_server_loaded ( const char *  endpoint)
_PUBLIC_ void* mapiproxy_server_openchange_ldb_init ( struct loadparm_context *  lp_ctx)

Initialize an openchange LDB context available to all mapiproxy instances. This LDB context points on the OpenChange dispatcher database used within emsmdb default provider.

Parameters
lp_ctxpointer to the loadparm context
Note
The memory context is not free'd leading and causes a loss record.
Returns
Allocated LDB context on success, otherwise NULL

References openchange_ldb_ctx, and OPENCHANGE_LDB_NAME.

Referenced by emsmdbp_openchange_ldb_init().

static NTSTATUS mapiproxy_server_overwrite ( TALLOC_CTX *  mem_ctx,
const char *  name,
const char *  endpoint 
)
static
NTSTATUS mapiproxy_server_register ( const void *  _server_module)
NTSTATUS mapiproxy_server_unbind ( struct server_id server_id  ,
uint32_t  context_id 
)

Variable Documentation

TDB_CONTEXT* emsabp_tdb_ctx = NULL
static
void* openchange_ldb_ctx = NULL
static
struct mapiproxy_module_list* server_list = NULL
static
struct server_module * server_modules = NULL
static

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/