Thu, 17 Jul 2008 14:43:56 +0000
2008.07.12 - ccpaging <ecc_hy(at)hotmail.com>
* Fixed: Always lost connection. Now send keep alive packet in every 30 seconds
* Minor fix for debug information
* Filter \r\n and replace with SPCAE in group notive
* Fixed a memory leak
* Tickets:
* Fixes #4024.
|
23193
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
1 | /** |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
2 | * @file qq_trans.h |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
3 | * |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
4 | * purple |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
5 | * |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
6 | * Purple is the legal property of its developers, whose names are too numerous |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
7 | * to list here. Please refer to the COPYRIGHT file distributed with this |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
8 | * source distribution. |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
9 | * |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
10 | * This program is free software; you can redistribute it and/or modify |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
11 | * it under the terms of the GNU General Public License as published by |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
12 | * the Free Software Foundation; either version 2 of the License, or |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
13 | * (at your option) any later version. |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
14 | * |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
15 | * This program is distributed in the hope that it will be useful, |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
18 | * GNU General Public License for more details. |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
19 | * |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
20 | * You should have received a copy of the GNU General Public License |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
21 | * along with this program; if not, write to the Free Software |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
22 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
23 | */ |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
24 | |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
25 | #ifndef _QQ_SEND_QUEUE_H_ |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
26 | #define _QQ_SEND_QUEUE_H_ |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
27 | |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
28 | #include <glib.h> |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
29 | #include "qq.h" |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
30 | |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
31 | void qq_send_trans_append(qq_data *qd, guint8 *buf, gint bus_len, guint16 cmd, guint16 seq); |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
32 | void qq_send_trans_remove(qq_data *qd, gpointer data); |
|
23212
a39a33c79a3f
2008.07.12 - ccpaging <ecc_hy(at)hotmail.com>
SHiNE CsyFeK <csyfek@gmail.com>
parents:
23193
diff
changeset
|
33 | gpointer qq_send_trans_find(qq_data *qd, guint16 cmd, guint16 seq); |
|
23193
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
34 | void qq_send_trans_remove_all(qq_data *qd); |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
35 | |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
36 | gint qq_send_trans_scan(qq_data *qd, gint *start, guint8 *buf, gint maxlen, guint16 *cmd, gint *retries); |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
37 | |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
38 | void qq_rcv_trans_push(qq_data *qd, guint16 cmd, guint16 seq, guint8 *data, gint data_len); |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
39 | gint qq_rcv_trans_pop(qq_data *qd, guint16 *cmd, guint16* seq, guint8 *data, gint max_len); |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
40 | void qq_rcv_trans_remove_all(qq_data *qd); |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
41 | |
|
384ba35bfa8f
patch-05-reconnect-and-code-cleanup
SHiNE CsyFeK <csyfek@gmail.com>
parents:
diff
changeset
|
42 | #endif |