Remove protocol detection altogether
[cascardo/rnetproxy.git] / jabber.h
1 /*
2 ** Copyright (C) 2006 Thadeu Lima de Souza Cascardo <cascardo@minaslivre.org>
3 **  
4 ** This program is free software; you can redistribute it and/or modify
5 ** it under the terms of the GNU General Public License as published by
6 ** the Free Software Foundation; either version 2 of the License, or
7 ** (at your option) any later version.
8 **  
9 ** This program is distributed in the hope that it will be useful,
10 ** but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 ** GNU General Public License for more details.
13 **  
14 ** You should have received a copy of the GNU General Public License
15 ** along with this program; if not, write to the Free Software
16 ** Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 **  
18 */
19
20 #ifndef JABBER_H
21 #define JABBER_H
22
23 #include <gnet.h>
24 #include <iksemel.h>
25 #include <gsasl.h>
26 #include "nethook.h"
27
28 typedef struct _jabber_data_t jabber_data_t;
29
30 struct _jabber_data_t
31 {
32   iksparser *parser;
33   Gsasl *ctx;
34   Gsasl_session *client;
35   Gsasl_session *server;
36 };
37
38 jabber_data_t* jabber_data_new (gpointer, gpointer);
39 void jabber_data_destroy (gpointer);
40
41 net_hook_t* jabber_hook_new (GConn *conn);
42 void jabber_hook_destroy (net_hook_t*);
43 net_hook_t* jabber_server_hook_new (net_hook_t*, char*);
44 GString* jabber_new_start (iks* node);
45
46 #endif