comparison libpurple/protocols/qq/qq_base.h @ 23685:58bb7fc244e4

2008.08.03 - csyfek <csyfek(at)gmail.com> * Commit lost files to Pidgin
author SHiNE CsyFeK <csyfek@gmail.com>
date Sun, 03 Aug 2008 05:13:29 +0000
parents
children 5f454b975a99
comparison
equal deleted inserted replaced
23684:dd30b4323639 23685:58bb7fc244e4
1 /**
2 * file qq_base.h
3 *
4 * purple
5 *
6 * Purple is the legal property of its developers, whose names are too numerous
7 * to list here. Please refer to the COPYRIGHT file distributed with this
8 * source distribution.
9 *
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
19 *
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
23 */
24
25 #ifndef _QQ_BASE_H_
26 #define _QQ_BASE_H_
27
28 #include <glib.h>
29 #include "connection.h"
30
31 #define QQ_TOKEN_REPLY_OK 0x00
32
33 #define QQ_LOGIN_REPLY_OK 0x00
34 #define QQ_LOGIN_REPLY_REDIRECT 0x01
35 #define QQ_LOGIN_REPLY_ERR_PWD 0x05
36 #define QQ_LOGIN_REPLY_NEED_REACTIVE 0x06
37 #define QQ_LOGIN_REPLY_REDIRECT_EX 0x0A
38 #define QQ_LOGIN_REPLY_ERR_MISC 0xff /* defined by myself */
39
40 #define QQ_LOGIN_MODE_NORMAL 0x0a
41 #define QQ_LOGIN_MODE_AWAY 0x1e
42 #define QQ_LOGIN_MODE_HIDDEN 0x28
43
44 #define QQ_UPDATE_ONLINE_INTERVAL 300 /* in sec */
45
46 void qq_send_packet_token(PurpleConnection *gc);
47 guint8 qq_process_token_reply(PurpleConnection *gc, gchar *error_msg, guint8 *buf, gint buf_len);
48
49 void qq_send_packet_login(PurpleConnection *gc);
50 guint8 qq_process_login_reply(guint8 *buf, gint buf_len, PurpleConnection *gc);
51
52 void qq_send_packet_logout(PurpleConnection *gc);
53
54 void qq_send_packet_keep_alive(PurpleConnection *gc);
55 gboolean qq_process_keep_alive(guint8 *buf, gint buf_len, PurpleConnection *gc);
56 #endif