EMSMDB stack functions. More...
#include <unistd.h>
#include <fcntl.h>
#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"
Functions | |
enum MAPISTATUS | emsmdb_async_connect (struct emsmdb_context *emsmdb_ctx) |
struct mapi_notify_ctx * | emsmdb_bind_notification (struct mapi_context *mapi_ctx, TALLOC_CTX *mem_ctx) |
struct emsmdb_context * | emsmdb_connect (TALLOC_CTX *parent_mem_ctx, struct mapi_session *session, struct dcerpc_pipe *p, struct cli_credentials *cred, int *return_value) |
struct emsmdb_context * | emsmdb_connect_ex (TALLOC_CTX *mem_ctx, struct mapi_session *session, struct dcerpc_pipe *p, struct cli_credentials *cred, int *return_value) |
enum MAPISTATUS | emsmdb_disconnect (struct emsmdb_context *emsmdb_ctx) |
int | emsmdb_disconnect_dtor (void *data) |
_PUBLIC_ struct emsmdb_info * | emsmdb_get_info (struct mapi_session *session) |
enum MAPISTATUS | emsmdb_get_SPropValue (TALLOC_CTX *mem_ctx, DATA_BLOB *content, struct SPropTagArray *tags, struct SPropValue **propvals, uint32_t *cn_propvals, uint8_t flag) |
void | emsmdb_get_SRow (TALLOC_CTX *mem_ctx, struct SRow *aRow, struct SPropTagArray *proptags, uint16_t propcount, DATA_BLOB *content, uint8_t flag, uint8_t align) |
_PUBLIC_ void | emsmdb_get_SRowSet (TALLOC_CTX *mem_ctx, struct SRowSet *rowset, struct SPropTagArray *proptags, DATA_BLOB *content) |
NTSTATUS | emsmdb_register_notification (struct mapi_session *session, struct NOTIFKEY *notifkey) |
_PUBLIC_ NTSTATUS | emsmdb_transaction (struct emsmdb_context *emsmdb_ctx, TALLOC_CTX *mem_ctx, struct mapi_request *req, struct mapi_response **repl) |
_PUBLIC_ NTSTATUS | emsmdb_transaction_ext2 (struct emsmdb_context *emsmdb_ctx, TALLOC_CTX *mem_ctx, struct mapi_request *req, struct mapi_response **repl) |
_PUBLIC_ NTSTATUS | emsmdb_transaction_null (struct emsmdb_context *emsmdb_ctx, struct mapi_response **res) |
void | free_emsmdb_property (struct SPropValue *lpProp, void *data) |
const void * | pull_emsmdb_property (TALLOC_CTX *mem_ctx, uint32_t *offset, enum MAPITAGS tag, DATA_BLOB *data) |
EMSMDB stack functions.
enum MAPISTATUS emsmdb_async_connect | ( | struct emsmdb_context * | emsmdb_ctx | ) |
Get an async notification context handle
emsmdb_ctx | pointer to the EMSMDB context |
Referenced by RfrGetFQDNFromLegacyDN().
struct mapi_notify_ctx* emsmdb_bind_notification | ( | struct mapi_context * | mapi_ctx, |
TALLOC_CTX * | mem_ctx | ||
) |
Initialize the notify context structure and bind a local UDP port to receive notifications from the server
mapi_ctx | pointer to the MAPI context |
mem_ctx | pointer to the memory context |
Referenced by RegisterNotification().
struct emsmdb_context* emsmdb_connect | ( | TALLOC_CTX * | parent_mem_ctx, |
struct mapi_session * | session, | ||
struct dcerpc_pipe * | p, | ||
struct cli_credentials * | cred, | ||
int * | return_value | ||
) |
Establishes a new Session Context with the server on the exchange_emsmdb pipe
parent_mem_ctx | pointer to the memory context |
session | pointer to the MAPI session context |
p | pointer to the DCERPC pipe |
cred | pointer to the user credentials |
return_value | pointer on EcDoConnect MAPI return value |
Referenced by RfrGetFQDNFromLegacyDN().
struct emsmdb_context* emsmdb_connect_ex | ( | TALLOC_CTX * | mem_ctx, |
struct mapi_session * | session, | ||
struct dcerpc_pipe * | p, | ||
struct cli_credentials * | cred, | ||
int * | return_value | ||
) |
Establishes a new Session Context with the server on the exchange_emsmdb pipe using 0xA EcDoConnectEx opnum
mem_ctx | pointer to the memory context |
session | pointer to the MAPI session context |
p | pointer to the DCERPC pipe |
cred | pointer to the user credentials |
return_value | pointer on EcDoConnectEx MAPI return value |
Referenced by RfrGetFQDNFromLegacyDN().
enum MAPISTATUS emsmdb_disconnect | ( | struct emsmdb_context * | emsmdb_ctx | ) |
Destroy the EMSMDB context handle
emsmdb_ctx | pointer to the EMSMDB context |
Referenced by emsmdb_disconnect_dtor().
int emsmdb_disconnect_dtor | ( | void * | data | ) |
Destructor for the EMSMDB context. Call the EcDoDisconnect function.
data | generic pointer to data with mapi_provider information |
References emsmdb_disconnect().
Referenced by MapiLogonProvider().
_PUBLIC_ struct emsmdb_info* emsmdb_get_info | ( | struct mapi_session * | session | ) |
Retrieves the EMSMDB context server information structure
session | pointer to the MAPI session context |
enum MAPISTATUS emsmdb_get_SPropValue | ( | TALLOC_CTX * | mem_ctx, |
DATA_BLOB * | content, | ||
struct SPropTagArray * | tags, | ||
struct SPropValue ** | propvals, | ||
uint32_t * | cn_propvals, | ||
uint8_t | flag | ||
) |
Get a SPropValue array from a DATA blob
mem_ctx | pointer to the memory context |
content | pointer to the DATA blob content |
tags | pointer to a list of property tags to lookup |
propvals | pointer on pointer to the returned SPropValues |
cn_propvals | pointer to the number of propvals |
flag | describes the type data |
References free_emsmdb_property(), and pull_emsmdb_property().
Referenced by GetProps().
void emsmdb_get_SRow | ( | TALLOC_CTX * | mem_ctx, |
struct SRow * | aRow, | ||
struct SPropTagArray * | proptags, | ||
uint16_t | propcount, | ||
DATA_BLOB * | content, | ||
uint8_t | flag, | ||
uint8_t | align | ||
) |
Get a SRow from a DATA blob
mem_ctx | pointer on the memory context |
aRow | pointer on the returned SRow |
proptags | pointer on a list of property tags to lookup |
propcount | number of SPropValue entries in aRow |
content | pointer on the DATA blob content |
flag | the type data |
align | alignment pad |
References free_emsmdb_property(), and pull_emsmdb_property().
Referenced by OpenEmbeddedMessage(), OpenMessage(), and ReloadCachedInformation().
_PUBLIC_ void emsmdb_get_SRowSet | ( | TALLOC_CTX * | mem_ctx, |
struct SRowSet * | rowset, | ||
struct SPropTagArray * | proptags, | ||
DATA_BLOB * | content | ||
) |
Get a SRowSet from a DATA blob
mem_ctx | pointer on the memory context |
rowset | pointer on the returned SRowSe |
proptags | pointer on a list of property tags to lookup |
content | pointer on the DATA blob content |
References free_emsmdb_property(), and pull_emsmdb_property().
Referenced by ExpandRow(), FindRow(), and QueryRows().
NTSTATUS emsmdb_register_notification | ( | struct mapi_session * | session, |
struct NOTIFKEY * | notifkey | ||
) |
Register for notifications on the server
session | Pointer to the current MAPI session |
notifkey | The opaque client-generated context data |
Referenced by RegisterNotification().
_PUBLIC_ NTSTATUS emsmdb_transaction | ( | struct emsmdb_context * | emsmdb_ctx, |
TALLOC_CTX * | mem_ctx, | ||
struct mapi_request * | req, | ||
struct mapi_response ** | repl | ||
) |
Make a EMSMDB transaction.
emsmdb_ctx | pointer to the EMSMDB connection context |
mem_ctx | pointer to the memory context |
req | pointer to the MAPI request to send |
repl | pointer on pointer to the MAPI reply returned by the server |
Referenced by emsmdb_transaction_ext2().
_PUBLIC_ NTSTATUS emsmdb_transaction_ext2 | ( | struct emsmdb_context * | emsmdb_ctx, |
TALLOC_CTX * | mem_ctx, | ||
struct mapi_request * | req, | ||
struct mapi_response ** | repl | ||
) |
Make a EMSMDB EXT2 transaction.
emsmdb_ctx | pointer to the EMSMDB connection context |
mem_ctx | pointer to the memory context |
req | pointer to the MAPI request to send |
repl | pointer on pointer to the MAPI reply returned by the server |
References emsmdb_transaction().
_PUBLIC_ NTSTATUS emsmdb_transaction_null | ( | struct emsmdb_context * | emsmdb_ctx, |
struct mapi_response ** | res | ||
) |
Send an empty MAPI packet - useful to keep connection up or force notifications.
emsmdb_ctx | pointer to the EMSMDB connection context |
res | pointer on pointer to a MAPI response structure |
Referenced by DispatchNotifications(), and MonitorNotification().
void free_emsmdb_property | ( | struct SPropValue * | lpProp, |
void * | data | ||
) |
Free property values retrieved with pull_emsmdb_property
lpProp | pointer to SPropValue structure |
data | generic pointer to associated lpProp data |
Referenced by emsmdb_get_SPropValue(), emsmdb_get_SRow(), and emsmdb_get_SRowSet().
const void* pull_emsmdb_property | ( | TALLOC_CTX * | mem_ctx, |
uint32_t * | offset, | ||
enum MAPITAGS | tag, | ||
DATA_BLOB * | data | ||
) |
Retrieves a property value from a DATA blob
mem_ctx | pointer to the memory context |
offset | pointer on pointer to the current offset |
tag | the property tag which value is to be retrieved |
data | pointer to the data |
Referenced by emsmdb_get_SPropValue(), emsmdb_get_SRow(), and emsmdb_get_SRowSet().
![]() ![]() ![]() |
This content is licensed under the Creative Commons Attribution ShareAlike License v. 3.0: http://creativecommons.org/licenses/by-sa/3.0/ |