MAPI Profiles interface. More...
#include <libmapi/libmapi.h>
Functions | |
_PUBLIC_ enum MAPISTATUS | ChangeProfilePassword (const char *profile, const char *old_password, const char *password) |
_PUBLIC_ enum MAPISTATUS | CreateProfile (const char *profile, const char *username, const char *password, uint32_t flag) |
_PUBLIC_ enum MAPISTATUS | CreateProfileStore (const char *profiledb, const char *ldif_path) |
_PUBLIC_ enum MAPISTATUS | DeleteProfile (const char *profile) |
_PUBLIC_ enum MAPISTATUS | FindProfileAttr (struct mapi_profile *profile, const char *attribute, const char *value) |
_PUBLIC_ enum MAPISTATUS | GetDefaultProfile (char **profname) |
_PUBLIC_ enum MAPISTATUS | GetProfileAttr (struct mapi_profile *profile, const char *attribute, unsigned int *count, char ***value) |
_PUBLIC_ enum MAPISTATUS | GetProfileTable (struct SRowSet *proftable) |
_PUBLIC_ enum MAPISTATUS | LoadProfile (struct mapi_profile *profile) |
_PUBLIC_ enum MAPISTATUS | mapi_profile_add_string_attr (const char *profile, const char *attr, const char *value) |
_PUBLIC_ enum MAPISTATUS | mapi_profile_delete_string_attr (const char *profname, const char *attr, const char *value) |
_PUBLIC_ const char * | mapi_profile_get_ldif_path (void) |
_PUBLIC_ enum MAPISTATUS | mapi_profile_modify_string_attr (const char *profname, const char *attr, const char *value) |
_PUBLIC_ enum MAPISTATUS | OpenProfile (struct mapi_profile *profile, const char *profname, const char *password) |
_PUBLIC_ enum MAPISTATUS | ProcessNetworkProfile (struct mapi_session *session, const char *username, mapi_profile_callback_t callback, const void *private_data) |
_PUBLIC_ enum MAPISTATUS | RenameProfile (const char *old_profile, const char *profile) |
_PUBLIC_ enum MAPISTATUS | SetDefaultProfile (const char *profname) |
_PUBLIC_ enum MAPISTATUS | ShutDown (struct mapi_profile *profile) |
MAPI Profiles interface.
_PUBLIC_ enum MAPISTATUS ChangeProfilePassword | ( | const char * | profile, | |
const char * | old_password, | |||
const char * | password | |||
) |
Change the profile password of an existing MAPI profile
profile | the name of the profile to have its password changed | |
old_password | the old password | |
password | the new password |
References mapi_profile_modify_string_attr().
_PUBLIC_ enum MAPISTATUS CreateProfile | ( | const char * | profile, | |
const char * | username, | |||
const char * | password, | |||
uint32_t | flag | |||
) |
Create a profile in the MAPI profile database
This function creates a profile named profile in the MAPI profile database and sets the specified username in that profile.
This function may also set the password. If the flags include OC_PROFILE_NOPASSWORD then the password will not be set. Otherwise, the specified password argument will also be saved to the profile.
profile | the name of the profile | |
username | the username of the profile | |
password | the password for the profile (if used) | |
flag | the union of the flags. |
References mapi_profile_add_string_attr().
_PUBLIC_ enum MAPISTATUS CreateProfileStore | ( | const char * | profiledb, | |
const char * | ldif_path | |||
) |
Create a profile database
This function creates a new profile database, including doing an initial setup.
profiledb | the absolute path to the profile database intended to be created | |
ldif_path | the absolute path to the LDIF information to use for initial setup. |
_PUBLIC_ enum MAPISTATUS DeleteProfile | ( | const char * | profile | ) |
Delete a profile from the MAPI profile database
profile | the name of the profile to delete |
_PUBLIC_ enum MAPISTATUS FindProfileAttr | ( | struct mapi_profile * | profile, | |
const char * | attribute, | |||
const char * | value | |||
) |
Search the value of an attribute within a given profile
_PUBLIC_ enum MAPISTATUS GetDefaultProfile | ( | char ** | profname | ) |
Get the default profile from the database
profname | the result of the function (name of the default profile) |
References GetProfileTable().
_PUBLIC_ enum MAPISTATUS GetProfileAttr | ( | struct mapi_profile * | profile, | |
const char * | attribute, | |||
unsigned int * | count, | |||
char *** | value | |||
) |
Retrieve attribute values from a profile
This function retrieves all the attribute values from the given profile. The number of results is stored in count and values are stored in an allocated string array in the value parameter that needs to be free'd using MAPIFreeBuffer().
profile | the name of the profile to retrieve attributes from | |
attribute | the attribute(s) to search for | |
count | the number of results | |
value | the resulting values |
_PUBLIC_ enum MAPISTATUS GetProfileTable | ( | struct SRowSet * | proftable | ) |
Retrieve the profile table
This function retrieves the profile table. Two fields are returned:
proftable | the result of the call |
Referenced by GetDefaultProfile(), and RenameProfile().
_PUBLIC_ enum MAPISTATUS LoadProfile | ( | struct mapi_profile * | profile | ) |
Load a MAPI Profile and sets its credentials
This function loads a named MAPI profile and sets the MAPI session credentials.
Referenced by MapiLogonProvider().
_PUBLIC_ enum MAPISTATUS mapi_profile_add_string_attr | ( | const char * | profile, | |
const char * | attr, | |||
const char * | value | |||
) |
Add an attribute to the profile
Referenced by CreateProfile(), and ProcessNetworkProfile().
_PUBLIC_ enum MAPISTATUS mapi_profile_delete_string_attr | ( | const char * | profname, | |
const char * | attr, | |||
const char * | value | |||
) |
Delete an attribute
_PUBLIC_ const char* mapi_profile_get_ldif_path | ( | void | ) |
Get default ldif_path
This function returns the path for the default LDIF files.
_PUBLIC_ enum MAPISTATUS mapi_profile_modify_string_attr | ( | const char * | profname, | |
const char * | attr, | |||
const char * | value | |||
) |
Modify an attribute
Referenced by ChangeProfilePassword(), and SetDefaultProfile().
_PUBLIC_ enum MAPISTATUS OpenProfile | ( | struct mapi_profile * | profile, | |
const char * | profname, | |||
const char * | password | |||
) |
Load a profile from the database
This function opens a named profile from the database, and fills the mapi_profile structure with common profile information.
profile | the resulting profile | |
profname | the name of the profile to open | |
password | the password to use with the profile |
Referenced by MapiLogonProvider().
_PUBLIC_ enum MAPISTATUS ProcessNetworkProfile | ( | struct mapi_session * | session, | |
const char * | username, | |||
mapi_profile_callback_t | callback, | |||
const void * | private_data | |||
) |
Process a full and automated MAPI profile creation
This function process a full and automated MAPI profile creation using the username pattern passed as a parameter. The functions takes a callback parameter which will be called when the username checked matches several usernames. Private data needed by the callback can be supplied using the private_data pointer.
typedef int (*mapi_callback_t) callback(struct SRowSet *, void *private_data);
The callback returns the SRow element index within the SRowSet structure. If the user cancels the operation the callback return value should be SRowSet->cRows or more.
session | the session context | |
username | the username for the network profile | |
callback | function pointer callback function | |
private_data | context data that will be provided to the callback |
References mapi_profile_add_string_attr(), MAPIFreeBuffer(), nspi_DNToMId(), nspi_GetMatches(), nspi_GetProps(), nspi_GetSpecialTable(), and nspi_QueryRows().
_PUBLIC_ enum MAPISTATUS RenameProfile | ( | const char * | old_profile, | |
const char * | profile | |||
) |
Rename a profile
old_profile | old profile name | |
profile | new profile name |
References GetProfileTable().
_PUBLIC_ enum MAPISTATUS SetDefaultProfile | ( | const char * | profname | ) |
Set a default profile for the database
profname | the name of the profile to make the default profile |
References mapi_profile_modify_string_attr().
_PUBLIC_ enum MAPISTATUS ShutDown | ( | struct mapi_profile * | profile | ) |
Release a profile
This function releases the credentials associated with the profile.
profile | the profile to release. |
![]() ![]() ![]() |
This content is licensed under the Creative Commons Attribution ShareAlike License v. 3.0: http://creativecommons.org/licenses/by-sa/3.0/ |