#include <glib.h>
#include <glib/glist.h>
Go to the source code of this file.
Data Structures | |
struct | mwDirectoryHandler |
handles asynchronous events for a directory service instance More... | |
struct | mwDirectoryMember |
Defines | |
#define | _MW_SERV_DIR_H |
#define | DIR_SEARCH_ERROR 0x00000000 |
return value of directory searches that fail | |
#define | MW_DIRECTORY_IS_NEW(dir) MW_DIRECTORY_IS_STATE((dir), mwDirectory_NEW) |
#define | MW_DIRECTORY_IS_OPEN(dir) MW_DIRECTORY_IS_STATE((dir), mwDirectory_OPEN) |
#define | MW_DIRECTORY_IS_PENDING(dir) MW_DIRECTORY_IS_STATE((dir), mwDirectory_PENDING) |
#define | MW_DIRECTORY_IS_STATE(dir, state) (mwDirectory_getState(dir) == (state)) |
#define | SERVICE_DIRECTORY 0x0000001a |
Typedefs | |
typedef void(* | mwSearchHandler )(struct mwDirectory *dir, guint32 code, guint32 offset, GList *members) |
Appropriate function signature for handling directory search results. | |
Enumerations | |
enum | mwDirectoryMemberType { mwDirectoryMember_USER = 0x0000, mwDirectoryMember_GROUP = 0x0001 } |
enum | mwDirectoryState { mwDirectory_NEW, mwDirectory_PENDING, mwDirectory_OPEN, mwDirectory_ERROR, mwDirectory_UNKNOWN } |
Functions | |
GList * | mwAddressBook_getDirectories (struct mwAddressBook *book) |
list of directories associated with address book. | |
const char * | mwAddressBook_getName (struct mwAddressBook *book) |
the name of the address book | |
int | mwDirectory_destroy (struct mwDirectory *dir) |
close and free the directory, and unassociate it with its owning address book and service | |
mwAddressBook * | mwDirectory_getAddressBook (struct mwDirectory *dir) |
reference owning address book | |
gpointer | mwDirectory_getClientData (struct mwDirectory *dir) |
reference associated client data | |
mwServiceDirectory * | mwDirectory_getService (struct mwDirectory *dir) |
reference owning service | |
enum mwDirectoryState | mwDirectory_getState (struct mwDirectory *dir) |
mwDirectory * | mwDirectory_new (struct mwAddressBook *book) |
allocate a new directory based off the given address book | |
int | mwDirectory_next (struct mwDirectory *dir) |
continue a search into its next results | |
int | mwDirectory_open (struct mwDirectory *dir, mwSearchHandler cb) |
initialize a directory. | |
int | mwDirectory_previous (struct mwDirectory *dir) |
continue a search into its previous results | |
void | mwDirectory_removeClientData (struct mwDirectory *dir) |
remove and cleanup user data | |
int | mwDirectory_search (struct mwDirectory *dir, const char *query) |
initiate a search on an open directory | |
void | mwDirectory_setClientData (struct mwDirectory *dir, gpointer data, GDestroyNotify clear) |
set client data. | |
GList * | mwServiceDirectory_getAddressBooks (struct mwServiceDirectory *srvc) |
most recent list of address books available in service | |
GList * | mwServiceDirectory_getDirectories (struct mwServiceDirectory *srvc) |
list of directories in the service | |
mwDirectoryHandler * | mwServiceDirectory_getHandler (struct mwServiceDirectory *srvc) |
the handler associated with the service at its creation | |
mwServiceDirectory * | mwServiceDirectory_new (struct mwSession *session, struct mwDirectoryHandler *handler) |
Allocate a new directory service instance for use with session. | |
int | mwServiceDirectory_refreshAddressBooks (struct mwServiceDirectory *srvc) |
submit a request to obtain an updated list of address books from service |
|
|
|
return value of directory searches that fail
|
|
|
|
|
|
|
|
|
|
|
|
Appropriate function signature for handling directory search results.
|
|
|
|
|
|
list of directories associated with address book. Note that the returned GList will need to be free'd after use |
|
the name of the address book
|
|
close and free the directory, and unassociate it with its owning address book and service
|
|
reference owning address book
|
|
reference associated client data
|
|
reference owning service
|
|
|
|
allocate a new directory based off the given address book
|
|
continue a search into its next results
|
|
initialize a directory.
|
|
continue a search into its previous results
|
|
remove and cleanup user data
|
|
initiate a search on an open directory
|
|
set client data. If there is an existing clear function, it will not be called |
|
most recent list of address books available in service
|
|
list of directories in the service
|
|
the handler associated with the service at its creation
|
|
Allocate a new directory service instance for use with session.
|
|
submit a request to obtain an updated list of address books from service
|