meanwhile  1.0.2
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 #include <glib/glist.h>
27 
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 
35 #define mwService_RESOLVE 0x00000015
36 
37 
39 #define SEARCH_ERROR 0x00
40 
41 
44 struct mwServiceResolve;
45 
46 
49  mwResolveFlag_UNIQUE = 0x00000001,
50 
52  mwResolveFlag_FIRST = 0x00000002,
53 
55  mwResolveFlag_ALL_DIRS = 0x00000004,
56 
58  mwResolveFlag_USERS = 0x00000008,
59 
61  mwResolveFlag_GROUPS = 0x00000010,
62 };
63 
64 
68  mwResolveCode_SUCCESS = 0x00000000,
69 
71  mwResolveCode_PARTIAL = 0x00010000,
72 
75  mwResolveCode_MULTIPLE = 0x80020000,
76 
79 };
80 
81 
83  mwResolveMatch_USER = 0x00000001,
84  mwResolveMatch_GROUP = 0x00000002,
85 };
86 
87 
89  char *id;
90  char *name;
91  char *desc;
92  guint32 type;
93 };
94 
95 
97  guint32 code;
98  char *name;
99  GList *matches;
100 };
101 
102 
113 typedef void (*mwResolveHandler)
114  (struct mwServiceResolve *srvc,
115  guint32 id, guint32 code, GList *results,
116  gpointer data);
117 
118 
121 
122 
133 guint32 mwServiceResolve_resolve(struct mwServiceResolve *srvc,
134  GList *queries, enum mwResolveFlag flags,
135  mwResolveHandler handler,
136  gpointer data, GDestroyNotify cleanup);
137 
138 
142 void mwServiceResolve_cancelResolve(struct mwServiceResolve *, guint32);
143 
144 
145 #ifdef __cplusplus
146 }
147 #endif
148 
149 
150 #endif /* _MW_SRVC_RESOLVE_H */