OpenChange Dispatcher database routines. More...
#include <inttypes.h>
#include "mapiproxy/dcesrv_mapiproxy.h"
#include "mapiproxy/libmapiproxy/libmapiproxy.h"
#include "mapiproxy/servers/default/emsmdb/dcesrv_exchange_emsmdb.h"
#include "libmapi/libmapi.h"
#include "libmapi/libmapi_private.h"
#include "mapiproxy/libmapiproxy/backends/openchangedb_mysql.h"
#include "mapiproxy/libmapiproxy/backends/openchangedb_ldb.h"
#include "mapiproxy/libmapiproxy/backends/openchangedb_logger.h"
Functions | |
_PUBLIC_ enum MAPISTATUS | openchangedb_create_folder (struct openchangedb_context *oc_ctx, const char *username, uint64_t parentFolderID, uint64_t fid, uint64_t changeNumber, const char *MAPIStoreURI, int systemIdx) |
_PUBLIC_ enum MAPISTATUS | openchangedb_create_mailbox (struct openchangedb_context *oc_ctx, const char *username, const char *organization_name, const char *group_name, uint64_t fid, const char *display_name) |
_PUBLIC_ enum MAPISTATUS | openchangedb_delete_folder (struct openchangedb_context *oc_ctx, const char *username, uint64_t fid) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_distinguishedName (TALLOC_CTX *parent_ctx, struct openchangedb_context *oc_ctx, uint64_t fid, char **distinguishedName) |
FIXME Not used anywhere. More... | |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_fid (struct openchangedb_context *oc_ctx, const char *mapistoreURL, uint64_t *fidp) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_fid_by_name (struct openchangedb_context *oc_ctx, const char *username, uint64_t parent_fid, const char *foldername, uint64_t *fid) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_fid_from_partial_uri (struct openchangedb_context *oc_ctx, const char *partialURI, uint64_t *fid) |
FIXME Not used anywhere, remove it? More... | |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_folder_count (struct openchangedb_context *oc_ctx, const char *username, uint64_t fid, uint32_t *RowCount) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_folder_property (TALLOC_CTX *parent_ctx, struct openchangedb_context *oc_ctx, const char *username, uint32_t proptag, uint64_t fid, void **data) |
_PUBLIC_ const char ** | openchangedb_get_folders_names (TALLOC_CTX *mem_ctx, struct openchangedb_context *oc_ctx, const char *locale, const char *type) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_indexing_url (struct openchangedb_context *oc_ctx, const char *username, const char **indexing_url) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_MailboxGuid (struct openchangedb_context *oc_ctx, const char *recipient, struct GUID *MailboxGUID) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_MailboxReplica (struct openchangedb_context *oc_ctx, const char *recipient, uint16_t *ReplID, struct GUID *ReplGUID) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_mapistoreURI (TALLOC_CTX *parent_ctx, struct openchangedb_context *oc_ctx, const char *username, uint64_t fid, char **mapistoreURL, bool mailboxstore) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_MAPIStoreURIs (struct openchangedb_context *oc_ctx, const char *username, TALLOC_CTX *mem_ctx, struct StringArrayW_r **urisP) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_message_count (struct openchangedb_context *oc_ctx, const char *username, uint64_t fid, uint32_t *RowCount, bool fai) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_mid_by_subject (struct openchangedb_context *oc_ctx, const char *username, uint64_t parent_fid, const char *subject, bool mailboxstore, uint64_t *mid) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_new_changeNumber (struct openchangedb_context *oc_ctx, const char *username, uint64_t *cn) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_new_changeNumbers (struct openchangedb_context *oc_ctx, TALLOC_CTX *mem_ctx, const char *username, uint64_t max, struct UI8Array_r **cns_p) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_new_public_folderID (struct openchangedb_context *oc_ctx, const char *username, uint64_t *fid) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_next_changeNumber (struct openchangedb_context *oc_ctx, const char *username, uint64_t *cn) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_parent_fid (struct openchangedb_context *oc_ctx, const char *username, uint64_t fid, uint64_t *parent_fidp, bool mailboxstore) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_PublicFolderID (struct openchangedb_context *oc_ctx, const char *username, uint32_t SystemIdx, uint64_t *FolderId) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_PublicFolderReplica (struct openchangedb_context *oc_ctx, const char *username, uint16_t *ReplID, struct GUID *ReplGUID) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_ReceiveFolder (TALLOC_CTX *parent_ctx, struct openchangedb_context *oc_ctx, const char *recipient, const char *MessageClass, uint64_t *fid, const char **ExplicitMessageClass) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_ReceiveFolderTable (TALLOC_CTX *mem_ctx, struct openchangedb_context *oc_ctx, const char *recipient, uint32_t *cValues, struct ReceiveFolder **entries) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_SpecialFolderID (struct openchangedb_context *oc_ctx, const char *recipient, uint32_t SystemIdx, uint64_t *FolderId) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_system_idx (struct openchangedb_context *oc_ctx, const char *username, uint64_t fid, int *system_idx_p) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_SystemFolderID (struct openchangedb_context *oc_ctx, const char *recipient, uint32_t SystemIdx, uint64_t *FolderId) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_table_property (TALLOC_CTX *parent_ctx, struct openchangedb_context *oc_ctx, const char *ldb_filter, uint32_t proptag, uint32_t pos, void **data) |
FIXME Not used anywhere, remove it? see mapiproxy/servers/default/emsmdb/emsmdbp_object.c +1712. More... | |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_TransportFolder (struct openchangedb_context *oc_ctx, const char *recipient, uint64_t *FolderId) |
_PUBLIC_ enum MAPISTATUS | openchangedb_get_users_from_partial_uri (TALLOC_CTX *parent_ctx, struct openchangedb_context *oc_ctx, const char *partialURI, uint32_t *count, char ***MAPIStoreURI, char ***users) |
FIXME broken? mailboxDN not saved? More... | |
_PUBLIC_ enum MAPISTATUS | openchangedb_initialize (TALLOC_CTX *mem_ctx, struct loadparm_context *lp_ctx, struct openchangedb_context **oc_ctx) |
_PUBLIC_ bool | openchangedb_is_public_folder_id (struct openchangedb_context *oc_ctx, uint64_t fid) |
_PUBLIC_ enum MAPISTATUS | openchangedb_lookup_folder_property (struct openchangedb_context *oc_ctx, uint32_t proptag, uint64_t fid) |
FIXME Not used anywhere. More... | |
_PUBLIC_ enum MAPISTATUS | openchangedb_set_folder_properties (struct openchangedb_context *oc_ctx, const char *username, uint64_t fid, struct SRow *row) |
_PUBLIC_ char * | openchangedb_set_folder_property_data (TALLOC_CTX *mem_ctx, struct SPropValue *value) |
_PUBLIC_ bool | openchangedb_set_locale (struct openchangedb_context *oc_ctx, const char *username, uint32_t lcid) |
_PUBLIC_ enum MAPISTATUS | openchangedb_set_mapistoreURI (struct openchangedb_context *oc_ctx, const char *username, uint64_t fid, const char *mapistoreURL) |
_PUBLIC_ enum MAPISTATUS | openchangedb_set_ReceiveFolder (struct openchangedb_context *oc_ctx, const char *recipient, const char *MessageClass, uint64_t fid) |
_PUBLIC_ enum MAPISTATUS | openchangedb_set_system_idx (struct openchangedb_context *oc_ctx, const char *username, uint64_t fid, int system_idx) |
_PUBLIC_ enum MAPISTATUS | openchangedb_transaction_commit (struct openchangedb_context *oc_ctx) |
_PUBLIC_ enum MAPISTATUS | openchangedb_transaction_start (struct openchangedb_context *oc_ctx) |
Variables | |
const char * | nil_string = "<nil>" |
OpenChange Dispatcher database routines.
_PUBLIC_ enum MAPISTATUS openchangedb_create_folder | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t | parentFolderID, | ||
uint64_t | fid, | ||
uint64_t | changeNumber, | ||
const char * | MAPIStoreURI, | ||
int | systemIdx | ||
) |
Create a folder in openchangedb
oc_ctx | pointer to the openchange DB context |
username | The name of the mailbox where the parent folder is |
parentFolderID | the FID of the parent folder |
fid | the FID of the folder to create |
changeNumber | the change number |
MAPIStoreURI | the mapistore URI to associate to this folder |
systemIdx | the systemIdx value for the new folder |
Referenced by emsmdbp_mailbox_provision(), and emsmdbp_mailbox_provision_public_freebusy().
_PUBLIC_ enum MAPISTATUS openchangedb_create_mailbox | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
const char * | organization_name, | ||
const char * | group_name, | ||
uint64_t | fid, | ||
const char * | display_name | ||
) |
Create a mailbox in openchangedb
oc_ctx | pointer to the openchange DB context |
username | the owner of the mailbox |
organization_name | name of the organization of the user |
group_name | name of the group where the organization of the user belongs |
fid | The fid used for the mailbox |
display_name | Name of the mailbox |
References EMSMDBP_MAILBOX_ROOT.
Referenced by emsmdbp_mailbox_provision().
_PUBLIC_ enum MAPISTATUS openchangedb_delete_folder | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t | fid | ||
) |
Delete a folder
oc_ctx | pointer to the openchange DB context |
username | mailbox name where the folder is |
fid | the record folder identifier to be deleted |
Referenced by emsmdbp_folder_delete(), emsmdbp_folder_move_folder(), and emsmdbp_mailbox_provision().
_PUBLIC_ enum MAPISTATUS openchangedb_get_distinguishedName | ( | TALLOC_CTX * | parent_ctx, |
struct openchangedb_context * | oc_ctx, | ||
uint64_t | fid, | ||
char ** | distinguishedName | ||
) |
FIXME Not used anywhere.
Remove it? Retrieve the distinguishedName associated to a mailbox system folder.
parent_ctx | pointer to the parent memory context |
oc_ctx | pointer to the openchange DB context |
fid | the Folder identifier to search for |
distinguishedName | pointer on pointer to the distinguishedName string the function returns |
_PUBLIC_ enum MAPISTATUS openchangedb_get_fid | ( | struct openchangedb_context * | oc_ctx, |
const char * | mapistoreURL, | ||
uint64_t * | fidp | ||
) |
Retrieve the fid associated with a mapistore URI.
oc_ctx | pointer to the openchange DB context |
mapistoreURL | mapistore URI to look for |
fidp | pointer to fid the function returns |
Referenced by emsmdbp_get_fid_from_uri(), and emsmdbp_mailbox_provision().
_PUBLIC_ enum MAPISTATUS openchangedb_get_fid_by_name | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
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.
oc_ctx | pointer to the openchange DB context |
username | mailbox name where the folder is |
parent_fid | the folder ID of the parent folder |
foldername | the name to look up |
fid | the folder ID for the folder with the specified name (0 if not found) |
Referenced by emsmdbp_mailbox_provision(), emsmdbp_mailbox_provision_public_freebusy(), emsmdbp_object_create_folder(), and emsmdbp_object_get_fid_by_name().
_PUBLIC_ enum MAPISTATUS openchangedb_get_fid_from_partial_uri | ( | struct openchangedb_context * | oc_ctx, |
const char * | partialURI, | ||
uint64_t * | fid | ||
) |
FIXME Not used anywhere, remove it?
Get fid given a partial MAPIStoreURI
oc_ctx | pointer to the openchange DB context |
partialURI | partial MAPIStoreURI to look for |
fid | pointer on function result for the message class |
_PUBLIC_ enum MAPISTATUS openchangedb_get_folder_count | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t | fid, | ||
uint32_t * | RowCount | ||
) |
Retrieve the number of sub folders for a given fid
oc_ctx | pointer to the openchange DB context |
username | name of the mailbox where the folder is |
fid | the folder identifier to use for the search |
RowCount | pointer to the returned number of results |
Referenced by emsmdbp_object_get_properties_systemspecialfolder().
_PUBLIC_ enum MAPISTATUS openchangedb_get_folder_property | ( | TALLOC_CTX * | parent_ctx, |
struct openchangedb_context * | oc_ctx, | ||
const char * | username, | ||
uint32_t | proptag, | ||
uint64_t | fid, | ||
void ** | data | ||
) |
Retrieve a MAPI property value from a folder record
parent_ctx | pointer to the memory context |
oc_ctx | pointer to the openchange DB context |
username | mailbox name where the folder is |
proptag | the MAPI property tag to retrieve value for |
fid | the record folder identifier |
data | pointer on pointer to the data the function returns |
Referenced by emsmdbp_mailbox_provision(), emsmdbp_object_get_properties_mailbox(), emsmdbp_object_get_properties_mapistore_root(), emsmdbp_object_get_properties_systemspecialfolder(), emsmdbp_object_set_properties(), and oxosfld_is_special_folder().
_PUBLIC_ const char** openchangedb_get_folders_names | ( | TALLOC_CTX * | mem_ctx, |
struct openchangedb_context * | oc_ctx, | ||
const char * | locale, | ||
const char * | type | ||
) |
Get a list of names depending of the locale given as parameter
mem_ctx | context memory where the return value will be allocated |
oc_ctx | pointer to the openchange DB context |
locale | something like en_UK or just en (in that case will be look for any en_* entries) |
type | the table to look for values, it must be either "special_folders" or "folders" |
Referenced by emsmdbp_get_folders_names(), and emsmdbp_get_special_folders().
_PUBLIC_ enum MAPISTATUS openchangedb_get_indexing_url | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
const char ** | indexing_url | ||
) |
Get the indexing url backend for the user given as parameter. The user represents a mailbox. By default a tdb backend file per user will be used in case an error is returned.
oc_ctx | pointer to the openchange DB context |
username | Name of the mailbox |
indexing_url | pointer to the result returned |
_PUBLIC_ enum MAPISTATUS openchangedb_get_MailboxGuid | ( | struct openchangedb_context * | oc_ctx, |
const char * | recipient, | ||
struct GUID * | MailboxGUID | ||
) |
Retrieve the mailbox GUID for given recipient from openchange dispatcher database
oc_ctx | pointer to the OpenChangeDB context |
recipient | the mailbox username |
MailboxGUID | pointer to the mailbox GUID the function returns |
Referenced by emsmdbp_mailbox_provision(), oxosfld_is_special_folder(), and RopLogon_PublicFolder().
_PUBLIC_ enum MAPISTATUS openchangedb_get_MailboxReplica | ( | struct openchangedb_context * | oc_ctx, |
const char * | recipient, | ||
uint16_t * | ReplID, | ||
struct GUID * | ReplGUID | ||
) |
Retrieve the mailbox replica identifier and GUID for given recipient from openchange dispatcher database
oc_ctx | pointer to the OpenChangeDB context |
recipient | the mailbox username |
ReplID | pointer to the replica identifier the function returns |
ReplGUID | pointer to the replica GUID the function returns |
Referenced by EcDoRpc_RopSyncImportDeletes(), EcDoRpc_RopSyncImportHierarchyChange(), EcDoRpc_RopSyncImportMessageChange(), emsmdbp_guid_to_replid(), emsmdbp_mailbox_provision(), emsmdbp_object_synccontext_init(), emsmdbp_replid_to_guid(), emsmdbp_verify_user(), oxcfxics_fill_synccontext_with_messageChange(), oxcfxics_prepare_synccontext_with_folderChange(), oxosfld_is_special_folder(), and RopLogon_PublicFolder().
_PUBLIC_ enum MAPISTATUS openchangedb_get_mapistoreURI | ( | TALLOC_CTX * | parent_ctx, |
struct openchangedb_context * | oc_ctx, | ||
const char * | username, | ||
uint64_t | fid, | ||
char ** | mapistoreURL, | ||
bool | mailboxstore | ||
) |
Retrieve the mapistore URI associated to a mailbox system folder.
parent_ctx | pointer to the memory context |
oc_ctx | pointer to the openchange DB context |
username | current user |
fid | the Folder identifier to search for |
mapistoreURL | pointer on pointer to the mapistore URI the function returns |
mailboxstore | boolean value which defines whether the record has to be searched within Public folders hierarchy or not FIXME mailboxstore always true? remove it? |
Referenced by emsmdbp_folder_delete(), emsmdbp_get_uri_from_fid(), emsmdbp_mailbox_provision(), emsmdbp_object_open_folder(), and emsmdbp_object_set_properties().
_PUBLIC_ enum MAPISTATUS openchangedb_get_MAPIStoreURIs | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
TALLOC_CTX * | mem_ctx, | ||
struct StringArrayW_r ** | urisP | ||
) |
Retrieve a list of mapistore URI in use for a certain user
oc_ctx | pointer to the openchange DB context |
username | the mailbox name |
mem_ctx | memory context where found URIs will be allocated |
urisP | where the Mapistore URIs will be stored |
Referenced by emsmdbp_mailbox_provision().
_PUBLIC_ enum MAPISTATUS openchangedb_get_message_count | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t | fid, | ||
uint32_t * | RowCount, | ||
bool | fai | ||
) |
Retrieve the number of messages within the specified folder
oc_ctx | pointer to the openchange DB context |
username | Name of the mailbox where the folder is |
fid | the folder identifier to use for the search |
RowCount | pointer to the returned number of results |
fai | whether we want to count fai messages or system messages |
Referenced by emsmdbp_folder_open_table().
_PUBLIC_ enum MAPISTATUS openchangedb_get_mid_by_subject | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t | parent_fid, | ||
const char * | subject, | ||
bool | mailboxstore, | ||
uint64_t * | mid | ||
) |
Retrieve the message ID associated with a given subject (normalized)
oc_ctx | pointer to the openchange DB context |
username | mailbox name where the parent folder is |
parent_fid | the folder ID of the parent folder |
subject | the normalized subject to look up |
mailboxstore | whether the folder is under a mailbox or not |
mid | the message ID for the message (0 if not found) |
Referenced by emsmdbp_mailbox_provision_public_freebusy().
_PUBLIC_ enum MAPISTATUS openchangedb_get_new_changeNumber | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t * | cn | ||
) |
Allocates a new change number and returns it
oc_ctx | pointer to the openchange DB context |
username | current user |
cn | pointer to the cn value the function returns |
Referenced by EcDoRpc_RopCreateFolder(), EcDoRpc_RopSyncImportHierarchyChange(), emsmdbp_mailbox_provision(), and emsmdbp_mailbox_provision_public_freebusy().
_PUBLIC_ enum MAPISTATUS openchangedb_get_new_changeNumbers | ( | struct openchangedb_context * | oc_ctx, |
TALLOC_CTX * | mem_ctx, | ||
const char * | username, | ||
uint64_t | max, | ||
struct UI8Array_r ** | cns_p | ||
) |
Allocates a batch of new change numbers and returns them
oc_ctx | pointer to the openchange DB context |
mem_ctx | memory context where the change numbers will be allocated |
username | current user |
max | number of change number to allocate |
cns_p | array of pointers to the change numbers values the function returns |
_PUBLIC_ enum MAPISTATUS openchangedb_get_new_public_folderID | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t * | fid | ||
) |
Retrieve a new folder id for a public folder, only used on cases where the openchangedb backend uses folder ids per user. In that case the public folder ids will still be global, per organization
oc_ctx | pointer to the openchange DB context |
username | The name of the current login user so we can now the current organization where the public folder will be created |
fid | pointer to the returned value |
Referenced by EcDoRpc_RopCreateFolder().
_PUBLIC_ enum MAPISTATUS openchangedb_get_next_changeNumber | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t * | cn | ||
) |
Returns the change number that will be allocated when openchangedb_get_new_changeNumber is next invoked
oc_ctx | pointer to the openchange DB context |
username | current user |
cn | pointer to the cn value the function returns |
_PUBLIC_ enum MAPISTATUS openchangedb_get_parent_fid | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t | fid, | ||
uint64_t * | parent_fidp, | ||
bool | mailboxstore | ||
) |
Retrieve the parent fid associated to a mailbox system folder.
oc_ctx | pointer to the openchange DB context |
username | the mailbox name |
fid | the Folder identifier to search for |
parent_fidp | pointer to the parent_fid the function returns |
mailboxstore | boolean value which defines whether the record has to be searched within Public folders hierarchy or not |
Referenced by emsmdbp_object_open_folder().
_PUBLIC_ enum MAPISTATUS openchangedb_get_PublicFolderID | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint32_t | SystemIdx, | ||
uint64_t * | FolderId | ||
) |
Retrieve the public folder FolderID (fid) for a given folder type
oc_ctx | pointer to the OpenChangeDB context |
username | current user |
SystemIdx | the system folder index |
FolderId | pointer to the folder identifier the function returns |
Referenced by emsmdbp_mailbox_provision_public_freebusy(), and emsmdbp_object_mailbox_init().
_PUBLIC_ enum MAPISTATUS openchangedb_get_PublicFolderReplica | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint16_t * | ReplID, | ||
struct GUID * | ReplGUID | ||
) |
Retrieve the public folder replica identifier and GUID from the openchange dispatcher database
oc_ctx | pointer to the OpenChangeDB context |
username | current user |
ReplID | pointer to the replica identifier the function returns |
ReplGUID | pointer to the replica GUID the function returns |
_PUBLIC_ enum MAPISTATUS openchangedb_get_ReceiveFolder | ( | TALLOC_CTX * | parent_ctx, |
struct openchangedb_context * | oc_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.
parent_ctx | pointer to the memory context |
oc_ctx | pointer to the openchange DB context |
recipient | pointer to the mailbox's username |
MessageClass | substring to search for |
fid | pointer to the folder identifier the function returns |
ExplicitMessageClass | pointer on pointer to the complete message class the function returns |
_PUBLIC_ enum MAPISTATUS openchangedb_get_ReceiveFolderTable | ( | TALLOC_CTX * | mem_ctx, |
struct openchangedb_context * | oc_ctx, | ||
const char * | recipient, | ||
uint32_t * | cValues, | ||
struct ReceiveFolder ** | entries | ||
) |
Retrieve the list of receive folder identifier, message class along with latest modification time for the mailbox of the user.
mem_ctx | pointer to the memory context |
oc_ctx | pointer to the openchange DB context |
recipient | pointer to the mailbox's username |
cValues | pointer to the number of ReceiveFolder records the function returns |
entries | pointer on pointer to the list of ReceiveFolder structure to return |
_PUBLIC_ enum MAPISTATUS openchangedb_get_SpecialFolderID | ( | struct openchangedb_context * | oc_ctx, |
const char * | recipient, | ||
uint32_t | SystemIdx, | ||
uint64_t * | FolderId | ||
) |
Retrieve the folder id of a special folder with the specific SystemIdx for given recipient from openchange dispatcher database.
oc_ctx | pointer to the OpenChangeDB context |
recipient | the mailbox username |
SystemIdx | the system folder index |
FolderId | pointer to the folder identifier the function returns |
Referenced by emsmdbp_mailbox_provision().
_PUBLIC_ enum MAPISTATUS openchangedb_get_system_idx | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t | fid, | ||
int * | system_idx_p | ||
) |
Retrieve the system idx associated with a folder record
oc_ctx | pointer to the openchange DB context |
username | the name of the mailbox where the folder is |
fid | the folder identifier to use for the search |
system_idx_p | pointer to the returned value |
Referenced by emsmdbp_folder_move_folder(), and oxosfld_is_special_folder().
_PUBLIC_ enum MAPISTATUS openchangedb_get_SystemFolderID | ( | struct openchangedb_context * | oc_ctx, |
const char * | recipient, | ||
uint32_t | SystemIdx, | ||
uint64_t * | FolderId | ||
) |
Retrieve the mailbox FolderID for given recipient from openchange dispatcher database
oc_ctx | pointer to the OpenChangeDB context |
recipient | the mailbox username |
SystemIdx | the system folder index |
FolderId | pointer to the folder identifier the function returns |
Referenced by emsmdbp_mailbox_provision(), emsmdbp_object_mailbox_init(), oxosfld_is_special_folder(), and RopLogon_PublicFolder().
_PUBLIC_ enum MAPISTATUS openchangedb_get_table_property | ( | TALLOC_CTX * | parent_ctx, |
struct openchangedb_context * | oc_ctx, | ||
const char * | ldb_filter, | ||
uint32_t | proptag, | ||
uint32_t | pos, | ||
void ** | data | ||
) |
FIXME Not used anywhere, remove it? see mapiproxy/servers/default/emsmdb/emsmdbp_object.c +1712.
Retrieve a MAPI property from a table (ldb search results)
parent_ctx | pointer to the memory context |
oc_ctx | pointer to the openchange DB context |
ldb_filter | the ldb search string |
proptag | the MAPI property tag to retrieve value for |
pos | the record position in search results |
data | pointer on pointer to the data the function returns |
_PUBLIC_ enum MAPISTATUS openchangedb_get_TransportFolder | ( | struct openchangedb_context * | oc_ctx, |
const char * | recipient, | ||
uint64_t * | FolderId | ||
) |
Retrieve the Transport Folder FolderID for given recipient from openchange dispatcher database
oc_ctx | pointer to the OpenChangeDB context |
recipient | the mailbox username |
FolderId | pointer to the folder identifier the function returns |
Referenced by EcDoRpc_RopGetTransportFolder().
_PUBLIC_ enum MAPISTATUS openchangedb_get_users_from_partial_uri | ( | TALLOC_CTX * | parent_ctx, |
struct openchangedb_context * | oc_ctx, | ||
const char * | partialURI, | ||
uint32_t * | count, | ||
char *** | MAPIStoreURI, | ||
char *** | users | ||
) |
FIXME broken? mailboxDN not saved?
Get users given a partial MAPIStoreURI
parent_ctx | memory context |
oc_ctx | pointer to the openchange DB context |
partialURI | partial MAPIStoreURI to look for |
count | number of users found |
MAPIStoreURI | MAPIStoreURIs of the users found from the partial MAPIStoreURI |
users | name of the mailboxes found from the partial MAPIStoreURI |
_PUBLIC_ enum MAPISTATUS openchangedb_initialize | ( | TALLOC_CTX * | mem_ctx, |
struct loadparm_context * | lp_ctx, | ||
struct openchangedb_context ** | oc_ctx | ||
) |
Referenced by mapiproxy_server_openchangedb_init().
_PUBLIC_ bool openchangedb_is_public_folder_id | ( | struct openchangedb_context * | oc_ctx, |
uint64_t | fid | ||
) |
Whether the current openchangedb backend uses folder ids per user and the given folder id as parameter belongs to a public folder id (which have global folder ids in an organization)
oc_ctx | pointer to the openchange DB context |
fid | folder id to identify if belongs to a either public or system folder |
Referenced by EcDoRpc_RopCreateFolder().
_PUBLIC_ enum MAPISTATUS openchangedb_lookup_folder_property | ( | struct openchangedb_context * | oc_ctx, |
uint32_t | proptag, | ||
uint64_t | fid | ||
) |
FIXME Not used anywhere.
Remove it? Check if a property exists within an openchange dispatcher database record
oc_ctx | pointer to the openchange DB context |
proptag | the MAPI property tag to lookup |
fid | the record folder identifier |
_PUBLIC_ enum MAPISTATUS openchangedb_set_folder_properties | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t | fid, | ||
struct SRow * | row | ||
) |
Set a MAPI property value from a folder record
oc_ctx | pointer to the openchange DB context |
username | name of the mailbox where the folder is |
fid | the record folder identifier |
row | the MAPI property to set |
Referenced by emsmdbp_mailbox_provision(), and emsmdbp_object_set_properties().
_PUBLIC_ char* openchangedb_set_folder_property_data | ( | TALLOC_CTX * | mem_ctx, |
struct SPropValue * | value | ||
) |
Build a MAPI property suitable for a OpenChange LDB message
mem_ctx | pointer to the memory context |
value | the MAPI property |
References nil_string.
_PUBLIC_ bool openchangedb_set_locale | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint32_t | lcid | ||
) |
Set the current locale of the mailbox
oc_ctx | pointer to the openchange DB context |
username | Name of the mailbox |
lcid | language id |
Referenced by emsmdbp_mailbox_provision().
_PUBLIC_ enum MAPISTATUS openchangedb_set_mapistoreURI | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t | fid, | ||
const char * | mapistoreURL | ||
) |
Store the mapistore URI associated to a mailbox system folder.
oc_ctx | pointer to the openchange DB context |
username | current user |
fid | the Folder identifier to search for |
mapistoreURL | The mapistore URI to set |
Referenced by emsmdbp_mailbox_provision(), and emsmdbp_object_set_properties().
_PUBLIC_ enum MAPISTATUS openchangedb_set_ReceiveFolder | ( | struct openchangedb_context * | oc_ctx, |
const char * | recipient, | ||
const char * | MessageClass, | ||
uint64_t | fid | ||
) |
Set the receive folder for a specific message class.
oc_ctx | pointer to the openchange DB context |
recipient | pointer to the mailbox's username |
MessageClass | message class (e.g. IPM.whatever) to set |
fid | folder identifier for the recipient folder for the message class |
Referenced by emsmdbp_mailbox_provision().
_PUBLIC_ enum MAPISTATUS openchangedb_set_system_idx | ( | struct openchangedb_context * | oc_ctx, |
const char * | username, | ||
uint64_t | fid, | ||
int | system_idx | ||
) |
Store the system index associated to a mailbox system folder.
oc_ctx | pointer to the openchange DB context |
username | current user |
fid | the Folder identifier to search for |
system_idx | the system index |
Referenced by emsmdbp_mailbox_provision().
_PUBLIC_ enum MAPISTATUS openchangedb_transaction_commit | ( | struct openchangedb_context * | oc_ctx | ) |
Referenced by emsmdbp_mailbox_provision().
_PUBLIC_ enum MAPISTATUS openchangedb_transaction_start | ( | struct openchangedb_context * | oc_ctx | ) |
Referenced by emsmdbp_mailbox_provision().
const char* nil_string = "<nil>" |
Referenced by openchangedb_set_folder_property_data().
![]() ![]() ![]() |
This content is licensed under the Creative Commons Attribution ShareAlike License v. 3.0: http://creativecommons.org/licenses/by-sa/3.0/ |