--- a/pep.h Wed Nov 11 17:05:46 2009 +0200
+++ b/pep.h Sat Dec 26 04:18:28 2009 +0200
@@ -1,46 +1,37 @@
-/*
- * disco.c -- Service discovery requests
+
+/* Copyright 2009 Myhailo Danylenko
*
- * Copyrigth (C) 2009 Myhailo Danylenko <isbear@ukrpost.net>
+ * Common pep event listener
*
- * This program is free software; you can redistribute it and/or modify
+ * This file is part of mcabber-pep
+ *
+ * mcabber-pep 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.
+ * 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.
+ * 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
- */
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. */
#ifndef MCABBER_PEP_H
#define MCABBER_PEP_H
#include <glib.h>
-#include <gmodule.h>
#include <loudmouth/loudmouth.h>
#define NS_PUBSUB_EVENT ( "http:/" "/jabber.org/protocol/pubsub#event" )
#define NS_PUBSUB ( "http:/" "/jabber.org/protocol/pubsub" )
-typedef struct pep_handler_struct pep_handler_t;
+typedef void (*pep_xmlns_handler_t) (const gchar *from, const gchar *node, LmMessageNode *n, const gchar *id, gpointer userdata);
-struct pep_handler_struct {
- gchar *xmlns;
- gpointer data;
- void (*handler) (const gchar *from, const gchar *node, LmMessageNode *n, const gchar *id, gpointer userdata);
- void (*data_destroy) (pep_handler_t *handler);
-};
-
-void pep_register_xmlns_handler (const gchar *xmlns, void (*handler) (const gchar *from, const gchar *node, LmMessageNode *n, const gchar *id, gpointer udata), gpointer udata, void (*data_destroy) (pep_handler_t *handler));
+void pep_register_xmlns_handler (const gchar *xmlns, pep_xmlns_handler_t handler, gpointer udata, GDestroyNotify notify);
void pep_unregister_xmlns_handler (const gchar *xmlns);
#endif
-/* vim: se ts=4: */
+/* vim: se ts=4 sw=4: */