Mercurial > pidgin.yaz
comparison libpurple/protocols/qq/send_file.h @ 15374:5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
author | Sean Egan <seanegan@gmail.com> |
---|---|
date | Sat, 20 Jan 2007 02:32:10 +0000 |
parents | |
children | 32c366eeeb99 |
comparison
equal
deleted
inserted
replaced
15373:f79e0f4df793 | 15374:5fe8042783c1 |
---|---|
1 /** | |
2 * @file send_file.h | |
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 #ifndef _QQ_QQ_SEND_FILE_H_ | |
26 #define _QQ_QQ_SEND_FILE_H_ | |
27 | |
28 #include "ft.h" | |
29 | |
30 typedef struct _ft_info { | |
31 guint32 to_uid; | |
32 guint16 send_seq; | |
33 guint8 file_session_key[16]; | |
34 guint8 conn_method; | |
35 guint32 remote_internet_ip; | |
36 guint16 remote_internet_port; | |
37 guint16 remote_major_port; | |
38 guint32 remote_real_ip; | |
39 guint16 remote_minor_port; | |
40 guint32 local_internet_ip; | |
41 guint16 local_internet_port; | |
42 guint16 local_major_port; | |
43 guint32 local_real_ip; | |
44 guint16 local_minor_port; | |
45 /* we use these to control the packets sent or received */ | |
46 guint32 fragment_num; | |
47 guint32 fragment_len; | |
48 /* The max index of sending/receiving fragment | |
49 * for sender, it is the lower bolder of a slide window for sending | |
50 * for receiver, it seems that packets having a fragment index lower | |
51 * than max_fragment_index have been received already | |
52 */ | |
53 guint32 max_fragment_index; | |
54 guint32 window; | |
55 | |
56 /* It seems that using xfer's function is not enough for our | |
57 * transfer module. So I will use our own structure instead | |
58 * of xfer provided | |
59 */ | |
60 int major_fd; | |
61 int minor_fd; | |
62 int sender_fd; | |
63 int recv_fd; | |
64 FILE *dest_fp; | |
65 /* guint8 *buffer; */ | |
66 gboolean use_major; | |
67 } ft_info; | |
68 | |
69 void qq_process_recv_file_accept(guint8 *data, guint8 **cursor, gint data_len, | |
70 guint32 sender_uid, GaimConnection *gc); | |
71 void qq_process_recv_file_reject(guint8 *data, guint8 **cursor, gint data_len, | |
72 guint32 sender_uid, GaimConnection *gc); | |
73 void qq_process_recv_file_cancel(guint8 *data, guint8 **cursor, gint data_len, | |
74 guint32 sender_uid, GaimConnection *gc); | |
75 void qq_process_recv_file_request(guint8 *data, guint8 **cursor, gint data_len, | |
76 guint32 sender_uid, GaimConnection *gc); | |
77 void qq_process_recv_file_notify(guint8 *data, guint8 **cursor, gint data_len, | |
78 guint32 sender_uid, GaimConnection *gc); | |
79 gboolean qq_can_receive_file(GaimConnection *gc, const char *who); | |
80 void qq_send_file(GaimConnection *gc, const char *who, const char *file); | |
81 void qq_get_conn_info(guint8 *data, guint8 **cursor, gint data_len, ft_info *info); | |
82 gint qq_fill_conn_info(guint8 *data, guint8 **cursor, ft_info *info); | |
83 gssize _qq_xfer_write(const guint8 *buf, size_t len, GaimXfer *xfer); | |
84 | |
85 #endif |