comparison libpurple/protocols/bonjour/bonjour_ft.h @ 21440:d8106b63b0a4

I thought I was just fixing a leak in this commit, but it turns out I forgot to add the new files in the previous commit.
author Daniel Atallah <daniel.atallah@gmail.com>
date Mon, 12 Nov 2007 04:17:10 +0000
parents
children dc703f13449a
comparison
equal deleted inserted replaced
21439:8fbd51946259 21440:d8106b63b0a4
1 /*
2 * purple - Bonjour Protocol Plugin
3 *
4 * Purple is the legal property of its developers, whose names are too numerous
5 * to list here. Please refer to the COPYRIGHT file distributed with this
6 * source distribution.
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
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22 #ifndef _BONJOUR_FT_H_
23 #define _BONJOUR_FT_H_
24 #include "network.h"
25 #include "proxy.h"
26 typedef struct _XepXfer XepXfer;
27 typedef enum {
28 XEP_BYTESTREAMS = 1,
29 XEP_IBB = 2,
30 XEP_UNKNOWN = 4,
31 } XepSiMode;
32
33 struct _XepXfer
34 {
35 void *data;
36 char *filename;
37 int filesize;
38 int id;
39 char *sid;
40 char *recv_id;
41 char *buddy_ip;
42 int mode;
43 PurpleNetworkListenData *listen_data;
44 int sock5_req_state;
45 int rxlen;
46 char rx_buf[0x500];
47 char tx_buf[0x500];
48 PurpleProxyInfo *proxy_info;
49 PurpleProxyConnectData *proxy_connection;
50 char *jid;
51 char *proxy_host;
52 int proxy_port;
53 };
54
55 /**
56 * Create a new PurpleXfer
57 *
58 * @param gc The PurpleConnection handle.
59 * @param who Who will we be sending it to?
60 */
61 PurpleXfer *bonjour_new_xfer(PurpleConnection *gc, const char *who);
62
63 /**
64 * Send a file.
65 *
66 * @param gc The PurpleConnection handle.
67 * @param who Who are we sending it to?
68 * @param file What file? If NULL, user will choose after this call.
69 */
70 void bonjour_send_file(PurpleConnection *gc, const char *who, const char *file);
71
72 void xep_si_parse(PurpleConnection *pc, xmlnode *packet, PurpleBuddy *pb);
73 void
74 xep_bytestreams_parse(PurpleConnection *pc, xmlnode *packet, PurpleBuddy *pb);
75 #endif