00001 #ifndef _QQ_QQ_SEND_FILE_H_
00002 #define _QQ_QQ_SEND_FILE_H_
00003
00004 #include "ft.h"
00005
00006 typedef struct _ft_info {
00007 guint32 to_uid;
00008 guint16 send_seq;
00009 guint8 file_session_key[16];
00010 guint8 conn_method;
00011 guint32 remote_internet_ip;
00012 guint16 remote_internet_port;
00013 guint16 remote_major_port;
00014 guint32 remote_real_ip;
00015 guint16 remote_minor_port;
00016 guint32 local_internet_ip;
00017 guint16 local_internet_port;
00018 guint16 local_major_port;
00019 guint32 local_real_ip;
00020 guint16 local_minor_port;
00021
00022 guint32 fragment_num;
00023 guint32 fragment_len;
00024
00025
00026
00027
00028
00029 guint32 max_fragment_index;
00030 guint32 window;
00031
00032
00033
00034
00035
00036 int major_fd;
00037 int minor_fd;
00038 int sender_fd;
00039 int recv_fd;
00040 union {
00041 FILE *dest_fp;
00042 guint8 *buffer;
00043 };
00044 gboolean use_major;
00045 } ft_info;
00046
00047 void qq_process_recv_file_accept
00048 (guint8 * data, guint8 ** cursor, gint data_len, guint32 sender_uid,
00049 GaimConnection * gc);
00050 void qq_process_recv_file_reject
00051 (guint8 * data, guint8 ** cursor, gint data_len, guint32 sender_uid,
00052 GaimConnection * gc);
00053 void qq_process_recv_file_cancel
00054 (guint8 * data, guint8 ** cursor, gint data_len, guint32 sender_uid,
00055 GaimConnection * gc);
00056 void qq_process_recv_file_request
00057 (guint8 * data, guint8 ** cursor, gint data_len, guint32 sender_uid,
00058 GaimConnection * gc);
00059 void qq_process_recv_file_notify
00060 (guint8 * data, guint8 ** cursor, gint data_len, guint32 sender_uid,
00061 GaimConnection * gc);
00062 void qq_send_file(GaimConnection *gc, const char *who, const char *file);
00063 void qq_get_conn_info(guint8 *data, guint8 **cursor, gint data_len, ft_info *info);
00064 gint qq_fill_conn_info(guint8 *data, guint8 **cursor, ft_info *info);
00065 #endif