|
1 |
|
2 /* Copyright 2009 Myhailo Danylenko |
|
3 * |
|
4 * Service discovery requests |
|
5 * |
|
6 * This file is part of mcabber-disco |
|
7 * |
|
8 * mcabber-disco is free software: you can redistribute it and/or modify |
|
9 * it under the terms of the GNU General Public License as published by |
|
10 * the Free Software Foundation, either version 2 of the License, or |
|
11 * (at your option) any later version. |
|
12 * |
|
13 * This program is distributed in the hope that it will be useful, |
|
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
16 * GNU General Public License for more details. |
|
17 * |
|
18 * You should have received a copy of the GNU General Public License |
|
19 * along with this program. If not, see <http://www.gnu.org/licenses/>. */ |
|
20 |
|
21 #ifndef MCABBER_DISCO_H |
|
22 #define MCABBER_DISCO_H |
|
23 |
|
24 #include <glib.h> |
|
25 |
|
26 typedef struct { |
|
27 const gchar *category; |
|
28 const gchar *type; |
|
29 const gchar *reserved; // FIXME: look up in standard, what is fourth parameter |
|
30 const gchar *name; |
|
31 } disco_identity_t; |
|
32 |
|
33 typedef const gchar *disco_feature_t; |
|
34 |
|
35 typedef struct { |
|
36 const gchar *jid; |
|
37 const gchar *name; |
|
38 const gchar *node; |
|
39 } disco_item_t; |
|
40 |
|
41 typedef void (*disco_info_handler_t) (GSList *identities, GSList *features, gpointer userdata); |
|
42 typedef void (*disco_items_handler_t) (GSList *items, gpointer userdata); |
|
43 |
|
44 void disco_info_request (const gchar *jid, const gchar *node, disco_info_handler_t handler, gpointer userdata, GDestroyNotify notify); |
|
45 void disco_items_request (const gchar *jid, const gchar *node, disco_items_handler_t handler, gpointer userdata, GDestroyNotify notify); |
|
46 |
|
47 #endif |
|
48 |