Poster of Linux kernelThe best gift for a Linux geek
mapiproxy/libmapistore/mapistore.h

mapiproxy/libmapistore/mapistore.h

Section: OpenChange mapistore library (3) Updated: Thu Feb 24 2011
Local index Up
 

NAME

mapiproxy/libmapistore/mapistore.h -

MAPISTORE general API.

 

SYNOPSIS


#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
#include <unistd.h>
#include <stdint.h>
#include <stdbool.h>
#include <tdb.h>
#include <ldb.h>
#include <talloc.h>
#include <util/debug.h>
#include 'libmapi/libmapi.h'
#include 'mapistore_defs.h'

 

Functions


enum MAPISTORE_ERROR mapistore_add_context (struct mapistore_context *, const char *, uint32_t *)

enum MAPISTORE_ERROR mapistore_add_context_indexing (struct mapistore_context *, const char *, uint32_t)

enum MAPISTORE_ERROR mapistore_add_context_ref_count (struct mapistore_context *, uint32_t)

const char * mapistore_backend_get_installdir (void)

init_backend_fn * mapistore_backend_load (TALLOC_CTX *, const char *)

struct backend_context * mapistore_backend_lookup (struct backend_context_list *, uint32_t)

struct backend_context * mapistore_backend_lookup_by_uri (struct backend_context_list *, const char *)

bool mapistore_backend_run_init (init_backend_fn *)

enum MAPISTORE_ERROR mapistore_closedir (struct mapistore_context *mstore_ctx, uint32_t, uint64_t)

enum MAPISTORE_ERROR mapistore_createmessage (struct mapistore_context *, uint32_t, uint64_t, uint64_t)

enum MAPISTORE_ERROR mapistore_del_context (struct mapistore_context *, uint32_t)

enum MAPISTORE_ERROR mapistore_deletemessage (struct mapistore_context *, uint32_t, uint64_t, enum MAPISTORE_DELETION_TYPE)

const char * mapistore_errstr (enum MAPISTORE_ERROR)

enum MAPISTORE_ERROR mapistore_get_fid_by_name (struct mapistore_context *, uint32_t, uint64_t, const char *, uint64_t *)

enum MAPISTORE_ERROR mapistore_get_folder_count (struct mapistore_context *, uint32_t, uint64_t, uint32_t *)

enum MAPISTORE_ERROR mapistore_get_message_count (struct mapistore_context *, uint32_t, uint64_t, uint32_t *)

enum MAPISTORE_ERROR mapistore_get_table_property (struct mapistore_context *, uint32_t, enum MAPISTORE_TABLE_TYPE, uint64_t, enum MAPITAGS, uint32_t, void **)

enum MAPISTORE_ERROR mapistore_getprops (struct mapistore_context *, uint32_t, uint64_t, uint8_t, struct SPropTagArray *, struct SRow *)

enum MAPISTORE_ERROR mapistore_indexing_add (struct mapistore_context *, const char *)

enum MAPISTORE_ERROR mapistore_indexing_del (struct mapistore_context *, const char *)

enum MAPISTORE_ERROR mapistore_indexing_get_folder_list (struct mapistore_context *, const char *, uint64_t, struct indexing_folders_list **)

enum MAPISTORE_ERROR mapistore_indexing_record_add_fid (struct mapistore_context *, uint32_t, uint64_t)

enum MAPISTORE_ERROR mapistore_indexing_record_add_mid (struct mapistore_context *, uint32_t, uint64_t)

enum MAPISTORE_ERROR mapistore_indexing_record_del_fid (struct mapistore_context *, uint32_t, uint64_t, enum MAPISTORE_DELETION_TYPE)

enum MAPISTORE_ERROR mapistore_indexing_record_del_mid (struct mapistore_context *, uint32_t, uint64_t, enum MAPISTORE_DELETION_TYPE)

__BEGIN_DECLS struct mapistore_context * mapistore_init (TALLOC_CTX *, const char *)

enum MAPISTORE_ERROR mapistore_mkdir (struct mapistore_context *, uint32_t, uint64_t, uint64_t, struct SRow *)

int mapistore_namedprops_get_mapped_id (void *ldb_ctx, struct MAPINAMEID, uint16_t *)

enum MAPISTORE_ERROR mapistore_opendir (struct mapistore_context *, uint32_t, uint64_t, uint64_t)

enum MAPISTORE_ERROR mapistore_openmessage (struct mapistore_context *, uint32_t, uint64_t, uint64_t, struct mapistore_message *)

enum MAPISTORE_ERROR mapistore_release (struct mapistore_context *)

enum MAPISTORE_ERROR mapistore_release_record (struct mapistore_context *, uint32_t, uint64_t, uint8_t)

enum MAPISTORE_ERROR mapistore_rmdir (struct mapistore_context *, uint32_t, uint64_t, uint64_t, uint8_t)

enum MAPISTORE_ERROR mapistore_savechangesmessage (struct mapistore_context *, uint32_t, uint64_t, uint8_t)

enum MAPISTORE_ERROR mapistore_search_context_by_uri (struct mapistore_context *, const char *, uint32_t *)

enum MAPISTORE_ERROR mapistore_set_database_path (const char *)

enum MAPISTORE_ERROR mapistore_set_mapping_path (const char *)

enum MAPISTORE_ERROR mapistore_setprops (struct mapistore_context *, uint32_t, uint64_t, uint8_t, struct SRow *)

enum MAPISTORE_ERROR mapistore_submitmessage (struct mapistore_context *, uint32_t, uint64_t, uint8_t)

void mapistoredb_dump_conf (struct mapistoredb_context *)

const char * mapistoredb_get_firstorg (struct mapistoredb_context *)

const char * mapistoredb_get_firstou (struct mapistoredb_context *)

enum MAPISTORE_ERROR mapistoredb_get_mapistore_uri (struct mapistoredb_context *, enum MAPISTORE_DFLT_FOLDERS, const char *, const char *, char **)

const char * mapistoredb_get_netbiosname (struct mapistoredb_context *)

enum MAPISTORE_ERROR mapistoredb_get_new_allocation_range (struct mapistoredb_context *, uint64_t, uint64_t *, uint64_t *)

enum MAPISTORE_ERROR mapistoredb_get_new_fmid (struct mapistoredb_context *, uint64_t *)

struct mapistoredb_context * mapistoredb_init (TALLOC_CTX *, const char *)

enum MAPISTORE_ERROR mapistoredb_provision (struct mapistoredb_context *)

void mapistoredb_release (struct mapistoredb_context *)

enum MAPISTORE_ERROR mapistoredb_set_firstorg (struct mapistoredb_context *, const char *)

enum MAPISTORE_ERROR mapistoredb_set_firstou (struct mapistoredb_context *, const char *)

enum MAPISTORE_ERROR mapistoredb_set_netbiosname (struct mapistoredb_context *, const char *)
 

Detailed Description

MAPISTORE general API.

This header contains general functions, primarily for users of the store (rather than storage providers).  

Function Documentation

 

enum MAPISTORE_ERROR mapistore_add_context (struct mapistore_context *mstore_ctx, const char *uri, uint32_t *context_id)Add a new connection context to mapistore

Parameters:

mstore_ctx pointer to the mapistore context
uri the connection context URI
context_id pointer to the context identifier the function returns

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References mapistore_backend_create_context(), MAPISTORE_ERR_CONTEXT_FAILED, MAPISTORE_ERR_INVALID_NAMESPACE, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_add_context_indexing (struct mapistore_context *mstore_ctx, const char *username, uint32_tcontext_id)Associate an indexing context to a mapistore context

Parameters:

mstore_ctx pointer to the mapistore context
username account name referencing the indexing record
context_id the context identifier referencing the context to alter

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, mapistore_indexing_add_ref_count(), mapistore_indexing_search(), and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_add_context_ref_count (struct mapistore_context *mstore_ctx, uint32_tcontext_id)Increase the reference counter of an existing context

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the context to update

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References mapistore_backend_add_ref_count(), mapistore_backend_lookup(), and MAPISTORE_ERR_INVALID_PARAMETER.  

const char* mapistore_backend_get_installdir (void)Return the full path where mapistore backends are installed.

Returns:

Pointer to the full path where backends are installed.

Referenced by mapistore_backend_load().  

init_backend_fn* mapistore_backend_load (TALLOC_CTX *mem_ctx, const char *path)Load the initialization functions from backends DSO

Parameters:

mem_ctx pointer to the memory context
path pointer to the backend's DSO folder

Returns:

allocated array of functions pointers to initialization functions on success, otherwise NULL.

References mapistore_backend_get_installdir().

Referenced by mapistore_backend_init().  

struct backend_context* mapistore_backend_lookup (struct backend_context_list *backend_list_ctx, uint32_tcontext_id) [read]find the context matching given context identifier

Parameters:

backend_list_ctx pointer to the backend context list
context_id the context identifier to search

Returns:

Pointer to the mapistore_backend context on success, otherwise NULL

Referenced by mapistore_add_context_indexing(), mapistore_add_context_ref_count(), mapistore_closedir(), mapistore_createmessage(), mapistore_del_context(), mapistore_deletemessage(), mapistore_get_child_fids(), mapistore_get_fid_by_name(), mapistore_get_folder_count(), mapistore_get_message_count(), mapistore_get_table_property(), mapistore_getprops(), mapistore_indexing_record_add_fmid(), mapistore_indexing_record_del_fmid(), mapistore_mkdir(), mapistore_opendir(), mapistore_openmessage(), mapistore_release_record(), mapistore_rmdir(), mapistore_savechangesmessage(), mapistore_setprops(), and mapistore_submitmessage().  

struct backend_context* mapistore_backend_lookup_by_uri (struct backend_context_list *backend_list_ctx, const char *uri) [read]find the context matching given uri string

Parameters:

backend_list_ctx pointer to the backend context list
uri the uri string to search

Returns:

Pointer to the mapistore_backend context on success, otherwise NULL

Referenced by mapistore_search_context_by_uri().  

bool mapistore_backend_run_init (init_backend_fn *fns)Run specified initialization functions.

Parameters:

fns pointer to an array of mapistore backends initialization functions

Returns:

true on success, otherwise false

Referenced by mapistore_backend_init().  

enum MAPISTORE_ERROR mapistore_closedir (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfid)Close a directory in mapistore

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend where the directory has to be closed/released
fid the folder identifier referencing the folder to close

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_createmessage (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tparent_fid, uint64_tmid)Create a message in mapistore

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend where the messagewill be created
parent_fid the parent folder identifier
mid the message identifier to create

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_del_context (struct mapistore_context *mstore_ctx, uint32_tcontext_id)Delete an existing connection context from mapistore

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the context to delete

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References mapistore_backend_delete_context(), mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, MAPISTORE_ERR_REF_COUNT, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_deletemessage (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tmid, enum MAPISTORE_DELETION_TYPEdeletion_type)Delete a message from mapistore

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend where the message's to be located is stored
mid the message identifier of the folder to delete
deletion_type the type of deletion (MAPISTORE_SOFT_DELETE or MAPISTORE_PERMANENT_DELETE)

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_SUCCESS.  

const char* mapistore_errstr (enum MAPISTORE_ERRORmapistore_err)return a string explaining what a mapistore error constant means.

Parameters:

mapistore_err the mapistore error constant

Returns:

constant string

References MAPISTORE_ERR_ALREADY_INITIALIZED, MAPISTORE_ERR_BACKEND_INIT, MAPISTORE_ERR_BACKEND_REGISTER, MAPISTORE_ERR_CONTEXT_FAILED, MAPISTORE_ERR_CORRUPTED, MAPISTORE_ERR_DATABASE_INIT, MAPISTORE_ERR_DATABASE_OPS, MAPISTORE_ERR_EXIST, MAPISTORE_ERR_INVALID_CONTEXT, MAPISTORE_ERR_INVALID_NAMESPACE, MAPISTORE_ERR_INVALID_OBJECT, MAPISTORE_ERR_INVALID_PARAMETER, MAPISTORE_ERR_NO_DIRECTORY, MAPISTORE_ERR_NO_MEMORY, MAPISTORE_ERR_NOT_FOUND, MAPISTORE_ERR_NOT_INITIALIZED, MAPISTORE_ERR_REF_COUNT, and MAPISTORE_SUCCESS.

Referenced by mapistore_init().  

enum MAPISTORE_ERROR mapistore_get_fid_by_name (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tparent_fid, const char *name, uint64_t *fid)Search for a folder ID by name

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend where the folder will be searched for
parent_fid the parent folder identifier
name the name of the folder to search for
fid the fid (result)

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), and MAPISTORE_ERR_INVALID_PARAMETER.  

enum MAPISTORE_ERROR mapistore_get_folder_count (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfid, uint32_t *RowCount)Retrieve the number of child folders within a mapistore folder

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend
fid the folder identifier
RowCount pointer to the count result to return

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_FOLDER_TABLE.  

enum MAPISTORE_ERROR mapistore_get_message_count (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfid, uint32_t *RowCount)Retrieve the number of child messages within a mapistore folder

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend
fid the folder identifier
RowCount pointer to the count result to return

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_MESSAGE_TABLE.  

enum MAPISTORE_ERROR mapistore_get_table_property (struct mapistore_context *mstore_ctx, uint32_tcontext_id, enum MAPISTORE_TABLE_TYPEtable_type, uint64_tfid, enum MAPITAGSproptag, uint32_tpos, void **data)Retrieve a MAPI property from a table

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend
table_type the type of table (folders or messges)
fid the folder identifier where the search takes place
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

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), and MAPISTORE_ERR_INVALID_PARAMETER.

Referenced by mapistore_get_child_fids().  

enum MAPISTORE_ERROR mapistore_getprops (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfmid, uint8_ttype, struct SPropTagArray *properties, struct SRow *aRow)Get properties of a message/folder in mapistore

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend where properties will be fetched
fmid the identifier referencing the message/folder
type the object type (folder or message)
properties pointer to the list of properties to fetch
aRow pointer to the SRow structure

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_indexing_add (struct mapistore_context *mstore_ctx, const char *username)Open connection to indexing database for a given user

Parameters:

mstore_ctx pointer to the mapistore context
username name for which the indexing database has to be created

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References MAPISTORE_ERR_DATABASE_INIT, MAPISTORE_ERR_NOT_INITIALIZED, mapistore_get_mapping_path(), mapistore_indexing_search(), and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_indexing_del (struct mapistore_context *mstore_ctx, const char *username)Close connection to indexing database for a given user

Parameters:

mstore_ctx pointer to the mapistore context
username name for which the indexing database has to be deleted

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References MAPISTORE_ERR_NOT_INITIALIZED, mapistore_indexing_search(), and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_indexing_get_folder_list (struct mapistore_context *mstore_ctx, const char *username, uint64_tfmid, struct indexing_folders_list **_flist)Retrieve the list of parent folder identifiers until we reach the expected item

Parameters:

mstore_ctx pointer to the mapistore context
username the name of the account where to look for the indexing database
fmid the folder/message ID to search
_flist the list of folders (result)

Note:

This function is useful for the emsmdb provider when we are trying to open a folder/message using an InputHandleIdx referencing the store object. In such situation, no context ID is available since the store object access openchange.ldb.

It means we need to retrieve the list of folders to the item within the mapistore context and rely on an existing parent (if opened) or opens everything from the top parent if none is available.

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR

See also:

mapistore_indexing_record_open_fmid

References MAPISTORE_ERR_NOT_INITIALIZED, mapistore_indexing_search(), mapistore_indexing_search_existing_fmid(), and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_indexing_record_add_fid (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfid)Add a fid record to the indexing database

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the indexing database to update
fid the fid to add

Note:

This is a wrapper to the internal common mapistore_indexing_record_add_fmid function.

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References mapistore_indexing_record_add_fmid().  

enum MAPISTORE_ERROR mapistore_indexing_record_add_mid (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tmid)Add a mid record to the indexing database

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the indexing database to update
mid the mid to add

Note:

This is a wrapper to the internal common mapistore_indexing_record_add_fmid function.

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References mapistore_indexing_record_add_fmid().  

enum MAPISTORE_ERROR mapistore_indexing_record_del_fid (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfid, enum MAPISTORE_DELETION_TYPEdeletion_type)Delete a fid record from the indexing database

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the indexing database to update
fid the fid to remove
deletion_type the type of deletion (MAPISTORE_SOFT_DELETE or MAPISTORE_PERMANENT_DELETE)

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References mapistore_indexing_record_del_fmid().  

enum MAPISTORE_ERROR mapistore_indexing_record_del_mid (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tmid, enum MAPISTORE_DELETION_TYPEdeletion_type)Delete a mid record from the indexing database

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the indexing database to update
mid the mid to remove
deletion_type the type of deletion (MAPISTORE_SOFT_DELETE or MAPISTORE_PERMANENT_DELETE)

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References mapistore_indexing_record_del_fmid().  

__BEGIN_DECLS struct mapistore_context* mapistore_init (TALLOC_CTX *mem_ctx, const char *path) [read]Initialize the mapistore context

Parameters:

mem_ctx pointer to the memory context
path the path to the location to load the backend providers from (NULL for default)

Returns:

allocate mapistore context on success, otherwise NULL

References mapistore_backend_init(), mapistore_errstr(), and MAPISTORE_SUCCESS.

Referenced by mapistoredb_init().  

enum MAPISTORE_ERROR mapistore_mkdir (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tparent_fid, uint64_tfid, struct SRow *aRow)Create a directory in mapistore

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend where the directory will be created
parent_fid the parent folder identifier
fid the folder identifier for the new folder
aRow pointer to MAPI data structures with properties to be added to the new folder

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), and MAPISTORE_ERR_INVALID_PARAMETER.  

int mapistore_namedprops_get_mapped_id (void *_ldb_ctx, struct MAPINAMEIDnameid, uint16_t *propID)return the mapped property ID matching the nameid structure passed in parameter.

Parameters:

_ldb_ctx pointer to the namedprops ldb context
nameid the MAPINAMEID structure to lookup
propID pointer to the property ID the function returns

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR

References mapistore_namedprops_get_mapped_id(), and MAPISTORE_SUCCESS.

Referenced by mapistore_namedprops_get_mapped_id().  

enum MAPISTORE_ERROR mapistore_opendir (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tparent_fid, uint64_tfid)Open a directory in mapistore

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend where the directory will be opened
parent_fid the parent folder identifier
fid folder identifier to open

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_openmessage (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tparent_fid, uint64_tmid, struct mapistore_message *msg)Open a message in mapistore

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend where the directory will be opened
parent_fid the parent folder identifier
mid the message identifier to open
msg pointer to the mapistore_message structure (result)

Returns:

MAPISTORE SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_release (struct mapistore_context *mstore_ctx)Release the mapistore context and destroy any data associated

Parameters:

mstore_ctx pointer to the mapistore context

Note:

The function needs to rely on talloc destructors which is not implemented in code yet.

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References MAPISTORE_ERR_NOT_INITIALIZED, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_release_record (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfmid, uint8_ttype)Release private backend data associated a folder / message opened within the mapistore backend

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend
fmid a folder or message identifier
type the type of fmid, either MAPISTORE_FOLDER or MAPISTORE_MESSAGE

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_rmdir (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tparent_fid, uint64_tfid, uint8_tflags)Remove a directory in mapistore

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend
parent_fid the parent folder identifier
fid the folder identifier representing the folder to delete
flags flags that control the behaviour of the operation

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, MAPISTORE_ERR_NOT_FOUND, mapistore_get_child_fids(), mapistore_rmdir(), and MAPISTORE_SUCCESS.

Referenced by mapistore_rmdir().  

enum MAPISTORE_ERROR mapistore_savechangesmessage (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tmid, uint8_tflags)Commit the changes made to a message in mapistore

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend where the message's changes will be saved
mid the message identifier to save
flags flags associated to the commit operation

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_search_context_by_uri (struct mapistore_context *mstore_ctx, const char *uri, uint32_t *context_id)Search for an existing context given its uri

Parameters:

mstore_ctx pointer to the mapistore context
uri the URI to lookup
context_id pointer to the context identifier to return

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References mapistore_backend_lookup_by_uri(), MAPISTORE_ERR_NOT_FOUND, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_set_database_path (const char *dbname)Set the mapistore.ldb mapping path

Parameters:

dbname string pointer to the mapistore database path

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References mapistore_set_database_path(), and MAPISTORE_SUCCESS.

Referenced by mapistore_set_database_path(), and mapistoredb_init().  

enum MAPISTORE_ERROR mapistore_set_mapping_path (const char *path)Set the mapping path

Parameters:

path pointer to the mapping path

Note:

The mapping path can be set unless id_mapping_context is initialized. If path is NULL and mapping path is not yet initialized, then mapping_path will be reset to its default value when the initialization routine is called.

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References MAPISTORE_ERR_NO_DIRECTORY, mapistore_set_mapping_path(), and MAPISTORE_SUCCESS.

Referenced by mapistore_set_mapping_path(), and mapistoredb_init().  

enum MAPISTORE_ERROR mapistore_setprops (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfmid, uint8_ttype, struct SRow *aRow)Set properties of a message/folder in mapistore

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend where properties will be stored
fmid the identifier referencing the message/folder
type the object type (folder or message)
aRow pointer to the SRow structure

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistore_submitmessage (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tmid, uint8_tflags)Submits a message for sending.

Parameters:

mstore_ctx pointer to the mapistore context
context_id the context identifier referencing the backend where the message will be submitted
mid the message identifier representing the message to submit
flags flags associated to the submit operation

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE errors

References mapistore_backend_lookup(), MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_SUCCESS.  

void mapistoredb_dump_conf (struct mapistoredb_context *mdb_ctx)Helper function, dumps current mapistore_context configuration parameters

Parameters:

mdb_ctx the mapistore database context

See also:

mapistoredb_init

 

const char* mapistoredb_get_firstorg (struct mapistoredb_context *mdb_ctx)Get accessor for firstorg

Parameters:

mdb_ctx pointer to the mapistore database context

Returns:

pointer to firstorg string on success, otherwise NULL

 

const char* mapistoredb_get_firstou (struct mapistoredb_context *mdb_ctx)Get accessor for firstou

Parameters:

mdb_ctx pointer to the mapistore database context

Returns:

pointer to firstou string on success, otherwise NULL

 

enum MAPISTORE_ERROR mapistoredb_get_mapistore_uri (struct mapistoredb_context *mdb_ctx, enum MAPISTORE_DFLT_FOLDERSindex, const char *namespace_uri, const char *username, char **uri)Get a mapistore URI for a system/special folder from backend

Parameters:

mdb_ctx pointer to the mapistore database context
index the special folder index
username the username for which we want to retrieve the uri
uri the uri namespace for the backend we want to use
namespace_uri pointer to the resulting namespace uri (return value)

The special folder is specified by the index parameter. For example to create the 'inbox' folder, pass MDB_INBOX.

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE_ERROR

References MAPISTORE_ERR_INVALID_CONTEXT, MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_SUCCESS.  

const char* mapistoredb_get_netbiosname (struct mapistoredb_context *mdb_ctx)Get accessor for netbiosname

Parameters:

mdb_ctx pointer to the mapistore database context

Returns:

pointer to netbiosname string on success, otherwise NULL

 

enum MAPISTORE_ERROR mapistoredb_get_new_allocation_range (struct mapistoredb_context *mdb_ctx, uint64_trange, uint64_t *range_start, uint64_t *range_end)Retrieve a new allocation range

This function obtains a range of folder / message identifiers. Conceptually you specify how many identifiers you want, and are provided a contiguous block of identiers (in terms of a start and end, which are inclusive).

This function is a wrapper over mapistore_get_new_allocation_range from mapistore_processing.c

Parameters:

mdb_ctx pointer to the mapistore database context
range the number of IDs to allocate
range_start pointer to the first ID of the range to return
range_end pointer to the last ID of the range to return

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

References MAPISTORE_ERR_INVALID_PARAMETER, MAPISTORE_ERR_NOT_INITIALIZED, and MAPISTORE_SUCCESS.  

enum MAPISTORE_ERROR mapistoredb_get_new_fmid (struct mapistoredb_context *mdb_ctx, uint64_t *_fmid)Retrieve the next available folder or message identifier

This function is a wrapper over mapistore_get_new_fmid from mapistore_processing.c

Parameters:

mdb_ctx pointer to the mapistore database context
_fmid pointer on the next fmid available to return

Returns:

MAPISTORE_SUCCESS on success, otherwise MAPISTORE error

See also:

mapistoredb_get_new_allocation_range for an alternative function returning multiple identifiers

References MAPISTORE_ERR_INVALID_PARAMETER, MAPISTORE_ERR_NOT_INITIALIZED, and MAPISTORE_SUCCESS.  

struct mapistoredb_context* mapistoredb_init (TALLOC_CTX *mem_ctx, const char *path) [read]Initialize the mapistore database context

Parameters:

mem_ctx pointer to the memory context
path string pointer to the mapistore database location

If path if NULL use the default mapistore database path instead.

Returns:

Allocated mapistore database context on success, otherwise NULL

References mapistore_init(), mapistore_set_database_path(), and mapistore_set_mapping_path().  

enum MAPISTORE_ERROR mapistoredb_provision (struct mapistoredb_context *mdb_ctx)Default provisioning for mapistore.ldb database

Parameters:

mdb_ctx pointer to the mapistore database context

Returns:

MAPISTORE_SUCCESS on success, otherwise a non-zero MAPISTORE_ERROR

References MAPISTORE_ERR_DATABASE_OPS, MAPISTORE_ERR_NOT_INITIALIZED, and MAPISTORE_SUCCESS.  

void mapistoredb_release (struct mapistoredb_context *mdb_ctx)Free a mapistore database context

Parameters:

mdb_ctx the context to free (from mapistoredb_init())

 

enum MAPISTORE_ERROR mapistoredb_set_firstorg (struct mapistoredb_context *mdb_ctx, const char *firstorg)Accessor for first organization

Parameters:

mdb_ctx pointer to the mapistore database context
firstorg the first organization string to set

Returns:

MAPISTORE_SUCCESS on success, otherwise a non-zero MAPISTORE_ERROR

References MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_ERR_NOT_INITIALIZED.  

enum MAPISTORE_ERROR mapistoredb_set_firstou (struct mapistoredb_context *mdb_ctx, const char *firstou)Accessor for first organization unit

Parameters:

mdb_ctx pointer to the mapistore database context
firstou the first organization unit string to set

Returns:

MAPISTORE_SUCCESS on success, otherwise a non-zero MAPISTORE_ERROR

References MAPISTORE_ERR_INVALID_PARAMETER, and MAPISTORE_ERR_NOT_INITIALIZED.  

enum MAPISTORE_ERROR mapistoredb_set_netbiosname (struct mapistoredb_context *mdb_ctx, const char *netbiosname)Set accessor for netbiosname

Parameters:

mdb_ctx pointer to the mapistore database context
netbiosname the netbios name string to set

Returns:

MAPISTORE_SUCCESS on success, otherwise a non-zero MAPISTORE_ERROR

References MAPISTORE_ERR_INVALID_PARAMETER, MAPISTORE_ERR_NOT_INITIALIZED, and MAPISTORE_SUCCESS.  

Author

Generated automatically by Doxygen for OpenChange mapistore library from the source code.


 

Index

NAME
SYNOPSIS
Functions
Detailed Description
Function Documentation
enum MAPISTORE_ERROR mapistore_add_context (struct mapistore_context *mstore_ctx, const char *uri, uint32_t *context_id)Add a new connection context to mapistore
enum MAPISTORE_ERROR mapistore_add_context_indexing (struct mapistore_context *mstore_ctx, const char *username, uint32_tcontext_id)Associate an indexing context to a mapistore context
enum MAPISTORE_ERROR mapistore_add_context_ref_count (struct mapistore_context *mstore_ctx, uint32_tcontext_id)Increase the reference counter of an existing context
const char* mapistore_backend_get_installdir (void)Return the full path where mapistore backends are installed.
init_backend_fn* mapistore_backend_load (TALLOC_CTX *mem_ctx, const char *path)Load the initialization functions from backends DSO
struct backend_context* mapistore_backend_lookup (struct backend_context_list *backend_list_ctx, uint32_tcontext_id) [read]find the context matching given context identifier
struct backend_context* mapistore_backend_lookup_by_uri (struct backend_context_list *backend_list_ctx, const char *uri) [read]find the context matching given uri string
bool mapistore_backend_run_init (init_backend_fn *fns)Run specified initialization functions.
enum MAPISTORE_ERROR mapistore_closedir (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfid)Close a directory in mapistore
enum MAPISTORE_ERROR mapistore_createmessage (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tparent_fid, uint64_tmid)Create a message in mapistore
enum MAPISTORE_ERROR mapistore_del_context (struct mapistore_context *mstore_ctx, uint32_tcontext_id)Delete an existing connection context from mapistore
enum MAPISTORE_ERROR mapistore_deletemessage (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tmid, enum MAPISTORE_DELETION_TYPEdeletion_type)Delete a message from mapistore
const char* mapistore_errstr (enum MAPISTORE_ERRORmapistore_err)return a string explaining what a mapistore error constant means.
enum MAPISTORE_ERROR mapistore_get_fid_by_name (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tparent_fid, const char *name, uint64_t *fid)Search for a folder ID by name
enum MAPISTORE_ERROR mapistore_get_folder_count (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfid, uint32_t *RowCount)Retrieve the number of child folders within a mapistore folder
enum MAPISTORE_ERROR mapistore_get_message_count (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfid, uint32_t *RowCount)Retrieve the number of child messages within a mapistore folder
enum MAPISTORE_ERROR mapistore_get_table_property (struct mapistore_context *mstore_ctx, uint32_tcontext_id, enum MAPISTORE_TABLE_TYPEtable_type, uint64_tfid, enum MAPITAGSproptag, uint32_tpos, void **data)Retrieve a MAPI property from a table
enum MAPISTORE_ERROR mapistore_getprops (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfmid, uint8_ttype, struct SPropTagArray *properties, struct SRow *aRow)Get properties of a message/folder in mapistore
enum MAPISTORE_ERROR mapistore_indexing_add (struct mapistore_context *mstore_ctx, const char *username)Open connection to indexing database for a given user
enum MAPISTORE_ERROR mapistore_indexing_del (struct mapistore_context *mstore_ctx, const char *username)Close connection to indexing database for a given user
enum MAPISTORE_ERROR mapistore_indexing_get_folder_list (struct mapistore_context *mstore_ctx, const char *username, uint64_tfmid, struct indexing_folders_list **_flist)Retrieve the list of parent folder identifiers until we reach the expected item
enum MAPISTORE_ERROR mapistore_indexing_record_add_fid (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfid)Add a fid record to the indexing database
enum MAPISTORE_ERROR mapistore_indexing_record_add_mid (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tmid)Add a mid record to the indexing database
enum MAPISTORE_ERROR mapistore_indexing_record_del_fid (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfid, enum MAPISTORE_DELETION_TYPEdeletion_type)Delete a fid record from the indexing database
enum MAPISTORE_ERROR mapistore_indexing_record_del_mid (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tmid, enum MAPISTORE_DELETION_TYPEdeletion_type)Delete a mid record from the indexing database
__BEGIN_DECLS struct mapistore_context* mapistore_init (TALLOC_CTX *mem_ctx, const char *path) [read]Initialize the mapistore context
enum MAPISTORE_ERROR mapistore_mkdir (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tparent_fid, uint64_tfid, struct SRow *aRow)Create a directory in mapistore
int mapistore_namedprops_get_mapped_id (void *_ldb_ctx, struct MAPINAMEIDnameid, uint16_t *propID)return the mapped property ID matching the nameid structure passed in parameter.
enum MAPISTORE_ERROR mapistore_opendir (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tparent_fid, uint64_tfid)Open a directory in mapistore
enum MAPISTORE_ERROR mapistore_openmessage (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tparent_fid, uint64_tmid, struct mapistore_message *msg)Open a message in mapistore
enum MAPISTORE_ERROR mapistore_release (struct mapistore_context *mstore_ctx)Release the mapistore context and destroy any data associated
enum MAPISTORE_ERROR mapistore_release_record (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfmid, uint8_ttype)Release private backend data associated a folder / message opened within the mapistore backend
enum MAPISTORE_ERROR mapistore_rmdir (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tparent_fid, uint64_tfid, uint8_tflags)Remove a directory in mapistore
enum MAPISTORE_ERROR mapistore_savechangesmessage (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tmid, uint8_tflags)Commit the changes made to a message in mapistore
enum MAPISTORE_ERROR mapistore_search_context_by_uri (struct mapistore_context *mstore_ctx, const char *uri, uint32_t *context_id)Search for an existing context given its uri
enum MAPISTORE_ERROR mapistore_set_database_path (const char *dbname)Set the mapistore.ldb mapping path
enum MAPISTORE_ERROR mapistore_set_mapping_path (const char *path)Set the mapping path
enum MAPISTORE_ERROR mapistore_setprops (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tfmid, uint8_ttype, struct SRow *aRow)Set properties of a message/folder in mapistore
enum MAPISTORE_ERROR mapistore_submitmessage (struct mapistore_context *mstore_ctx, uint32_tcontext_id, uint64_tmid, uint8_tflags)Submits a message for sending.
void mapistoredb_dump_conf (struct mapistoredb_context *mdb_ctx)Helper function, dumps current mapistore_context configuration parameters
const char* mapistoredb_get_firstorg (struct mapistoredb_context *mdb_ctx)Get accessor for firstorg
const char* mapistoredb_get_firstou (struct mapistoredb_context *mdb_ctx)Get accessor for firstou
enum MAPISTORE_ERROR mapistoredb_get_mapistore_uri (struct mapistoredb_context *mdb_ctx, enum MAPISTORE_DFLT_FOLDERSindex, const char *namespace_uri, const char *username, char **uri)Get a mapistore URI for a system/special folder from backend
const char* mapistoredb_get_netbiosname (struct mapistoredb_context *mdb_ctx)Get accessor for netbiosname
enum MAPISTORE_ERROR mapistoredb_get_new_allocation_range (struct mapistoredb_context *mdb_ctx, uint64_trange, uint64_t *range_start, uint64_t *range_end)Retrieve a new allocation range
enum MAPISTORE_ERROR mapistoredb_get_new_fmid (struct mapistoredb_context *mdb_ctx, uint64_t *_fmid)Retrieve the next available folder or message identifier
struct mapistoredb_context* mapistoredb_init (TALLOC_CTX *mem_ctx, const char *path) [read]Initialize the mapistore database context
enum MAPISTORE_ERROR mapistoredb_provision (struct mapistoredb_context *mdb_ctx)Default provisioning for mapistore.ldb database
void mapistoredb_release (struct mapistoredb_context *mdb_ctx)Free a mapistore database context
enum MAPISTORE_ERROR mapistoredb_set_firstorg (struct mapistoredb_context *mdb_ctx, const char *firstorg)Accessor for first organization
enum MAPISTORE_ERROR mapistoredb_set_firstou (struct mapistoredb_context *mdb_ctx, const char *firstou)Accessor for first organization unit
enum MAPISTORE_ERROR mapistoredb_set_netbiosname (struct mapistoredb_context *mdb_ctx, const char *netbiosname)Set accessor for netbiosname
Author

This document was created by man2html, using the manual pages.
Time: 21:49:57 GMT, April 16, 2011