Mercurial > pidgin
annotate libpurple/protocols/qq/buddy_opt.h @ 31094:120703c0a0dd
Free the buffer with the SlpMsgPart. Should fix a few leaks from
HanzZ's valgrind logs.
Refs #13084.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Wed, 05 Jan 2011 04:11:39 +0000 |
parents | d8452c0bec7b |
children | 4deef745de87 |
rev | line source |
---|---|
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
1 /** |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
2 * @file buddy_opt.h |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
3 * |
15822 | 4 * purple |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
5 * |
15822 | 6 * Purple is the legal property of its developers, whose names are too numerous |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
7 * to list here. Please refer to the COPYRIGHT file distributed with this |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
8 * source distribution. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
9 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
10 * This program is free software; you can redistribute it and/or modify |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
11 * it under the terms of the GNU General Public License as published by |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
12 * the Free Software Foundation; either version 2 of the License, or |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
13 * (at your option) any later version. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
14 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
15 * This program is distributed in the hope that it will be useful, |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
18 * GNU General Public License for more details. |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
19 * |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
20 * You should have received a copy of the GNU General Public License |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
21 * along with this program; if not, write to the Free Software |
19681
44b4e8bd759b
The FSF changed its address a while ago; our files were out of date.
John Bailey <rekkanoryo@rekkanoryo.org>
parents:
15822
diff
changeset
|
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
23 */ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
24 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
25 #ifndef _QQ_BUDDY_OPT_H_ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
26 #define _QQ_BUDDY_OPT_H_ |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
27 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
28 #include <glib.h> |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
29 #include "connection.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
30 |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
31 #include "qq.h" |
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
32 |
24161
7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24160
diff
changeset
|
33 enum { |
7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24160
diff
changeset
|
34 QQ_AUTH_INFO_BUDDY = 0x01, |
7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24160
diff
changeset
|
35 QQ_AUTH_INFO_ROOM = 0x02, |
7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24160
diff
changeset
|
36 |
7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24160
diff
changeset
|
37 QQ_AUTH_INFO_ADD_BUDDY = 0x0001, |
7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24160
diff
changeset
|
38 QQ_AUTH_INFO_TEMP_SESSION = 0x0003, |
7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24160
diff
changeset
|
39 QQ_AUTH_INFO_CLUSTER = 0x0002, |
7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24160
diff
changeset
|
40 QQ_AUTH_INFO_REMOVE_BUDDY = 0x0006, |
24687
d8452c0bec7b
Remove the commas at the end of enumerator lists. This resolves warnings
Florian Quèze <florian@instantbird.org>
parents:
24164
diff
changeset
|
41 QQ_AUTH_INFO_UPDATE_BUDDY_INFO = 0x0007 |
24161
7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24160
diff
changeset
|
42 }; |
7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24160
diff
changeset
|
43 |
24164
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
44 enum { |
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
45 QQ_QUESTION_GET = 0x01, |
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
46 QQ_QUESTION_SET = 0x02, |
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
47 QQ_QUESTION_REQUEST = 0x03, /* get question only*/ |
24687
d8452c0bec7b
Remove the commas at the end of enumerator lists. This resolves warnings
Florian Quèze <florian@instantbird.org>
parents:
24164
diff
changeset
|
48 QQ_QUESTION_ANSWER = 0x04 |
24164
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
49 }; |
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
50 |
15822 | 51 void qq_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); |
24117
d57928c9dd8f
2008.09.19 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
23695
diff
changeset
|
52 void qq_change_buddys_group(PurpleConnection *gc, const char *who, |
d57928c9dd8f
2008.09.19 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
23695
diff
changeset
|
53 const char *old_group, const char *new_group); |
d57928c9dd8f
2008.09.19 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
23695
diff
changeset
|
54 void qq_remove_buddy_and_me(PurpleBlistNode * node); |
15822 | 55 void qq_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
56 |
24163
7f5433ffbf8d
2008.10.22 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24162
diff
changeset
|
57 void qq_process_remove_buddy(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid); |
24160
d35672443baa
2008.10.10 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24149
diff
changeset
|
58 void qq_process_buddy_remove_me(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid); |
24163
7f5433ffbf8d
2008.10.22 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24162
diff
changeset
|
59 void qq_process_add_buddy_no_auth(PurpleConnection *gc, |
24162
f4f29fac96c6
2008.10.20 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24161
diff
changeset
|
60 guint8 *data, gint data_len, guint32 uid); |
24163
7f5433ffbf8d
2008.10.22 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24162
diff
changeset
|
61 void qq_process_add_buddy_no_auth_ex(PurpleConnection *gc, |
24162
f4f29fac96c6
2008.10.20 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24161
diff
changeset
|
62 guint8 *data, gint data_len, guint32 uid); |
24163
7f5433ffbf8d
2008.10.22 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24162
diff
changeset
|
63 void qq_process_add_buddy_auth(guint8 *data, gint data_len, PurpleConnection *gc); |
24117
d57928c9dd8f
2008.09.19 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
23695
diff
changeset
|
64 void qq_process_buddy_from_server(PurpleConnection *gc, int funct, |
24161
7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24160
diff
changeset
|
65 gchar *from, gchar *to, guint8 *data, gint data_len); |
7c0a56c5fea0
2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24160
diff
changeset
|
66 |
24163
7f5433ffbf8d
2008.10.22 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24162
diff
changeset
|
67 void qq_process_buddy_check_code(PurpleConnection *gc, guint8 *data, gint data_len); |
24162
f4f29fac96c6
2008.10.20 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24161
diff
changeset
|
68 |
24164
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
69 void qq_request_auth_code(PurpleConnection *gc, guint8 cmd, guint16 sub_cmd, guint32 uid); |
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
70 void qq_process_auth_code(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid); |
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
71 void qq_request_question(PurpleConnection *gc, |
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
72 guint8 cmd, guint32 uid, const gchar *question_utf8, const gchar *answer_utf8); |
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
73 void qq_process_question(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid); |
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
74 |
2a19984c0005
2008.10.27 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24163
diff
changeset
|
75 void qq_process_add_buddy_auth_ex(PurpleConnection *gc, guint8 *data, gint data_len, guint32 ship32); |
24117
d57928c9dd8f
2008.09.19 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
23695
diff
changeset
|
76 |
24149
818ab62006f5
2008.10.07 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24148
diff
changeset
|
77 qq_buddy_data *qq_buddy_data_find(PurpleConnection *gc, guint32 uid); |
818ab62006f5
2008.10.07 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24148
diff
changeset
|
78 void qq_buddy_data_free(qq_buddy_data *bd); |
818ab62006f5
2008.10.07 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24148
diff
changeset
|
79 |
818ab62006f5
2008.10.07 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24148
diff
changeset
|
80 PurpleBuddy *qq_buddy_new(PurpleConnection *gc, guint32 uid); |
24148
1bdf7b602684
2008.10.07 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24146
diff
changeset
|
81 PurpleBuddy *qq_buddy_find_or_new(PurpleConnection *gc, guint32 uid); |
24149
818ab62006f5
2008.10.07 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24148
diff
changeset
|
82 PurpleBuddy *qq_buddy_find(PurpleConnection *gc, guint32 uid); |
818ab62006f5
2008.10.07 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
24148
diff
changeset
|
83 PurpleGroup *qq_group_find_or_new(const gchar *group_name); |
15373
5fe8042783c1
Rename gtk/ and libgaim/ to pidgin/ and libpurple/
Sean Egan <seanegan@gmail.com>
parents:
diff
changeset
|
84 #endif |