Applied the GPL to all source files
[cascardo/rnetproxy.git] / jabber.c
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 #include <gnet.h>
21 #include <glib.h>
22 #include "jabber.h"
23
24 static void jabber_connect (net_hook_t* hook)
25 {
26 }
27
28 static void jabber_close (net_hook_t* hook)
29 {
30 }
31
32 static void jabber_write (net_hook_t* hook)
33 {
34 }
35
36 static void jabber_read (net_hook_t* hook, gchar* buffer, size_t len)
37 {
38 }
39
40 net_hook_t* jabber_hook_new (GConn* conn)
41 {
42   net_hook_t* hook;
43   hook = g_slice_new (net_hook_t);
44   hook->conn = conn;
45   hook->peer = NULL;
46   hook->server = FALSE;
47   hook->connect = jabber_connect;
48   hook->close = jabber_close;
49   hook->write = jabber_write;
50   hook->read = jabber_read;
51   hook->data = NULL;
52   gnet_conn_set_callback (hook->conn, nethook_event, hook);
53   return hook;
54 }
55
56 void jabber_destroy (net_hook_t* hook)
57 {
58   g_slice_free (net_hook_t, hook);
59 }