source: protocols/jabber/jabber.h @ 0b4a0db

Last change on this file since 0b4a0db was 0b4a0db, checked in by Wilmer van der Gaast <wilmer@…>, at 2006-09-20T20:26:47Z

Now parsing roster properly. (Hopefully...)

  • Property mode set to 100644
File size: 3.0 KB
Line 
1/***************************************************************************\
2*                                                                           *
3*  BitlBee - An IRC to IM gateway                                           *
4*  Jabber module - Main file                                                *
5*                                                                           *
6*  Copyright 2006 Wilmer van der Gaast <wilmer@gaast.net>                   *
7*                                                                           *
8*  This program is free software; you can redistribute it and/or modify     *
9*  it under the terms of the GNU General Public License as published by     *
10*  the Free Software Foundation; either version 2 of the License, or        *
11*  (at your option) any later version.                                      *
12*                                                                           *
13*  This program is distributed in the hope that it will be useful,          *
14*  but WITHOUT ANY WARRANTY; without even the implied warranty of           *
15*  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            *
16*  GNU General Public License for more details.                             *
17*                                                                           *
18*  You should have received a copy of the GNU General Public License along  *
19*  with this program; if not, write to the Free Software Foundation, Inc.,  *
20*  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.              *
21*                                                                           *
22\***************************************************************************/
23
24#ifndef _JABBER_H
25#define _JABBER_H
26
27#include <glib.h>
28
29#include "xmltree.h"
30#include "bitlbee.h"
31
32typedef enum
33{
34        JFLAG_STREAM_STARTED = 1,
35        JFLAG_AUTHENTICATED = 2,
36} jabber_flags_t;
37
38/* iq.c */
39xt_status jabber_pkt_iq( struct xt_node *node, gpointer data );
40int jabber_start_auth( struct gaim_connection *gc );
41int jabber_get_roster( struct gaim_connection *gc );
42
43xt_status jabber_pkt_message( struct xt_node *node, gpointer data );
44
45/* presence.c */
46xt_status jabber_pkt_presence( struct xt_node *node, gpointer data );
47int presence_announce( struct gaim_connection *gc );
48
49/* jabber_util.c */
50char *set_eval_resprio( set_t *set, char *value );
51char *set_eval_tls( set_t *set, char *value );
52struct xt_node *jabber_make_packet( char *name, char *type, char *to, struct xt_node *children );
53
54/* io.c */
55int jabber_write_packet( struct gaim_connection *gc, struct xt_node *node );
56int jabber_write( struct gaim_connection *gc, char *buf, int len );
57gboolean jabber_connected_plain( gpointer data, gint source, b_input_condition cond );
58
59struct jabber_data
60{
61        struct gaim_connection *gc;
62       
63        int fd;
64        void *ssl;
65        char *txq;
66        int tx_len;
67        int r_inpa, w_inpa;
68       
69        struct xt_parser *xt;
70        jabber_flags_t flags;
71       
72        char *username;         /* USERNAME@server */
73        char *server;           /* username@SERVER -=> server/domain, not hostname */
74};
75
76#endif
Note: See TracBrowser for help on using the repository browser.