pep.h
changeset 8 b98346c5040d
parent 0 1d7a0bc3e38b
equal deleted inserted replaced
7:4b96709ac242 8:b98346c5040d
     1 /*
     1 
     2  * disco.c         -- Service discovery requests
     2 /* Copyright 2009 Myhailo Danylenko
     3  *
     3  *
     4  * Copyrigth (C) 2009      Myhailo Danylenko <isbear@ukrpost.net>
     4  * Common pep event listener
     5  *
     5  *
     6  * This program is free software; you can redistribute it and/or modify
     6  * This file is part of mcabber-pep
       
     7  *
       
     8  * mcabber-pep is free software: you can redistribute it and/or modify
     7  * it under the terms of the GNU General Public License as published by
     9  * it under the terms of the GNU General Public License as published by
     8  * the Free Software Foundation; either version 2 of the License, or (at
    10  * the Free Software Foundation, either version 2 of the License, or
     9  * your option) any later version.
    11  * (at your option) any later version.
    10  *
    12  *
    11  * This program is distributed in the hope that it will be useful, but
    13  * This program is distributed in the hope that it will be useful,
    12  * WITHOUT ANY WARRANTY; without even the implied warranty of
    14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
    15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    14  * General Public License for more details.
    16  * GNU General Public License for more details.
    15  *
    17  *
    16  * You should have received a copy of the GNU General Public License
    18  * You should have received a copy of the GNU General Public License
    17  * along with this program; if not, write to the Free Software
    19  * along with this program.  If not, see <http://www.gnu.org/licenses/>. */
    18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
       
    19  * USA
       
    20  */
       
    21 
    20 
    22 #ifndef MCABBER_PEP_H
    21 #ifndef MCABBER_PEP_H
    23 #define MCABBER_PEP_H
    22 #define MCABBER_PEP_H
    24 
    23 
    25 #include <glib.h>
    24 #include <glib.h>
    26 #include <gmodule.h>
       
    27 #include <loudmouth/loudmouth.h>
    25 #include <loudmouth/loudmouth.h>
    28 
    26 
    29 #define NS_PUBSUB_EVENT ( "http:/" "/jabber.org/protocol/pubsub#event" )
    27 #define NS_PUBSUB_EVENT ( "http:/" "/jabber.org/protocol/pubsub#event" )
    30 #define NS_PUBSUB       ( "http:/" "/jabber.org/protocol/pubsub" )
    28 #define NS_PUBSUB       ( "http:/" "/jabber.org/protocol/pubsub" )
    31 
    29 
    32 typedef struct pep_handler_struct pep_handler_t;
    30 typedef void (*pep_xmlns_handler_t) (const gchar *from, const gchar *node, LmMessageNode *n, const gchar *id, gpointer userdata);
    33 
    31 
    34 struct pep_handler_struct {
    32 void pep_register_xmlns_handler (const gchar *xmlns, pep_xmlns_handler_t handler, gpointer udata, GDestroyNotify notify);
    35 	gchar     *xmlns;
       
    36 	gpointer   data;
       
    37 	void     (*handler) (const gchar *from, const gchar *node, LmMessageNode *n, const gchar *id, gpointer userdata);
       
    38 	void     (*data_destroy) (pep_handler_t *handler);
       
    39 };
       
    40 
       
    41 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));
       
    42 void pep_unregister_xmlns_handler (const gchar *xmlns);
    33 void pep_unregister_xmlns_handler (const gchar *xmlns);
    43 
    34 
    44 #endif
    35 #endif
    45 
    36 
    46 /* vim: se ts=4: */
    37 /* vim: se ts=4 sw=4: */