MAPIProxy 2.0 API Documentation

- Main Page
- Related Pages
- Data Structures
- Files

- File List
- Globals

Functions
dcesrv_mapiproxy_session.c File Reference

session API for mapiproxy modules More...

`#include "mapiproxy/dcesrv_mapiproxy.h"`
`#include "libmapiproxy.h"`

## 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_session * | mpm_session_init (TALLOC_CTX *mem_ctx, struct dcesrv_call_state *dce_call)
struct mpm_session * | mpm_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

  session | pointer to the mapiproxy module session
  dce_call | pointer to the session context

Returns
  true on success, otherwise false

See Also
  mpm_session_cmp_sub

References mpm_session_cmp_sub().

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

  session | pointer to the mapiproxy module session
  sid | reference to a server_id structure to compare
  context_id | the connection context id to compare

Referenced by mpm_session_cmp().

bool mpm_session_increment_ref_count | ( | struct mpm_session * | session | ) |

Increment the ref_count associated to a session

Parameters

  session | pointer to the session where to increment ref_count

Returns
  true on success, otherwise false

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
| ) |  |
| read

Create and return an allocated pointer to a mpm session

Parameters

  mem_ctx | pointer to the memory context
  dce_call | pointer 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
| ) |  |
| read

Create and return an allocated pointer to a mpm session

Parameters

  mem_ctx | pointer to the memory context
  serverid | reference to the session context server identifier structure
  context_id | reference to the context identifier

Returns
  Pointer to an allocated mpm_session structure on success, otherwise NULL

Referenced by mpm_session_init().

bool mpm_session_release | ( | struct mpm_session * | session | ) |

Release a mapiproxy session context

Parameters

  session | pointer to the mpm session context

Returns
  true on success, otherwise false

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

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

Set the mpm session destructor

Parameters

  session | pointer to the mpm session context
  destructor | pointer to the destructor function

Returns
  true on success, otherwise false

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

  session | pointer to the mpm session context
  private_data | generic pointer on private data

Returns
  true on success, otherwise false

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

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