comparison src/protocols/qq/qq.h @ 14021:ef8490f9e823

[gaim-migrate @ 16618] Replaced all C++-style comments with C-style ones. Cleaned up some comments and implemented a more consistent formatting scheme. committer: Tailor Script <tailor@pidgin.im>
author Mark Huetsch <markhuetsch>
date Wed, 02 Aug 2006 15:35:36 +0000
parents e6977f9435a1
children
comparison
equal deleted inserted replaced
14020:13e7ba964993 14021:ef8490f9e823
18 * You should have received a copy of the GNU General Public License 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 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 20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 */ 21 */
22 22
23 // START OF FILE
24 /*****************************************************************************/
25 #ifndef _QQ_QQ_H_ 23 #ifndef _QQ_QQ_H_
26 #define _QQ_QQ_H_ 24 #define _QQ_QQ_H_
27 25
28 #include <glib.h> 26 #include <glib.h>
29 #include "proxy.h" // GaimProxyType 27 #include "ft.h"
30 #include "internal.h" // socket 28 #include "internal.h"
31 #include "roomlist.h" // GaimRoomlist 29 #include "proxy.h"
32 #include "ft.h" // GaimXfer 30 #include "roomlist.h"
33 31
34 #define QQ_KEY_LENGTH 16 32 #define QQ_KEY_LENGTH 16
35 #define QQ_DEBUG 1 // whether we are doing DEBUG 33 #define QQ_DEBUG 1 /* whether we are doing DEBUG */
36 34
37 typedef struct _qq_data qq_data; 35 typedef struct _qq_data qq_data;
38 typedef struct _qq_buddy qq_buddy; 36 typedef struct _qq_buddy qq_buddy;
39 37
40 struct _qq_buddy { 38 struct _qq_buddy {
41 guint32 uid; 39 guint32 uid;
42 guint8 icon; // index: 01 - 85 40 guint8 icon; /* index: 01 - 85 */
43 guint8 age; 41 guint8 age;
44 guint8 gender; 42 guint8 gender;
45 gchar *nickname; 43 gchar *nickname;
46 guint8 ip[4]; 44 guint8 ip[4];
47 guint16 port; 45 guint16 port;
48 guint8 status; 46 guint8 status;
49 guint8 flag1; 47 guint8 flag1;
50 guint8 comm_flag; // details in qq_buddy_list.c 48 guint8 comm_flag; /* details in qq_buddy_list.c */
51 guint16 client_version; // added by gfhuang 49 guint16 client_version;
52 time_t signon; 50 time_t signon;
53 time_t idle; 51 time_t idle;
54 time_t last_refresh; 52 time_t last_refresh;
55 53
56 gint8 role; // role in group, used only in group->members list, gfhuang 54 gint8 role; /* role in group, used only in group->members list */
57 }; 55 };
58 56
59 struct _qq_data { 57 struct _qq_data {
60 gint fd; // socket file handler 58 gint fd; /* socket file handler */
61 guint32 uid; // QQ number 59 guint32 uid; /* QQ number */
62 guint8 *inikey; // initial key to encrypt login packet 60 guint8 *inikey; /* initial key to encrypt login packet */
63 guint8 *pwkey; // password in md5 (or md5' md5) 61 guint8 *pwkey; /* password in md5 (or md5' md5) */
64 guint8 *session_key; // later use this as key in this session 62 guint8 *session_key; /* later use this as key in this session */
65 63
66 guint16 send_seq; // send sequence number 64 guint16 send_seq; /* send sequence number */
67 guint8 login_mode; // online of invisible 65 guint8 login_mode; /* online of invisible */
68 guint8 status; // 66 guint8 status;
69 gboolean logged_in; // used by qq-add_buddy 67 gboolean logged_in; /* used by qq-add_buddy */
70 gboolean use_tcp; // network in tcp or udp 68 gboolean use_tcp; /* network in tcp or udp */
71 69
72 GaimProxyType proxy_type; // proxy type 70 GaimProxyType proxy_type; /* proxy type */
73 GaimXfer *xfer; // file transfer handler 71 GaimXfer *xfer; /* file transfer handler */
74 struct sockaddr_in dest_sin; 72 struct sockaddr_in dest_sin;
75 73
76 // from real connction 74 /* from real connction */
77 gchar *server_ip; 75 gchar *server_ip;
78 guint16 server_port; 76 guint16 server_port;
79 // get from login reply packet 77 /* get from login reply packet */
80 time_t login_time; 78 time_t login_time;
81 time_t last_login_time; 79 time_t last_login_time;
82 gchar *last_login_ip; 80 gchar *last_login_ip;
83 // get from keep_alive packet 81 /* get from keep_alive packet */
84 gchar *my_ip; // my ip address detected by server 82 gchar *my_ip; /* my ip address detected by server */
85 guint16 my_port; // my port detected by server 83 guint16 my_port; /* my port detected by server */
86 guint8 my_icon; // my icon index 84 guint8 my_icon; /* my icon index */
87 guint32 all_online; // the number of online QQ users 85 guint32 all_online; /* the number of online QQ users */
88 time_t last_get_online; // last time send get_friends_online packet 86 time_t last_get_online; /* last time send get_friends_online packet */
89 87
90 guint8 window[1 << 13]; // check up for duplicated packet 88 guint8 window[1 << 13]; /* check up for duplicated packet */
91 gint sendqueue_timeout; 89 gint sendqueue_timeout;
92 90
93 GaimRoomlist *roomlist; 91 GaimRoomlist *roomlist;
94 gint channel; // the id for opened chat conversation 92 gint channel; /* the id for opened chat conversation */
95 93
96 GList *groups; 94 GList *groups;
97 GList *group_packets; 95 GList *group_packets;
98 GList *buddies; 96 GList *buddies;
99 GList *contact_info_window; 97 GList *contact_info_window;
104 GQueue *before_login_packets; 102 GQueue *before_login_packets;
105 103
106 gboolean modifying_info; 104 gboolean modifying_info;
107 }; 105 };
108 106
109 void qq_function_not_implemented(GaimConnection * gc); 107 void qq_function_not_implemented(GaimConnection *gc);
110 108
111 #endif 109 #endif
112 /*****************************************************************************/
113 // END OF FILE