comparison src/protocols/bonjour/jabber.h @ 11477:36f575351c49

[gaim-migrate @ 13719] Commit the Bonjour code from oldstatus to HEAD. It hasn't been updated for the new status code yet. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Fri, 09 Sep 2005 12:34:27 +0000
parents
children 5a2c38d33eb4
comparison
equal deleted inserted replaced
11476:5d3f8d9e8f92 11477:36f575351c49
1 /**
2 * @file jabber.h The Gaim interface to mDNS and peer to peer Jabber.
3 *
4 * gaim
5 *
6 * Gaim is the legal property of its developers, whose names are too numerous
7 * to list here. Please refer to the COPYRIGHT file distributed with this
8 * source distribution.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23 *
24 */
25
26 #ifndef _BONJOUR_JABBER_H_
27 #define _BONJOUR_JABBER_H_
28
29 #include "account.h"
30
31 #define DOCTYPE_DECLARATION "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>"
32 #define STREAM_START "<stream:stream xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\">"
33 #define CONVERSATION_START "<?xml version=\"1.0\" encoding=\"UTF-8\" ?><stream:stream xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\">"
34 #define STREAM_END "</stream:stream>"
35 #define DOCTYPE "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n<stream:stream xmlns=\"jabber:client\" xmlns:stream=\"http://etherx.jabber.org/streams\" >"
36 typedef struct _bonjour_jabber{
37 gint port;
38 gint socket;
39 gint watcher_id;
40 char* name;
41 GaimAccount* account;
42 }BonjourJabber;
43
44 typedef struct _bonjour_jabber_conversation{
45 gint socket;
46 gint watcher_id;
47 gchar* buddy_name;
48 gboolean start_step_one;
49 gboolean start_step_two;
50 gboolean stream_started;
51 gint message_id;
52 }BonjourJabberConversation;
53
54 /**
55 * Start listening for jabber connections. Returns 0 if the connection could be
56 * stablished, -1 if a problem appears.
57 */
58 gint bonjour_jabber_start(BonjourJabber* data);
59
60 void bonjour_jabber_send_message(BonjourJabber* data, const gchar* to, const gchar* body);
61
62 void bonjour_jabber_close_conversation(BonjourJabber* data, GaimBuddy* gb);
63
64 void bonjour_jabber_stop(BonjourJabber* data);
65
66
67 #endif /* _BONJOUR_JABBER_H_ */