Mercurial > pidgin.yaz
comparison libpurple/protocols/qq/qq.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 qq.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_H_ | |
26 #define _QQ_QQ_H_ | |
27 | |
28 #include <glib.h> | |
29 #include "ft.h" | |
30 #include "internal.h" | |
31 #include "proxy.h" | |
32 #include "roomlist.h" | |
33 | |
34 #define QQ_FACES 100 | |
35 #define QQ_KEY_LENGTH 16 | |
36 #define QQ_DEBUG 1 /* whether we are doing DEBUG */ | |
37 | |
38 #ifdef _WIN32 | |
39 const char *qq_win32_buddy_icon_dir(void); | |
40 #define QQ_BUDDY_ICON_DIR qq_win32_buddy_icon_dir() | |
41 #endif | |
42 | |
43 typedef struct _qq_data qq_data; | |
44 typedef struct _qq_buddy qq_buddy; | |
45 | |
46 struct _qq_buddy { | |
47 guint32 uid; | |
48 guint16 face; /* index: 0 - 299 */ | |
49 guint8 age; | |
50 guint8 gender; | |
51 gchar *nickname; | |
52 guint8 ip[4]; | |
53 guint16 port; | |
54 guint8 status; | |
55 guint8 flag1; | |
56 guint8 comm_flag; /* details in qq_buddy_list.c */ | |
57 guint16 client_version; | |
58 guint8 onlineTime; | |
59 guint16 level; | |
60 guint16 timeRemainder; | |
61 time_t signon; | |
62 time_t idle; | |
63 time_t last_refresh; | |
64 | |
65 gint8 role; /* role in group, used only in group->members list */ | |
66 }; | |
67 | |
68 struct _qq_data { | |
69 gint fd; /* socket file handler */ | |
70 guint32 uid; /* QQ number */ | |
71 guint8 *inikey; /* initial key to encrypt login packet */ | |
72 guint8 *pwkey; /* password in md5 (or md5' md5) */ | |
73 guint8 *session_key; /* later use this as key in this session */ | |
74 guint8 *session_md5; /* concatenate my uid with session_key and md5 it */ | |
75 | |
76 guint16 send_seq; /* send sequence number */ | |
77 guint8 login_mode; /* online of invisible */ | |
78 gboolean logged_in; /* used by qq-add_buddy */ | |
79 gboolean use_tcp; /* network in tcp or udp */ | |
80 | |
81 GaimProxyType proxy_type; | |
82 GaimConnection *gc; | |
83 | |
84 GaimXfer *xfer; /* file transfer handler */ | |
85 struct sockaddr_in dest_sin; | |
86 | |
87 /* from real connction */ | |
88 gchar *server_ip; | |
89 guint16 server_port; | |
90 /* get from login reply packet */ | |
91 time_t login_time; | |
92 time_t last_login_time; | |
93 gchar *last_login_ip; | |
94 /* get from keep_alive packet */ | |
95 gchar *my_ip; /* my ip address detected by server */ | |
96 guint16 my_port; /* my port detected by server */ | |
97 guint16 my_icon; /* my icon index */ | |
98 guint16 my_level; /* my level */ | |
99 guint32 all_online; /* the number of online QQ users */ | |
100 time_t last_get_online; /* last time send get_friends_online packet */ | |
101 | |
102 guint8 window[1 << 13]; /* check up for duplicated packet */ | |
103 gint sendqueue_timeout; | |
104 | |
105 GaimRoomlist *roomlist; | |
106 gint channel; /* the id for opened chat conversation */ | |
107 | |
108 GList *groups; | |
109 GList *group_packets; | |
110 GSList *joining_groups; | |
111 GSList *adding_groups_from_server; /* internal ids of groups the server wants in my blist */ | |
112 GList *buddies; | |
113 GList *contact_info_window; | |
114 GList *group_info_window; | |
115 GList *sendqueue; | |
116 GList *info_query; | |
117 GList *add_buddy_request; | |
118 GQueue *before_login_packets; | |
119 | |
120 /* TODO pass qq_send_packet_get_info() a callback and use signals to get rid of these */ | |
121 gboolean modifying_info; | |
122 gboolean modifying_face; | |
123 }; | |
124 | |
125 void qq_function_not_implemented(GaimConnection *gc); | |
126 | |
127 #endif |