comparison libgaim/protocols/qq/buddy_info.h @ 14192:60b1bc8dbf37

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