mapiproxy/libmapiproxy/libmapiproxy.h File Reference
#include <signal.h>
#include <dcerpc_server.h>
#include <talloc.h>
#include <tevent.h>
#include <tdb.h>
#include <dlinklist.h>
#include <fcntl.h>

Data Structures

struct  auth_serversupplied_info
struct  mapi_handles
struct  mapi_handles_context
struct  mapiproxy
struct  mapiproxy_module
struct  mapiproxy_module_list
struct  mpm_session

Defines

#define __BEGIN_DECLS
#define __END_DECLS
#define EMSABP_TDB_NAME   "emsabp_tdb.tdb"
 EMSABP server defines.
#define MAPI_HANDLES_NULL   "null"
#define MAPI_HANDLES_RESERVED   0xFFFFFFFF
#define MAPI_HANDLES_ROOT   "root"
#define OPENCHANGE_LDB_NAME   "openchange.ldb"

Enumerations

enum  mapiproxy_status { MAPIPROXY_DEFAULT = 0x0, MAPIPROXY_CUSTOM = 0x1 }

Functions

enum MAPISTATUS entryid_set_AB_EntryID (TALLOC_CTX *, const char *, struct SBinary_short *)
enum MAPISTATUS entryid_set_folder_EntryID (TALLOC_CTX *, struct GUID *, struct GUID *, uint16_t, uint64_t, struct Binary_r **)
enum MAPISTATUS mapi_handles_add (struct mapi_handles_context *, uint32_t, struct mapi_handles **)
enum MAPISTATUS mapi_handles_delete (struct mapi_handles_context *, uint32_t)
enum MAPISTATUS mapi_handles_get_private_data (struct mapi_handles *, void **)
enum MAPISTATUS mapi_handles_get_systemfolder (struct mapi_handles *, int *)
struct mapi_handles_contextmapi_handles_init (TALLOC_CTX *)
enum MAPISTATUS mapi_handles_release (struct mapi_handles_context *)
enum MAPISTATUS mapi_handles_search (struct mapi_handles_context *, uint32_t, struct mapi_handles **)
enum MAPISTATUS mapi_handles_set_private_data (struct mapi_handles *, void *)
enum MAPISTATUS mapi_handles_set_systemfolder (struct mapi_handles *, int)
struct mapiproxy_modulemapiproxy_module_byname (const char *)
NTSTATUS mapiproxy_module_dispatch (struct dcesrv_call_state *, TALLOC_CTX *, void *, struct mapiproxy *)
NTSTATUS mapiproxy_module_init (struct dcesrv_context *)
NTSTATUS mapiproxy_module_ndr_pull (struct dcesrv_call_state *, TALLOC_CTX *, struct ndr_pull *)
NTSTATUS mapiproxy_module_pull (struct dcesrv_call_state *, TALLOC_CTX *, void *)
NTSTATUS mapiproxy_module_push (struct dcesrv_call_state *, TALLOC_CTX *, void *)
__BEGIN_DECLS NTSTATUS mapiproxy_module_register (const void *)
NTSTATUS mapiproxy_module_unbind (struct server_id, uint32_t)
struct mapiproxy_modulemapiproxy_server_byname (const char *)
struct mapiproxy_modulemapiproxy_server_bystatus (const char *, enum mapiproxy_status)
NTSTATUS mapiproxy_server_dispatch (struct dcesrv_call_state *, TALLOC_CTX *, void *, struct mapiproxy *)
TDB_CONTEXT * mapiproxy_server_emsabp_tdb_init (struct loadparm_context *)
NTSTATUS mapiproxy_server_init (struct dcesrv_context *)
bool mapiproxy_server_loaded (const char *)
void * mapiproxy_server_openchange_ldb_init (struct loadparm_context *)
NTSTATUS mapiproxy_server_register (const void *)
NTSTATUS mapiproxy_server_unbind (struct server_id, uint32_t)
bool mpm_session_cmp (struct mpm_session *, struct dcesrv_call_state *)
bool mpm_session_cmp_sub (struct mpm_session *, struct server_id, uint32_t)
bool mpm_session_increment_ref_count (struct mpm_session *)
struct mpm_sessionmpm_session_init (TALLOC_CTX *, struct dcesrv_call_state *)
struct mpm_sessionmpm_session_new (TALLOC_CTX *, struct server_id, uint32_t)
bool mpm_session_release (struct mpm_session *)
bool mpm_session_set_destructor (struct mpm_session *, bool(*destructor)(void *))
bool mpm_session_set_private_data (struct mpm_session *, void *)
enum MAPISTATUS openchangedb_get_distinguishedName (TALLOC_CTX *, void *, uint64_t, char **)
enum MAPISTATUS openchangedb_get_fid_by_name (void *ldb_ctx, uint64_t, const char *, uint64_t *)
enum MAPISTATUS openchangedb_get_folder_count (void *, uint64_t, uint32_t *)
enum MAPISTATUS openchangedb_get_folder_property (TALLOC_CTX *, void *, char *, uint32_t, uint64_t, void **)
enum MAPISTATUS openchangedb_get_MailboxGuid (void *, char *, struct GUID *)
enum MAPISTATUS openchangedb_get_MailboxReplica (void *, char *, uint16_t *, struct GUID *)
enum MAPISTATUS openchangedb_get_mapistoreURI (TALLOC_CTX *, void *, uint64_t, char **, bool)
enum MAPISTATUS openchangedb_get_new_folderID (void *, uint64_t *)
enum MAPISTATUS openchangedb_get_PublicFolderID (void *, uint32_t, uint64_t *)
enum MAPISTATUS openchangedb_get_PublicFolderReplica (void *, uint16_t *, struct GUID *)
enum MAPISTATUS openchangedb_get_ReceiveFolder (TALLOC_CTX *, void *, const char *, const char *, uint64_t *, const char **)
enum MAPISTATUS openchangedb_get_SystemFolderID (void *, char *, uint32_t, uint64_t *)
enum MAPISTATUS openchangedb_get_table_property (TALLOC_CTX *, void *, char *, char *, uint32_t, uint32_t, void **)
enum MAPISTATUS openchangedb_lookup_folder_property (void *, uint32_t, uint64_t)
const char * openchangedb_property_get_attribute (uint32_t)
enum MAPISTATUS openchangedb_set_ReceiveFolder (TALLOC_CTX *, void *ldb_ctx, const char *, const char *, uint64_t)

Variables

static const uint8_t GUID_NSPI []
 Represents the NSPI Protocol in Permanent Entry IDs.

Define Documentation

#define __BEGIN_DECLS
#define __END_DECLS
#define EMSABP_TDB_NAME   "emsabp_tdb.tdb"

EMSABP server defines.

Referenced by mapiproxy_server_emsabp_tdb_init().

#define MAPI_HANDLES_NULL   "null"
#define MAPI_HANDLES_RESERVED   0xFFFFFFFF
#define MAPI_HANDLES_ROOT   "root"

Referenced by mapi_handles_add().

#define OPENCHANGE_LDB_NAME   "openchange.ldb"

Enumeration Type Documentation

Enumerator:
MAPIPROXY_DEFAULT 
MAPIPROXY_CUSTOM 

Function Documentation

enum MAPISTATUS entryid_set_AB_EntryID ( TALLOC_CTX *  mem_ctx,
const char *  legacyExchangeDN,
struct SBinary_short *  bin 
)

Build an Address Book EntryID from a legacyExchangeDN

Parameters:
mem_ctxpointer to the memory context
legacyExchangeDNthe string to copy into the binary blob
binthe binary blob where the function stores results

References GUID_NSPI.

Referenced by RopGetPropertiesSpecific_Mailbox().

enum MAPISTATUS entryid_set_folder_EntryID ( TALLOC_CTX *  mem_ctx,
struct GUID *  MailboxGuid,
struct GUID *  ReplGuid,
uint16_t  FolderType,
uint64_t  fid,
struct Binary_r **  rbin 
)

Build a folder EntryID

Parameters:
mem_ctxpointer to the memory context
MailboxGuidpointer to the Mailbox Guid
ReplGuidpointer to the Replica Guid
FolderTypethe type of folder
fidthe folder identifier
rbinthe Binary_r structure where the function stores results
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI_E_INVALID_PARAMETER

Referenced by openchangedb_get_folder_special_property().

enum MAPISTATUS mapi_handles_add ( struct mapi_handles_context handles_ctx,
uint32_t  container_handle,
struct mapi_handles **  rec 
)

Add a handles to the database and return a pointer on created record

Parameters:
handles_ctxpointer to the MAPI handles context
container_handlethe container handle if available
recpointer on pointer to the MAPI handle structure the function returns
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error

References mapi_handles::handle, mapi_handles_context::tdb_ctx, MAPI_HANDLES_RESERVED, mapi_handles_traverse_null(), mapi_handles_tdb_update(), mapi_handles_tdb_free(), mapi_handles::parent_handle, mapi_handles::private_data, mapi_handles_context::last_handle, and MAPI_HANDLES_ROOT.

Referenced by EcDoRpc_RopOpenFolder(), EcDoRpc_RopGetHierarchyTable(), EcDoRpc_RopGetContentsTable(), EcDoRpc_RopCreateFolder(), EcDoRpc_RopOpenMessage(), EcDoRpc_RopCreateMessage(), EcDoRpc_RopGetAttachmentTable(), EcDoRpc_RopRegisterNotification(), EcDoRpc_RopGetPermissionsTable(), EcDoRpc_RopOpenStream(), EcDoRpc_RopLogon(), and EcDoRpc_RopGetRulesTable().

enum MAPISTATUS mapi_handles_delete ( struct mapi_handles_context handles_ctx,
uint32_t  handle 
)

Remove the MAPI handle referenced by the handle parameter from the double chained list and mark its associated TDB record as null

Parameters:
handles_ctxpointer to the MAPI handles context
handlethe handle to delete
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error

References mapi_handles_context::tdb_ctx, MAPI_HANDLES_RESERVED, mapi_handles_context::handles, mapi_handles::next, mapi_handles::handle, mapi_handles_tdb_free(), and mapi_handles_traverse_delete().

Referenced by mapi_handles_traverse_delete(), and EcDoRpc_RopRelease().

enum MAPISTATUS mapi_handles_get_systemfolder ( struct mapi_handles ,
int *   
)
struct mapi_handles_context* mapi_handles_init ( TALLOC_CTX *  mem_ctx) [read]

Initialize MAPI handles context

Parameters:
mem_ctxpointer to the memory context
Returns:
Allocated MAPI handles context on success, otherwise NULL

References mapi_handles_context::tdb_ctx, mapi_handles_context::handles, and mapi_handles_context::last_handle.

Referenced by emsmdbp_init().

enum MAPISTATUS mapi_handles_release ( struct mapi_handles_context handles_ctx)

Release MAPI handles context

Parameters:
handles_ctxpointer to the MAPI handles context
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error

References mapi_handles_context::tdb_ctx.

Referenced by emsmdbp_mapi_handles_destructor().

enum MAPISTATUS mapi_handles_set_private_data ( struct mapi_handles handle,
void *  private_data 
)

Set the private data associated to a MAPI handle

Parameters:
handlepointer to the MAPI handle structure
private_datapointer to the private data to associate to the MAPI handle
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error

References mapi_handles::private_data.

Referenced by EcDoRpc_RopOpenFolder(), EcDoRpc_RopGetHierarchyTable(), EcDoRpc_RopGetContentsTable(), EcDoRpc_RopCreateFolder(), EcDoRpc_RopOpenMessage(), EcDoRpc_RopCreateMessage(), EcDoRpc_RopOpenStream(), and EcDoRpc_RopLogon().

enum MAPISTATUS mapi_handles_set_systemfolder ( struct mapi_handles ,
int   
)
struct mapiproxy_module* mapiproxy_module_byname ( const char *  ) [read]

References num_mp_modules, and mp_modules.

Referenced by mapiproxy_module_load().

NTSTATUS mapiproxy_module_dispatch ( struct dcesrv_call_state *  ,
TALLOC_CTX *  ,
void *  ,
struct mapiproxy  
)
NTSTATUS mapiproxy_module_init ( struct dcesrv_context *  )

References mpm, and mapiproxy_module_load().

Referenced by mapiproxy_op_init_server().

NTSTATUS mapiproxy_module_ndr_pull ( struct dcesrv_call_state *  ,
TALLOC_CTX *  ,
struct ndr_pull *   
)
NTSTATUS mapiproxy_module_pull ( struct dcesrv_call_state *  ,
TALLOC_CTX *  ,
void *   
)
NTSTATUS mapiproxy_module_push ( struct dcesrv_call_state *  ,
TALLOC_CTX *  ,
void *   
)
__BEGIN_DECLS NTSTATUS mapiproxy_module_register ( const void *  )
NTSTATUS mapiproxy_module_unbind ( struct server_id  ,
uint32_t   
)
struct mapiproxy_module* mapiproxy_server_byname ( const char *  ) [read]
struct mapiproxy_module* mapiproxy_server_bystatus ( const char *  ,
enum  mapiproxy_status 
) [read]
NTSTATUS mapiproxy_server_dispatch ( struct dcesrv_call_state *  ,
TALLOC_CTX *  ,
void *  ,
struct mapiproxy  
)
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().

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 mapiproxy_server_load().

Referenced by mapiproxy_op_init_server().

bool mapiproxy_server_loaded ( const char *  )
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().

NTSTATUS mapiproxy_server_register ( const void *  )
NTSTATUS mapiproxy_server_unbind ( struct server_id  ,
uint32_t   
)
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 
)

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::server_id, and mpm_session::context_id.

Referenced by mpm_session_cmp(), cache_unbind(), dcesrv_exchange_emsmdb_unbind(), and dcesrv_exchange_nsp_unbind().

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

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_OpenMessage(), cache_pull_OpenAttach(), 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_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::server_id, mpm_session::context_id, mpm_session::ref_count, mpm_session::destructor, and mpm_session::private_data.

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::ref_count, mpm_session::destructor, and mpm_session::private_data.

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

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().

enum MAPISTATUS openchangedb_get_distinguishedName ( TALLOC_CTX *  parent_ctx,
void *  _ldb_ctx,
uint64_t  fid,
char **  distinguishedName 
)

Retrieve the distinguishedName associated to a mailbox system folder.

Parameters:
parent_ctxpointer to the parent memory context
_ldb_ctxpointer to the openchange LDB context
fidthe Folder identifier to search for
distinguishedNamepointer on pointer to the distinguishedName string the function returns
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND

Referenced by openchangedb_set_ReceiveFolder(), EcDoRpc_RopCreateSystemSpecialFolder(), EcDoRpc_RopCreateGenericFolder(), and DoDeleteSystemFolder().

enum MAPISTATUS openchangedb_get_fid_by_name ( void *  _ldb_ctx,
uint64_t  parent_fid,
const char *  foldername,
uint64_t *  fid 
)

Retrieve the folder ID associated with a given folder name

This function looks up the specified foldername (as a PidTagDisplayName) and returns the associated folder ID. Note that folder names are only unique in the context of a parent folder, so the parent folder needs to be provided.

Parameters:
_ldb_ctxpointer to the openchange LDB context
parent_fidthe folder ID of the parent folder
foldernamethe name to look up
fidthe folder ID for the folder with the specified name (0 if not found)
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND

Referenced by EcDoRpc_RopCreateSystemSpecialFolder().

enum MAPISTATUS openchangedb_get_folder_count ( void *  _ldb_ctx,
uint64_t  fid,
uint32_t *  RowCount 
)

Retrieve the number of sub folders for a given fid

Parameters:
_ldb_ctxpointer to the openchange LDB context
fidthe folder identifier to use for the search
RowCountpointer to the returned number of results
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND

Referenced by EcDoRpc_RopGetHierarchyTable().

enum MAPISTATUS openchangedb_get_folder_property ( TALLOC_CTX *  parent_ctx,
void *  _ldb_ctx,
char *  recipient,
uint32_t  proptag,
uint64_t  fid,
void **  data 
)

Retrieve a MAPI property value from a folder record

Parameters:
parent_ctxpointer to the memory context
_ldb_ctxpointer to the openchange LDB context
recipientthe mailbox username
proptagthe MAPI property tag to retrieve value for
fidthe record folder identifier
datapointer on pointer to the data the function returns
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND

References openchangedb_property_get_attribute(), openchangedb_get_folder_special_property(), and openchangedb_get_folder_property_data().

Referenced by RopGetPropertiesSpecific_Mailbox(), and RopGetPropertiesSpecific_SystemSpecialFolder().

enum MAPISTATUS openchangedb_get_MailboxGuid ( void *  _ldb_ctx,
char *  recipient,
struct GUID *  MailboxGUID 
)

Retrieve the mailbox GUID for given recipient from openchange dispatcher database

Parameters:
_ldb_ctxpointer to the OpenChange LDB context
recipientthe mailbox username
MailboxGUIDpointer to the mailbox GUID the function returns
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error

Referenced by openchangedb_get_folder_special_property(), and RopLogon_Mailbox().

enum MAPISTATUS openchangedb_get_MailboxReplica ( void *  _ldb_ctx,
char *  recipient,
uint16_t *  ReplID,
struct GUID *  ReplGUID 
)

Retrieve the mailbox replica identifier and GUID for given recipient from openchange dispatcher database

Parameters:
_ldb_ctxpointer to the OpenChange LDB context
recipientthe mailbox username
ReplIDpointer to the replica identifier the function returns
ReplGUIDpointer to the replica GUID the function returns
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error

Referenced by openchangedb_get_folder_special_property(), and RopLogon_Mailbox().

enum MAPISTATUS openchangedb_get_mapistoreURI ( TALLOC_CTX *  parent_ctx,
void *  _ldb_ctx,
uint64_t  fid,
char **  mapistoreURL,
bool  mailboxstore 
)

Retrieve the mapistore URI associated to a mailbox system folder.

Parameters:
parent_ctxpointer to the memory context
_ldb_ctxpointer to the openchange LDB context
fidthe Folder identifier to search for
mapistoreURLpointer on pointer to the mapistore URI the function returns
mailboxstoreboolean value which defines whether the record has to be searched within Public folders hierarchy or not
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND

Referenced by emsmdbp_object_folder_init().

enum MAPISTATUS openchangedb_get_new_folderID ( void *  _ldb_ctx,
uint64_t *  fid 
)

Return the next available FolderID

Parameters:
_ldb_ctxpointer to the openchange LDB context
fidpointer to the fid value the function returns
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error

Referenced by EcDoRpc_RopCreateSystemSpecialFolder(), EcDoRpc_RopCreateGenericFolder(), and EcDoRpc_RopCreateMessage().

enum MAPISTATUS openchangedb_get_PublicFolderID ( void *  _ldb_ctx,
uint32_t  SystemIdx,
uint64_t *  FolderId 
)

Retrieve the public folder FolderID (fid) for a given folder type

Parameters:
_ldb_ctxpointer to the OpenChange LDB context
SystemIdxthe system folder index
FolderIdpointer to the folder identifier the function returns
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error

Referenced by emsmdbp_object_mailbox_init(), and RopLogon_PublicFolder().

enum MAPISTATUS openchangedb_get_PublicFolderReplica ( void *  _ldb_ctx,
uint16_t *  ReplID,
struct GUID *  ReplGUID 
)

Retrieve the public folder replica identifier and GUID from the openchange dispatcher database

Parameters:
_ldb_ctxpointer to the OpenChange LDB context
ReplIDpointer to the replica identifier the function returns
ReplGUIDpointer to the replica GUID the function returns
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error

Referenced by RopLogon_PublicFolder().

enum MAPISTATUS openchangedb_get_ReceiveFolder ( TALLOC_CTX *  parent_ctx,
void *  _ldb_ctx,
const char *  recipient,
const char *  MessageClass,
uint64_t *  fid,
const char **  ExplicitMessageClass 
)

Retrieve the Explicit message class and Folder identifier associated to the MessageClass search pattern.

Parameters:
parent_ctxpointer to the memory context
_ldb_ctxpointer to the openchange LDB context
recipientpointer to the mailbox's username
MessageClasssubstring to search for
fidpointer to the folder identifier the function returns
ExplicitMessageClasspointer on pointer to the complete message class the function returns
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND

Referenced by RopGetReceiveFolder().

enum MAPISTATUS openchangedb_get_SystemFolderID ( void *  _ldb_ctx,
char *  recipient,
uint32_t  SystemIdx,
uint64_t *  FolderId 
)

Retrieve the mailbox FolderID for given recipient from openchange dispatcher database

Parameters:
_ldb_ctxpointer to the OpenChange LDB context
recipientthe mailbox username
SystemIdxthe system folder index
FolderIdpointer to the folder identifier the function returns
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI error

Referenced by emsmdbp_object_mailbox_init(), and RopLogon_Mailbox().

enum MAPISTATUS openchangedb_get_table_property ( TALLOC_CTX *  parent_ctx,
void *  _ldb_ctx,
char *  recipient,
char *  ldb_filter,
uint32_t  proptag,
uint32_t  pos,
void **  data 
)

Retrieve a MAPI property from a table (ldb search results)

Parameters:
parent_ctxpointer to the memory context
_ldb_ctxpointer to the openchange LDB context
recipientthe mailbox username
ldb_filterthe ldb search string
proptagthe MAPI property tag to retrieve value for
posthe record position in search results
datapointer on pointer to the data the function returns
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND

References openchangedb_property_get_attribute(), openchangedb_get_folder_special_property(), and openchangedb_get_folder_property_data().

Referenced by EcDoRpc_RopQueryRows().

enum MAPISTATUS openchangedb_lookup_folder_property ( void *  _ldb_ctx,
uint32_t  proptag,
uint64_t  fid 
)

Check if a property exists within an openchange dispatcher database record

Parameters:
_ldb_ctxpointer to the openchange LDB context
proptagthe MAPI property tag to lookup
fidthe record folder identifier
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND

References openchangedb_property_get_attribute().

Referenced by RopGetPropertiesSpecific_SystemSpecialFolder().

const char* openchangedb_property_get_attribute ( uint32_t  )
enum MAPISTATUS openchangedb_set_ReceiveFolder ( TALLOC_CTX *  parent_ctx,
void *  _ldb_ctx,
const char *  recipient,
const char *  MessageClass,
uint64_t  fid 
)

Set the receive folder for a specific message class.

Parameters:
parent_ctxpointer to the memory context
_ldb_ctxpointer to the openchange LDB context
recipientpointer to the mailbox's username
MessageClassmessage class (e.g. IPM.whatever) to set
fidfolder identifier for the recipient folder for the message class
Returns:
MAPI_E_SUCCESS on success, otherwise MAPI_E_NOT_FOUND

References openchangedb_get_distinguishedName().

Referenced by RopSetReceiveFolder().


Variable Documentation

const uint8_t GUID_NSPI[] [static]
Initial value:
 {
0xDC, 0xA7, 0x40, 0xC8, 0xC0, 0x42, 0x10, 0x1A, 0xB4, 0xB9,
0x08, 0x00, 0x2B, 0x2F, 0xE1, 0x82
}

Represents the NSPI Protocol in Permanent Entry IDs.

Referenced by entryid_set_AB_EntryID(), and emsabp_set_PermanentEntryID().


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/