35#define SERVICE_DIRECTORY 0x0000001a
67#define DIR_SEARCH_ERROR 0x00000000
70#define MW_DIRECTORY_IS_STATE(dir, state) \
71 (mwDirectory_getState(dir) == (state))
73#define MW_DIRECTORY_IS_NEW(dir) \
74 MW_DIRECTORY_IS_STATE((dir), mwDirectory_NEW)
76#define MW_DIRECTORY_IS_PENDING(dir) \
77 MW_DIRECTORY_IS_STATE((dir), mwDirectory_PENDING)
79#define MW_DIRECTORY_IS_OPEN(dir) \
80 MW_DIRECTORY_IS_STATE((dir), mwDirectory_OPEN)
101 guint32 code, guint32 offset, GList *members);
166 gpointer data, GDestroyNotify clear);
void(* mwSearchHandler)(struct mwDirectory *dir, guint32 code, guint32 offset, GList *members)
Appropriate function signature for handling directory search results.
Definition mw_srvc_dir.h:100
GList * mwServiceDirectory_getAddressBooks(struct mwServiceDirectory *srvc)
most recent list of address books available in service
mwDirectoryMemberType
Definition mw_srvc_dir.h:83
@ mwDirectoryMember_GROUP
Definition mw_srvc_dir.h:85
@ mwDirectoryMember_USER
Definition mw_srvc_dir.h:84
int mwServiceDirectory_refreshAddressBooks(struct mwServiceDirectory *srvc)
submit a request to obtain an updated list of address books from service
void mwDirectory_removeClientData(struct mwDirectory *dir)
remove and cleanup user data
struct mwServiceDirectory * mwDirectory_getService(struct mwDirectory *dir)
reference owning service
struct mwDirectoryHandler * mwServiceDirectory_getHandler(struct mwServiceDirectory *srvc)
the handler associated with the service at its creation
const char * mwAddressBook_getName(struct mwAddressBook *book)
the name of the address book
mwDirectoryState
Definition mw_srvc_dir.h:57
@ mwDirectory_ERROR
error opening or using directory
Definition mw_srvc_dir.h:61
@ mwDirectory_UNKNOWN
error determining directory state
Definition mw_srvc_dir.h:62
@ mwDirectory_OPEN
directory is open
Definition mw_srvc_dir.h:60
@ mwDirectory_NEW
directory is created, but not open
Definition mw_srvc_dir.h:58
@ mwDirectory_PENDING
directory has in the process of opening
Definition mw_srvc_dir.h:59
gpointer mwDirectory_getClientData(struct mwDirectory *dir)
reference associated client data
int mwDirectory_open(struct mwDirectory *dir, mwSearchHandler cb)
initialize a directory.
int mwDirectory_search(struct mwDirectory *dir, const char *query)
initiate a search on an open directory
GList * mwServiceDirectory_getDirectories(struct mwServiceDirectory *srvc)
list of directories in the service
enum mwDirectoryState mwDirectory_getState(struct mwDirectory *dir)
GList * mwAddressBook_getDirectories(struct mwAddressBook *book)
list of directories associated with address book.
void mwDirectory_setClientData(struct mwDirectory *dir, gpointer data, GDestroyNotify clear)
set client data.
struct mwAddressBook * mwDirectory_getAddressBook(struct mwDirectory *dir)
reference owning address book
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_destroy(struct mwDirectory *dir)
close and free the directory, and unassociate it with its owning address book and service
struct mwServiceDirectory * mwServiceDirectory_new(struct mwSession *session, struct mwDirectoryHandler *handler)
Allocate a new directory service instance for use with session.
int mwDirectory_previous(struct mwDirectory *dir)
continue a search into its previous results
server-side collection of users and groups.
handles asynchronous events for a directory service instance
Definition mw_srvc_dir.h:105
void(* on_book_list)(struct mwServiceDirectory *srvc, GList *books)
handle receipt of the address book list from the service.
Definition mw_srvc_dir.h:110
void(* clear)(struct mwServiceDirectory *srvc)
optional.
Definition mw_srvc_dir.h:119
void(* dir_closed)(struct mwDirectory *dir, guint32 reason)
triggered when a directory has been closed
Definition mw_srvc_dir.h:116
void(* dir_opened)(struct mwDirectory *dir)
triggered when a directory has been successfully opened
Definition mw_srvc_dir.h:113
Definition mw_srvc_dir.h:89
guint16 foo
unknown
Definition mw_srvc_dir.h:94
char * id
proper ID for member
Definition mw_srvc_dir.h:91
char * short_name
short name of member
Definition mw_srvc_dir.h:93
char * long_name
full name of member (USER type only)
Definition mw_srvc_dir.h:92
guint16 type
Definition mw_srvc_dir.h:90
searchable directory, based off of an address book
Represents a Sametime client session.