13870
|
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
|
|
24 // START OF FILE
|
|
25 /*****************************************************************************/
|
|
26 #ifndef _QQ_BUDDY_STATUS_H_
|
|
27 #define _QQ_BUDDY_STATUS_H_
|
|
28
|
|
29 #include <glib.h>
|
|
30 #include "connection.h" // GaimConnection
|
|
31 #include "qq.h" // QQ_KEY_LENGTH
|
|
32
|
|
33 typedef struct _qq_buddy_status {
|
|
34 guint32 uid;
|
|
35 guint8 unknown1;
|
|
36 guint8 *ip;
|
|
37 guint16 port;
|
|
38 guint8 unknown2;
|
|
39 guint8 status;
|
|
40 guint16 client_version;
|
|
41 guint8 *unknown_key;
|
|
42 } qq_buddy_status;
|
|
43
|
|
44 enum {
|
|
45 QQ_BUDDY_OFFLINE = 0x00, // by gfhuang
|
|
46 QQ_BUDDY_ONLINE_NORMAL = 0x0a, //10
|
|
47 QQ_BUDDY_ONLINE_OFFLINE = 0x14, //20
|
|
48 QQ_BUDDY_ONLINE_AWAY = 0x1e, //30
|
|
49 QQ_BUDDY_ONLINE_INVISIBLE = 0x28, // 40 not 0x40!, bug by gfhuang
|
|
50 };
|
|
51
|
|
52 enum {
|
|
53 QQ_SELF_STATUS_AVAILABLE = 0x11, // I determined value
|
|
54 QQ_SELF_STATUS_AWAY = 0x12,
|
|
55 QQ_SELF_STATUS_INVISIBLE = 0x13,
|
|
56 QQ_SELF_STATUS_CUSTOM = 0x14,
|
|
57 QQ_SELF_STATUS_IDLE = 0x15,
|
|
58 };
|
13989
|
59
|
|
60 void qq_buddy_status_dump_unclear(qq_buddy_status * s);
|
13870
|
61 gboolean is_online(guint8 status);
|
|
62
|
13989
|
63 gint qq_buddy_status_read(guint8 * data, guint8 ** cursor, gint len, qq_buddy_status * s);
|
13870
|
64 gchar get_suffix_from_status(guint8 status);
|
|
65
|
|
66 void qq_send_packet_change_status(GaimConnection * gc);
|
|
67
|
|
68 void qq_process_change_status_reply(guint8 * buf, gint buf_len, GaimConnection * gc);
|
|
69 void qq_process_friend_change_status(guint8 * buf, gint buf_len, GaimConnection * gc);
|
|
70 #endif
|
|
71 /*****************************************************************************/
|
|
72 // END OF FILE
|