/* xmpp-disco.h - XMPP Service Discovery support * * Copyright 2008 OpenMoko, Inc. * Authored by Daniel Willmann * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _XMPP_DISCO_H_ #define _XMPP_DISCO_H_ #define G_DISABLE_CAST_CHECKS #include #include #include G_BEGIN_DECLS #define XMPP_NS_DISCO_INFO "http://jabber.org/protocol/disco#info" #define XMPP_TYPE_DISCO (xmpp_disco_get_type()) #define XMPP_DISCO(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), XMPP_TYPE_DISCO, XmppDisco)) #define XMPP_DISCO_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), XMPP_TYPE_DISCO, XmppDiscoClass)) #define XMPP_IS_DISCO(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), XMPP_TYPE_DISCO)) #define XMPP_IS_DISCO_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), XMPP_TYPE_DISCO)) #define XMPP_DISCO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), XMPP_TYPE_DISCO, XmppDiscoClass)) typedef struct _XmppDisco XmppDisco; typedef struct _XmppDiscoClass XmppDiscoClass; struct _XmppDisco { GObject parent_object; }; struct _XmppDiscoClass { GObjectClass parent_class; // void (*state_changed)(XmppDisco *xmpp, gint state); }; GType xmpp_disco_get_type(void) G_GNUC_CONST; XmppDisco *xmpp_disco_new(LmConnection *connection, GError **error); void xmpp_disco_add_identity(XmppDisco *disco, const gchar *category, const gchar *type, const gchar *name); void xmpp_disco_add_feature(XmppDisco *disco, const gchar *var); XmppDiscoinfo *xmpp_disco_get_discoinfo(XmppDisco *disco); G_END_DECLS #endif /* _XMPP_DISCO_H_ */