meanwhile 1.1.0
Data Structures | Defines | Typedefs | Enumerations | Functions

mw_srvc_resolve.h File Reference

#include <glib.h>
#include <glib/glist.h>

Go to the source code of this file.

Data Structures

struct  mwResolveMatch
struct  mwResolveResult

Defines

#define mwService_RESOLVE   0x00000015
 Type identifier for the conference service.
#define SEARCH_ERROR   0x00
 Return value of mwServiceResolve_search indicating an error.

Typedefs

typedef void(* mwResolveHandler )(struct mwServiceResolve *srvc, guint32 id, guint32 code, GList *results, gpointer data)
 Handle the results of a resolve request.

Enumerations

enum  mwResolveCode {
  mwResolveCode_SUCCESS = 0x00000000,
  mwResolveCode_PARTIAL = 0x00010000,
  mwResolveCode_MULTIPLE = 0x80020000,
  mwResolveCode_BAD_FORMAT = 0x80030000
}
enum  mwResolveFlag {
  mwResolveFlag_UNIQUE = 0x00000001,
  mwResolveFlag_FIRST = 0x00000002,
  mwResolveFlag_ALL_DIRS = 0x00000004,
  mwResolveFlag_USERS = 0x00000008,
  mwResolveFlag_GROUPS = 0x00000010
}
enum  mwResolveMatchType {
  mwResolveMatch_USER = 0x00000001,
  mwResolveMatch_GROUP = 0x00000002
}

Functions

void mwServiceResolve_cancelResolve (struct mwServiceResolve *, guint32)
 Cancel a resolve request by its generated ID.
struct mwServiceResolvemwServiceResolve_new (struct mwSession *)
 Allocate a new resolve service.
guint32 mwServiceResolve_resolve (struct mwServiceResolve *srvc, GList *queries, enum mwResolveFlag flags, mwResolveHandler handler, gpointer data, GDestroyNotify cleanup)
 Inisitate a resolve request.

Define Documentation

#define mwService_RESOLVE   0x00000015

Type identifier for the conference service.

#define SEARCH_ERROR   0x00

Return value of mwServiceResolve_search indicating an error.


Typedef Documentation

typedef void(* mwResolveHandler)(struct mwServiceResolve *srvc, guint32 id, guint32 code, GList *results, gpointer data)

Handle the results of a resolve request.

If there was a cleanup function specified to mwServiceResolve_search, it will be called upon the user data after this callback returns.

Parameters:
srvcthe resolve service
idthe resolve request ID
codereturn code
resultslist of mwResolveResult
dataoptional user data attached to the request

Enumeration Type Documentation

See also:
mwResolveResult
Enumerator:
mwResolveCode_SUCCESS 

successful search

mwResolveCode_PARTIAL 

only some of the nested searches were successful

mwResolveCode_MULTIPLE 

more than one result (occurs when mwResolveFlag_UNIQUE is used and more than one result would have been otherwise returned)

mwResolveCode_BAD_FORMAT 

the name is not resolvable due to its format

Enumerator:
mwResolveFlag_UNIQUE 

return unique results or none at all

mwResolveFlag_FIRST 

return only the first result

mwResolveFlag_ALL_DIRS 

search all directories, not just the first with a match

mwResolveFlag_USERS 

search for users

mwResolveFlag_GROUPS 

search for groups

Enumerator:
mwResolveMatch_USER 
mwResolveMatch_GROUP 

Function Documentation

void mwServiceResolve_cancelResolve ( struct mwServiceResolve ,
guint32   
)

Cancel a resolve request by its generated ID.

The handler function will not be called, and the optional cleanup function will be called upon the optional user data for the request

struct mwServiceResolve* mwServiceResolve_new ( struct mwSession ) [read]

Allocate a new resolve service.

guint32 mwServiceResolve_resolve ( struct mwServiceResolve srvc,
GList *  queries,
enum mwResolveFlag  flags,
mwResolveHandler  handler,
gpointer  data,
GDestroyNotify  cleanup 
)

Inisitate a resolve request.

Parameters:
srvcthe resolve service
querieslist query strings
flagssearch flags
handlerresult handling function
dataoptional user data attached to the request
cleanupoptional function to clean up user data
Returns:
generated ID for the search request, or SEARCH_ERROR