comparison libgaim/protocols/qq/send_file.h @ 14192:60b1bc8dbf37

[gaim-migrate @ 16863] Renamed 'core' to 'libgaim' committer: Tailor Script <tailor@pidgin.im>
author Evan Schoenberg <evan.s@dreskin.net>
date Sat, 19 Aug 2006 01:50:10 +0000
parents
children 85f3808ca472
comparison
equal deleted inserted replaced
14191:009db0b357b5 14192:60b1bc8dbf37
1 #ifndef _QQ_QQ_SEND_FILE_H_
2 #define _QQ_QQ_SEND_FILE_H_
3
4 #include "ft.h"
5
6 typedef struct _ft_info {
7 guint32 to_uid;
8 guint16 send_seq;
9 guint8 file_session_key[16];
10 guint8 conn_method;
11 guint32 remote_internet_ip;
12 guint16 remote_internet_port;
13 guint16 remote_major_port;
14 guint32 remote_real_ip;
15 guint16 remote_minor_port;
16 guint32 local_internet_ip;
17 guint16 local_internet_port;
18 guint16 local_major_port;
19 guint32 local_real_ip;
20 guint16 local_minor_port;
21 /* we use these to control the packets sent or received */
22 guint32 fragment_num;
23 guint32 fragment_len;
24 /* The max index of sending/receiving fragment
25 * for sender, it is the lower bolder of a slide window for sending
26 * for receiver, it seems that packets having a fragment index lower
27 * than max_fragment_index have been received already
28 */
29 guint32 max_fragment_index;
30 guint32 window;
31
32 /* It seems that using xfer's function is not enough for our
33 * transfer module. So I will use our own structure instead
34 * of xfer provided
35 */
36 int major_fd;
37 int minor_fd;
38 int sender_fd;
39 int recv_fd;
40 union {
41 FILE *dest_fp;
42 guint8 *buffer;
43 };
44 gboolean use_major;
45 } ft_info;
46
47 void qq_process_recv_file_accept(guint8 *data, guint8 **cursor, gint data_len,
48 guint32 sender_uid, GaimConnection *gc);
49 void qq_process_recv_file_reject(guint8 *data, guint8 **cursor, gint data_len,
50 guint32 sender_uid, GaimConnection *gc);
51 void qq_process_recv_file_cancel(guint8 *data, guint8 **cursor, gint data_len,
52 guint32 sender_uid, GaimConnection *gc);
53 void qq_process_recv_file_request(guint8 *data, guint8 **cursor, gint data_len,
54 guint32 sender_uid, GaimConnection *gc);
55 void qq_process_recv_file_notify(guint8 *data, guint8 **cursor, gint data_len,
56 guint32 sender_uid, GaimConnection *gc);
57 gboolean qq_can_receive_file(GaimConnection *gc, const char *who);
58 void qq_send_file(GaimConnection *gc, const char *who, const char *file);
59 void qq_get_conn_info(guint8 *data, guint8 **cursor, gint data_len, ft_info *info);
60 gint qq_fill_conn_info(guint8 *data, guint8 **cursor, ft_info *info);
61 #endif