mark PurpleImageClass as private
[pidgin-git.git] / pidgin / plugins / disco / xmppdisco.h
blob70068ff89291a187e1989d485452b38e8c0db47f
1 /* pidgin
3 * Pidgin is the legal property of its developers, whose names are too numerous
4 * to list here. Please refer to the COPYRIGHT file distributed with this
5 * source distribution.
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
22 #ifndef PIDGIN_XMPP_DISCO_H
23 #define PIDGIN_XMPP_DISCO_H
25 typedef struct _XmppDiscoService XmppDiscoService;
27 #include "gtkdisco.h"
29 #define XMPP_PROTOCOL_ID "prpl-jabber"
30 #define NS_DISCO_INFO "http://jabber.org/protocol/disco#info"
31 #define NS_DISCO_ITEMS "http://jabber.org/protocol/disco#items"
32 #define NS_MUC "http://jabber.org/protocol/muc"
33 #define NS_REGISTER "jabber:iq:register"
35 #define PLUGIN_ID "gtk-xmppdisco"
36 #define PLUGIN_DOMAIN (g_quark_from_static_string(PLUGIN_ID))
38 #include "plugins.h"
39 extern PurplePlugin *my_plugin;
41 /**
42 * The types of services.
44 typedef enum
46 XMPP_DISCO_SERVICE_TYPE_UNSET,
47 /**
48 * A registerable gateway to another protocol. An example would be
49 * XMPP legacy transports.
51 XMPP_DISCO_SERVICE_TYPE_GATEWAY,
53 /**
54 * A directory (e.g. allows the user to search for other users).
56 XMPP_DISCO_SERVICE_TYPE_DIRECTORY,
58 /**
59 * A chat (multi-user conversation).
61 XMPP_DISCO_SERVICE_TYPE_CHAT,
63 /**
64 * A pubsub collection (contains nodes)
66 XMPP_DISCO_SERVICE_TYPE_PUBSUB_COLLECTION,
68 /**
69 * A pubsub leaf (contains stuff, not nodes).
71 XMPP_DISCO_SERVICE_TYPE_PUBSUB_LEAF,
73 /**
74 * Something else. Do we need more categories?
76 XMPP_DISCO_SERVICE_TYPE_OTHER
77 } XmppDiscoServiceType;
79 /**
80 * The flags of services.
82 typedef enum
84 XMPP_DISCO_NONE = 0x0000,
85 XMPP_DISCO_ADD = 0x0001, /**< Supports an 'add' operation */
86 XMPP_DISCO_BROWSE = 0x0002, /**< Supports browsing */
87 XMPP_DISCO_REGISTER = 0x0004 /**< Supports a 'register' operation */
88 } XmppDiscoServiceFlags;
90 struct _XmppDiscoService {
91 PidginDiscoList *list;
92 gchar *name;
93 gchar *description;
95 gchar *gateway_type;
96 XmppDiscoServiceType type;
97 XmppDiscoServiceFlags flags;
99 XmppDiscoService *parent;
100 gchar *jid;
101 gchar *node;
102 gboolean expanded;
105 void xmpp_disco_start(PidginDiscoList *list);
107 void xmpp_disco_service_expand(XmppDiscoService *service);
108 void xmpp_disco_service_register(XmppDiscoService *service);
110 #endif /* PIDGIN_XMPP_DISCO_H */