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