meanwhile  1.1.0
mw_srvc_resolve.h
Go to the documentation of this file.
1 
2 /*
3  Meanwhile - Unofficial Lotus Sametime Community Client Library
4  Copyright (C) 2004 Christopher (siege) O'Brien
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Library General Public
8  License as published by the Free Software Foundation; either
9  version 2 of the License, or (at your option) any later version.
10 
11  This library is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  Library General Public License for more details.
15 
16  You should have received a copy of the GNU Library General Public
17  License along with this library; if not, write to the Free
18  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19 */
20 
21 #ifndef _MW_SRVC_RESOLVE_H
22 #define _MW_SRVC_RESOLVE_H
23 
24 
25 #include <glib.h>
26 
27 
28 #ifdef __cplusplus
29 extern "C" {
30 #endif
31 
32 
34 #define mwService_RESOLVE 0x00000015
35 
36 
38 #define SEARCH_ERROR 0x00
39 
40 
43 struct mwServiceResolve;
44 
45 
48  mwResolveFlag_UNIQUE = 0x00000001,
49 
51  mwResolveFlag_FIRST = 0x00000002,
52 
54  mwResolveFlag_ALL_DIRS = 0x00000004,
55 
57  mwResolveFlag_USERS = 0x00000008,
58 
60  mwResolveFlag_GROUPS = 0x00000010,
61 };
62 
63 
67  mwResolveCode_SUCCESS = 0x00000000,
68 
70  mwResolveCode_PARTIAL = 0x00010000,
71 
74  mwResolveCode_MULTIPLE = 0x80020000,
75 
78 };
79 
80 
82  mwResolveMatch_USER = 0x00000001,
83  mwResolveMatch_GROUP = 0x00000002,
84 };
85 
86 
88  char *id;
89  char *name;
90  char *desc;
91  guint32 type;
92 };
93 
94 
96  guint32 code;
97  char *name;
98  GList *matches;
99 };
100 
101 
112 typedef void (*mwResolveHandler)
113  (struct mwServiceResolve *srvc,
114  guint32 id, guint32 code, GList *results,
115  gpointer data);
116 
117 
120 
121 
132 guint32 mwServiceResolve_resolve(struct mwServiceResolve *srvc,
133  GList *queries, enum mwResolveFlag flags,
134  mwResolveHandler handler,
135  gpointer data, GDestroyNotify cleanup);
136 
137 
141 void mwServiceResolve_cancelResolve(struct mwServiceResolve *, guint32);
142 
143 
144 #ifdef __cplusplus
145 }
146 #endif
147 
148 
149 #endif /* _MW_SRVC_RESOLVE_H */
void mwServiceResolve_cancelResolve(struct mwServiceResolve *, guint32)
Cancel a resolve request by its generated ID.
Definition: mw_srvc_resolve.h:82
User lookup service.
char * desc
description
Definition: mw_srvc_resolve.h:90
more than one result (occurs when mwResolveFlag_UNIQUE is used and more than one result would have be...
Definition: mw_srvc_resolve.h:74
char * name
name of the result
Definition: mw_srvc_resolve.h:97
mwResolveFlag
Definition: mw_srvc_resolve.h:46
search for groups
Definition: mw_srvc_resolve.h:60
Represents a Sametime client session.
char * name
user name
Definition: mw_srvc_resolve.h:89
mwResolveCode
Definition: mw_srvc_resolve.h:65
Definition: mw_srvc_resolve.h:95
struct mwServiceResolve * mwServiceResolve_new(struct mwSession *)
Allocate a new resolve service.
guint32 type
Definition: mw_srvc_resolve.h:91
guint32 code
Definition: mw_srvc_resolve.h:96
return only the first result
Definition: mw_srvc_resolve.h:51
successful search
Definition: mw_srvc_resolve.h:67
search for users
Definition: mw_srvc_resolve.h:57
Definition: mw_srvc_resolve.h:83
void(* mwResolveHandler)(struct mwServiceResolve *srvc, guint32 id, guint32 code, GList *results, gpointer data)
Handle the results of a resolve request.
Definition: mw_srvc_resolve.h:113
return unique results or none at all
Definition: mw_srvc_resolve.h:48
guint32 mwServiceResolve_resolve(struct mwServiceResolve *srvc, GList *queries, enum mwResolveFlag flags, mwResolveHandler handler, gpointer data, GDestroyNotify cleanup)
Inisitate a resolve request.
mwResolveMatchType
Definition: mw_srvc_resolve.h:81
the name is not resolvable due to its format
Definition: mw_srvc_resolve.h:77
GList * matches
list of mwResolveMatch
Definition: mw_srvc_resolve.h:98
only some of the nested searches were successful
Definition: mw_srvc_resolve.h:70
search all directories, not just the first with a match
Definition: mw_srvc_resolve.h:54
Definition: mw_srvc_resolve.h:87
char * id
user id
Definition: mw_srvc_resolve.h:88