首页 | 数据结构 | 文件列表 | 数据字段 | 全局定义

qq.h

浏览该文件的文档。
00001 
00023 // START OF FILE
00024 /*****************************************************************************/
00025 #ifndef _QQ_QQ_H_
00026 #define _QQ_QQ_H_
00027 
00028 #include <glib.h>
00029 #include "proxy.h"              // GaimProxyType
00030 #include "internal.h"           // socket
00031 #include "roomlist.h"           // GaimRoomlist
00032 #include "ft.h"         // GaimXfer
00033 
00034 #define QQ_KEY_LENGTH       16
00035 #define QQ_DEBUG            1   // whether we are doing DEBUG
00036 
00037 typedef struct _qq_data qq_data;
00038 typedef struct _qq_buddy qq_buddy;
00039 
00040 struct _qq_buddy {
00041         guint32 uid;
00042         guint8 icon;            // index: 01 - 85
00043         guint8 age;
00044         guint8 gender;
00045         gchar *nickname;
00046         guint8 ip[4];
00047         guint16 port;
00048         guint8 status;
00049         guint8 flag1;
00050         guint8 comm_flag;       // details in qq_buddy_list.c
00051         guint16 client_version; // added by gfhuang
00052         time_t signon;
00053         time_t idle;
00054         time_t last_refresh;
00055 };
00056 
00057 struct _qq_data {
00058         gint fd;                // socket file handler
00059         guint32 uid;            // QQ number
00060         guint8 *inikey;         // initial key to encrypt login packet
00061         guint8 *pwkey;          // password in md5 (or md5' md5)
00062         guint8 *session_key;    // later use this as key in this session
00063 
00064         guint16 send_seq;       // send sequence number
00065         guint8 login_mode;      // online of invisible
00066         guint8 status;          // 
00067         gboolean logged_in;     // used by qq-add_buddy
00068         gboolean use_tcp;       // network in tcp or udp
00069         //modify by Yuan Qingyun
00070         guint8 token_len; //login token length
00071         guint8 * ptoken;  //login token
00072         guint8 * pGroupUnknown;
00073         GaimProxyType proxy_type;       // proxy type
00074         GaimXfer *xfer;         // file transfer handler
00075         struct sockaddr_in dest_sin;
00076 
00077         // from real connction
00078         gchar *server_ip;
00079         guint16 server_port;
00080         // get from login reply packet
00081         time_t login_time;
00082         time_t last_login_time;
00083         gchar *last_login_ip;
00084         // get from keep_alive packet
00085         gchar *my_ip;           // my ip address detected by server
00086         guint16 my_port;        // my port detected by server
00087         guint8 my_icon;         // my icon index
00088         guint32 all_online;     // the number of online QQ users
00089         time_t last_get_online; // last time send get_friends_online packet
00090 
00091         guint8 window[1 << 13]; // check up for duplicated packet
00092         gint sendqueue_timeout;
00093 
00094         GaimRoomlist *roomlist;
00095         gint channel;           // the id for opened chat conversation
00096 
00097         GList *groups;
00098         GList *group_packets;
00099         GList *buddies;
00100         GList *contact_info_window;
00101         GList *qun_info_window;
00102         GList *sendqueue;
00103         GList *info_query;
00104         GList *add_buddy_request;
00105         GQueue *before_login_packets;
00106 };
00107 
00108 void qq_function_not_implemented(GaimConnection * gc);
00109 
00110 #endif
00111 /*****************************************************************************/
00112 // END OF FILE

Generated at Mon May 8 15:41:24 2006 for OpenQ by  doxygen 1.4.4