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 // START OF FILE
|
|
24 /*****************************************************************************/
|
|
25 #ifndef _QQ_BUDDY_INFO_H_
|
|
26 #define _QQ_BUDDY_INFO_H_
|
|
27
|
|
28 #include <glib.h>
|
|
29 #include "connection.h" // GaimConnection
|
|
30 #include "buddy_opt.h" // gc_and_uid
|
|
31 #include "qq.h" // qq_data
|
|
32
|
|
33 #define QQ_COMM_FLAG_QQ_MEMBER 0x02
|
|
34 #define QQ_COMM_FLAG_TCP_MODE 0x10
|
|
35 #define QQ_COMM_FLAG_MOBILE 0x20
|
|
36 #define QQ_COMM_FLAG_BIND_MOBILE 0x40
|
|
37 #define QQ_COMM_FLAG_VIDEO 0x80
|
|
38
|
|
39 #define QQ_BUDDY_GENDER_GG 0x00
|
|
40 #define QQ_BUDDY_GENDER_MM 0x01
|
|
41 #define QQ_BUDDY_GENDER_UNKNOWN 0xff
|
|
42
|
13989
|
43 typedef struct _contact_info {
|
13870
|
44 gchar *uid; //0
|
|
45 gchar *nick; //1
|
|
46 gchar *country; //2
|
|
47 gchar *province; //3
|
|
48 gchar *zipcode; //4
|
|
49 gchar *address; //5
|
|
50 gchar *tel; //6
|
|
51 gchar *age; //7
|
|
52 gchar *gender; //8
|
|
53 gchar *name; //9
|
|
54 gchar *email; //10
|
|
55 gchar *pager_sn; //11
|
|
56 gchar *pager_num; //12
|
|
57 gchar *pager_sp; //13
|
|
58 gchar *pager_base_num; //14
|
|
59 gchar *pager_type; //15
|
|
60 gchar *occupation; //16
|
|
61 gchar *homepage; //17
|
|
62 gchar *auth_type; //18
|
|
63 gchar *unknown1; //19
|
|
64 gchar *unknown2; //20
|
|
65 gchar *face; //21
|
|
66 gchar *hp_num; //22
|
|
67 gchar *hp_type; //23
|
|
68 gchar *intro; //24
|
|
69 gchar *city; //25
|
|
70 gchar *unknown3; //26
|
|
71 gchar *unknown4; //27
|
|
72 gchar *unknown5; //28
|
|
73 gchar *is_open_hp; //29
|
|
74 gchar *is_open_contact; //30
|
|
75 gchar *college; //31
|
|
76 gchar *horoscope; //32
|
|
77 gchar *zodiac; //33 sheng xiao
|
|
78 gchar *blood; //34
|
|
79 gchar *qq_show; //35
|
|
80 gchar *unknown6; //36, always 0x2D
|
13989
|
81 } contact_info;
|
|
82
|
|
83 // There is no user id stored in the reply packet for information query
|
|
84 // we have to manually store the query, so that we know the query source
|
|
85 typedef struct _qq_info_query {
|
|
86 guint32 uid;
|
|
87 gboolean show_window;
|
|
88 gboolean modify_info;
|
|
89 } qq_info_query;
|
|
90
|
|
91 // We get an info packet on ourselves before we modify our information.
|
|
92 // Even though not all of the information is currently modifiable, it still
|
|
93 // all needs to be there when we send out the modify info packet
|
|
94 typedef struct _modify_info_data {
|
|
95 GaimConnection *gc;
|
|
96 GList *misc, *node;
|
|
97 } modify_info_data;
|
|
98
|
|
99 #define QQ_CONTACT_FIELDS 37
|
13870
|
100
|
13989
|
101 #define QQ_MAIN_INFO "Primary Information"
|
|
102 #define QQ_EXTRA_INFO "Detailed Information"
|
|
103 #define QQ_PERSONAL_INTRO "Personal Introduction"
|
|
104 #define QQ_MISC "Miscellaneous"
|
|
105
|
|
106 #define QQ_NO_CHOICE 0
|
|
107 #define QQ_HOROSCOPE 1
|
|
108 #define QQ_ZODIAC 2
|
|
109 #define QQ_BLOOD 3
|
|
110 #define QQ_GENDER 4
|
|
111 #define QQ_COUNTRY 5
|
|
112 #define QQ_PROVINCE 6
|
|
113 #define QQ_OCCUPATION 7
|
|
114
|
|
115 void qq_refresh_buddy_and_myself(contact_info *info, GaimConnection *gc);
|
|
116 void qq_send_packet_get_info(GaimConnection *gc, guint32 uid, gboolean show_window);
|
|
117 void qq_send_packet_modify_info(GaimConnection *gc, contact_info *info, gchar *new_passwd);
|
|
118 void qq_prepare_modify_info(GaimConnection *gc);
|
|
119 void qq_process_modify_info_reply(guint8 *buf, gint buf_len, GaimConnection *gc);
|
|
120 void qq_process_get_info_reply(guint8 *buf, gint buf_len, GaimConnection *gc);
|
|
121 void qq_info_query_free(qq_data *qd);
|
13870
|
122
|
|
123 #endif
|