dcesrv_mapiproxy_session.c File Reference

session API for mapiproxy modules More...

Functions

bool mpm_session_cmp (struct mpm_session *session, struct dcesrv_call_state *dce_call)
 
bool mpm_session_cmp_sub (struct mpm_session *session, struct server_id sid, uint32_t context_id)
 
bool mpm_session_increment_ref_count (struct mpm_session *session)
 
struct mpm_sessionmpm_session_init (TALLOC_CTX *mem_ctx, struct dcesrv_call_state *dce_call)
 
struct mpm_sessionmpm_session_new (TALLOC_CTX *mem_ctx, struct server_id serverid, uint32_t context_id)
 
bool mpm_session_release (struct mpm_session *session)
 
bool mpm_session_set_destructor (struct mpm_session *session, bool(*destructor)(void *))
 
bool mpm_session_set_private_data (struct mpm_session *session, void *private_data)
 

Detailed Description

session API for mapiproxy modules

Function Documentation

bool mpm_session_cmp ( struct mpm_session session,
struct dcesrv_call_state *  dce_call 
)

Compare the mpm session with the session context one

This function is a wrapper on mpm_session_cmp_sub

Parameters
sessionpointer to the mapiproxy module session
dce_callpointer to the session context
Returns
true on success, otherwise false
See Also
mpm_session_cmp_sub

References mpm_session_cmp_sub(), and mpm_session::server_id.

Referenced by cache_dispatch(), cache_pull_OpenAttach(), cache_pull_OpenMessage(), cache_pull_OpenStream(), cache_pull_Release(), cache_push_OpenAttach(), cache_push_OpenMessage(), cache_push_OpenStream(), and cache_push_ReadStream().

bool mpm_session_cmp_sub ( struct mpm_session session,
struct server_id  sid,
uint32_t  context_id 
)

Compare the mpm session with the session context one

Parameters
sessionpointer to the mapiproxy module session
sidreference to a server_id structure to compare
context_idthe connection context id to compare

References mpm_session::context_id, and mpm_session::server_id.

Referenced by cache_unbind(), and mpm_session_cmp().

bool mpm_session_increment_ref_count ( struct mpm_session session)

Increment the ref_count associated to a session

Parameters
sessionpointer to the session where to increment ref_count
Returns
true on success, otherwise false

References mpm_session::ref_count.

Referenced by dcesrv_EcDoConnect(), dcesrv_EcDoConnectEx(), and dcesrv_NspiBind().

struct mpm_session* mpm_session_init ( TALLOC_CTX *  mem_ctx,
struct dcesrv_call_state *  dce_call 
)

Create and return an allocated pointer to a mpm session

Parameters
mem_ctxpointer to the memory context
dce_callpointer to the session context
Returns
Pointer to an allocated mpm_session structure on success, otherwise NULL

References mpm_session_new().

Referenced by cache_pull_OpenAttach(), cache_pull_OpenMessage(), cache_pull_OpenStream(), dcesrv_EcDoConnect(), dcesrv_EcDoConnectEx(), and dcesrv_NspiBind().

struct mpm_session* mpm_session_new ( TALLOC_CTX *  mem_ctx,
struct server_id  serverid,
uint32_t  context_id 
)

Create and return an allocated pointer to a mpm session

Parameters
mem_ctxpointer to the memory context
serveridreference to the session context server identifier structure
context_idreference to the context identifier
Returns
Pointer to an allocated mpm_session structure on success, otherwise NULL

References mpm_session::context_id, mpm_session::destructor, mpm_session::private_data, mpm_session::ref_count, and mpm_session::server_id.

Referenced by mpm_session_init().

bool mpm_session_release ( struct mpm_session session)

Release a mapiproxy session context

Parameters
sessionpointer to the mpm session context
Returns
true on success, otherwise false

References mpm_session::destructor, mpm_session::private_data, and mpm_session::ref_count.

Referenced by cache_pull_Release(), cache_unbind(), dcesrv_EcDoDisconnect(), and dcesrv_NspiUnbind().

bool mpm_session_set_destructor ( struct mpm_session session,
bool(*)(void *)  destructor 
)

Set the mpm session destructor

Parameters
sessionpointer to the mpm session context
destructorpointer to the destructor function
Returns
true on success, otherwise false

References mpm_session::destructor.

Referenced by dcesrv_EcDoConnect(), dcesrv_EcDoConnectEx(), and dcesrv_NspiBind().

bool mpm_session_set_private_data ( struct mpm_session session,
void *  private_data 
)

Set the mpm session pointer on private data

Parameters
sessionpointer to the mpm session context
private_datageneric pointer on private data
Returns
true on success, otherwise false

References mpm_session::private_data.

Referenced by dcesrv_EcDoConnect(), dcesrv_EcDoConnectEx(), and dcesrv_NspiBind().


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/