annotate libpurple/protocols/qq/qq_base.h @ 28442:e0223ad82ca1

account: Don't leak the account->privacy / account->deny lists. Multiple similar to: ==21150== 412 (32 direct, 380 indirect) bytes in 2 blocks are definitely lost in loss record 12,416 of 13,348 ==21150== at 0x4C221A7: malloc (vg_replace_malloc.c:195) ==21150== by 0x90AA552: g_malloc (gmem.c:131) ==21150== by 0x90C03C7: g_slice_alloc (gslice.c:824) ==21150== by 0x90C0E05: g_slist_append (gslist.c:117) ==21150== by 0x93AE56F: purple_privacy_permit_add (privacy.c:58)
author Paul Aurich <paul@darkrain42.org>
date Mon, 26 Oct 2009 04:21:28 +0000
parents 7c0a56c5fea0
children 4deef745de87
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
23640
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
1 /**
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
2 * file qq_base.h
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
3 *
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
4 * purple
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
5 *
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
6 * Purple is the legal property of its developers, whose names are too numerous
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
7 * to list here. Please refer to the COPYRIGHT file distributed with this
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
8 * source distribution.
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
9 *
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
10 * This program is free software; you can redistribute it and/or modify
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
11 * it under the terms of the GNU General Public License as published by
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
12 * the Free Software Foundation; either version 2 of the License, or
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
13 * (at your option) any later version.
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
14 *
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
15 * This program is distributed in the hope that it will be useful,
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
18 * GNU General Public License for more details.
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
19 *
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
20 * You should have received a copy of the GNU General Public License
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
21 * along with this program; if not, write to the Free Software
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
23 */
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
24
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
25 #ifndef _QQ_BASE_H_
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
26 #define _QQ_BASE_H_
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
27
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
28 #include <glib.h>
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
29 #include "connection.h"
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
30
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
31 #define QQ_LOGIN_REPLY_OK 0x00
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
32 #define QQ_LOGIN_REPLY_REDIRECT 0x01
24134
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
33 /* defined by myself */
24161
7c0a56c5fea0 2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24140
diff changeset
34 #define QQ_LOGIN_REPLY_CAPTCHA_DLG 0xfd
7c0a56c5fea0 2008.10.14 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24140
diff changeset
35 #define QQ_LOGIN_REPLY_NEXT_TOKEN_EX 0xfe
24134
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
36 #define QQ_LOGIN_REPLY_ERR 0xff
23640
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
37
24134
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
38 #define QQ_LOGIN_MODE_NORMAL 0x0a
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
39 #define QQ_LOGIN_MODE_AWAY 0x1e
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
40 #define QQ_LOGIN_MODE_HIDDEN 0x28
23640
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
41
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
42 #define QQ_UPDATE_ONLINE_INTERVAL 300 /* in sec */
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
43
24134
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
44 void qq_request_token(PurpleConnection *gc);
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
45 guint8 qq_process_token(PurpleConnection *gc, guint8 *buf, gint buf_len);
23640
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
46
24134
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
47 void qq_request_login(PurpleConnection *gc);
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
48 guint8 qq_process_login( PurpleConnection *gc, guint8 *data, gint data_len);
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
49
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
50 void qq_request_logout(PurpleConnection *gc);
23640
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
51
24134
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
52 void qq_request_keep_alive(PurpleConnection *gc);
23695
5f454b975a99 2008.08.10 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 23640
diff changeset
53 gboolean qq_process_keep_alive(guint8 *data, gint data_len, PurpleConnection *gc);
24134
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
54
24140
619ac2303c46 2009.10.02 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24139
diff changeset
55 void qq_request_keep_alive_2007(PurpleConnection *gc);
619ac2303c46 2009.10.02 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24139
diff changeset
56 gboolean qq_process_keep_alive_2007(guint8 *data, gint data_len, PurpleConnection *gc);
619ac2303c46 2009.10.02 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24139
diff changeset
57
619ac2303c46 2009.10.02 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24139
diff changeset
58 void qq_request_keep_alive_2008(PurpleConnection *gc);
619ac2303c46 2009.10.02 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24139
diff changeset
59 gboolean qq_process_keep_alive_2008(guint8 *data, gint data_len, PurpleConnection *gc);
619ac2303c46 2009.10.02 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24139
diff changeset
60
24135
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
61 /* for QQ2007/2008 */
24134
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
62 void qq_request_get_server(PurpleConnection *gc);
bdfcfd71449c patch 20080922 from ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24115
diff changeset
63 guint16 qq_process_get_server(PurpleConnection *gc, guint8 *rcved, gint rcved_len);
24135
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
64
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
65 void qq_request_token_ex(PurpleConnection *gc);
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
66 void qq_request_token_ex_next(PurpleConnection *gc);
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
67 guint8 qq_process_token_ex(PurpleConnection *gc, guint8 *buf, gint buf_len);
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
68 void qq_captcha_input_dialog(PurpleConnection *gc,qq_captcha_data *captcha);
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
69
24139
832178d951ca 2008.09.30 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24135
diff changeset
70 void qq_request_check_pwd(PurpleConnection *gc);
832178d951ca 2008.09.30 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24135
diff changeset
71 guint8 qq_process_check_pwd( PurpleConnection *gc, guint8 *data, gint data_len);
24135
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
72
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
73 void qq_request_login_2007(PurpleConnection *gc);
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
74 guint8 qq_process_login_2007( PurpleConnection *gc, guint8 *data, gint data_len);
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
75
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
76 void qq_request_login_2008(PurpleConnection *gc);
dbc7a9742f8d 2008.09.26 - ccpaging <ccpaging(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents: 24134
diff changeset
77 guint8 qq_process_login_2008( PurpleConnection *gc, guint8 *data, gint data_len);
23640
58bb7fc244e4 2008.08.03 - csyfek <csyfek(at)gmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff changeset
78 #endif