comparison src/protocols/qq/qq.h @ 13870:983fd420e86b

[gaim-migrate @ 16340] Performed minor cleanup of the OpenQ codebase and patched it into the Gaim trunk as a prpl, providing basic QQ functionality. committer: Tailor Script <tailor@pidgin.im>
author Mark Huetsch <markhuetsch>
date Mon, 26 Jun 2006 02:58:54 +0000
parents
children e6977f9435a1
comparison
equal deleted inserted replaced
13869:5642f4658b59 13870:983fd420e86b
1 /**
2 * The QQ2003C protocol plugin
3 *
4 * for gaim
5 *
6 * Copyright (C) 2004 Puzzlebird
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */
22
23 // START OF FILE
24 /*****************************************************************************/
25 #ifndef _QQ_QQ_H_
26 #define _QQ_QQ_H_
27
28 #include <glib.h>
29 #include "proxy.h" // GaimProxyType
30 #include "internal.h" // socket
31 #include "roomlist.h" // GaimRoomlist
32 #include "ft.h" // GaimXfer
33
34 #define QQ_KEY_LENGTH 16
35 #define QQ_DEBUG 1 // whether we are doing DEBUG
36
37 typedef struct _qq_data qq_data;
38 typedef struct _qq_buddy qq_buddy;
39
40 struct _qq_buddy {
41 guint32 uid;
42 guint8 icon; // index: 01 - 85
43 guint8 age;
44 guint8 gender;
45 gchar *nickname;
46 guint8 ip[4];
47 guint16 port;
48 guint8 status;
49 guint8 flag1;
50 guint8 comm_flag; // details in qq_buddy_list.c
51 guint16 client_version; // added by gfhuang
52 time_t signon;
53 time_t idle;
54 time_t last_refresh;
55
56 gint8 role; // role in group, used only in group->members list, gfhuang
57 };
58
59 struct _qq_data {
60 gint fd; // socket file handler
61 guint32 uid; // QQ number
62 guint8 *inikey; // initial key to encrypt login packet
63 guint8 *pwkey; // password in md5 (or md5' md5)
64 guint8 *session_key; // later use this as key in this session
65
66 guint16 send_seq; // send sequence number
67 guint8 login_mode; // online of invisible
68 guint8 status; //
69 gboolean logged_in; // used by qq-add_buddy
70 gboolean use_tcp; // network in tcp or udp
71
72 GaimProxyType proxy_type; // proxy type
73 GaimXfer *xfer; // file transfer handler
74 struct sockaddr_in dest_sin;
75
76 // from real connction
77 gchar *server_ip;
78 guint16 server_port;
79 // get from login reply packet
80 time_t login_time;
81 time_t last_login_time;
82 gchar *last_login_ip;
83 // get from keep_alive packet
84 gchar *my_ip; // my ip address detected by server
85 guint16 my_port; // my port detected by server
86 guint8 my_icon; // my icon index
87 guint32 all_online; // the number of online QQ users
88 time_t last_get_online; // last time send get_friends_online packet
89
90 guint8 window[1 << 13]; // check up for duplicated packet
91 gint sendqueue_timeout;
92
93 GaimRoomlist *roomlist;
94 gint channel; // the id for opened chat conversation
95
96 GList *groups;
97 GList *group_packets;
98 GList *buddies;
99 GList *contact_info_window;
100 GList *qun_info_window;
101 GList *sendqueue;
102 GList *info_query;
103 GList *add_buddy_request;
104 GQueue *before_login_packets;
105 };
106
107 void qq_function_not_implemented(GaimConnection * gc);
108
109 #endif
110 /*****************************************************************************/
111 // END OF FILE