disco.h
author Myhailo Danylenko <isbear@ukrpost.net>
Sat, 02 Jan 2010 12:42:27 +0200
changeset 16 e903da874e63
child 25 05469ec9c2e0
permissions -rw-r--r--
Provide public interface to disco requests


/* Copyright 2009 Myhailo Danylenko
 *
 * Service discovery requests
 *
 * This file is part of mcabber-disco
 *
 * mcabber-disco 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, see <http://www.gnu.org/licenses/>. */

#ifndef MCABBER_DISCO_H
#define MCABBER_DISCO_H

#include <glib.h>

typedef struct {
	const gchar *category;
	const gchar *type;
	const gchar *reserved; // FIXME: look up in standard, what is fourth parameter
	const gchar *name;
} disco_identity_t;

typedef const gchar *disco_feature_t;

typedef struct {
	const gchar *jid;
	const gchar *name;
	const gchar *node;
} disco_item_t;

typedef void (*disco_info_handler_t) (GSList *identities, GSList *features, gpointer userdata);
typedef void (*disco_items_handler_t) (GSList *items, gpointer userdata);

void disco_info_request  (const gchar *jid, const gchar *node, disco_info_handler_t  handler, gpointer userdata, GDestroyNotify notify);
void disco_items_request (const gchar *jid, const gchar *node, disco_items_handler_t handler, gpointer userdata, GDestroyNotify notify);

#endif