| 1 /** |
|
| 2 * @file buddy_opt.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_BUDDY_OPT_H_ |
|
| 26 #define _QQ_BUDDY_OPT_H_ |
|
| 27 |
|
| 28 #include <glib.h> |
|
| 29 #include "connection.h" |
|
| 30 |
|
| 31 #include "qq.h" |
|
| 32 |
|
| 33 enum { |
|
| 34 QQ_AUTH_INFO_BUDDY = 0x01, |
|
| 35 QQ_AUTH_INFO_ROOM = 0x02, |
|
| 36 |
|
| 37 QQ_AUTH_INFO_ADD_BUDDY = 0x0001, |
|
| 38 QQ_AUTH_INFO_TEMP_SESSION = 0x0003, |
|
| 39 QQ_AUTH_INFO_CLUSTER = 0x0002, |
|
| 40 QQ_AUTH_INFO_REMOVE_BUDDY = 0x0006, |
|
| 41 QQ_AUTH_INFO_UPDATE_BUDDY_INFO = 0x0007 |
|
| 42 }; |
|
| 43 |
|
| 44 enum { |
|
| 45 QQ_QUESTION_GET = 0x01, |
|
| 46 QQ_QUESTION_SET = 0x02, |
|
| 47 QQ_QUESTION_REQUEST = 0x03, /* get question only*/ |
|
| 48 QQ_QUESTION_ANSWER = 0x04 |
|
| 49 }; |
|
| 50 |
|
| 51 void qq_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); |
|
| 52 void qq_change_buddys_group(PurpleConnection *gc, const char *who, |
|
| 53 const char *old_group, const char *new_group); |
|
| 54 void qq_remove_buddy_and_me(PurpleBlistNode * node); |
|
| 55 void qq_remove_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group); |
|
| 56 |
|
| 57 void qq_process_remove_buddy(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid); |
|
| 58 void qq_process_buddy_remove_me(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid); |
|
| 59 void qq_process_add_buddy_no_auth(PurpleConnection *gc, |
|
| 60 guint8 *data, gint data_len, guint32 uid); |
|
| 61 void qq_process_add_buddy_no_auth_ex(PurpleConnection *gc, |
|
| 62 guint8 *data, gint data_len, guint32 uid); |
|
| 63 void qq_process_add_buddy_auth(guint8 *data, gint data_len, PurpleConnection *gc); |
|
| 64 void qq_process_buddy_from_server(PurpleConnection *gc, int funct, |
|
| 65 gchar *from, gchar *to, guint8 *data, gint data_len); |
|
| 66 |
|
| 67 void qq_process_buddy_check_code(PurpleConnection *gc, guint8 *data, gint data_len); |
|
| 68 |
|
| 69 void qq_request_auth_code(PurpleConnection *gc, guint8 cmd, guint16 sub_cmd, guint32 uid); |
|
| 70 void qq_process_auth_code(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid); |
|
| 71 void qq_request_question(PurpleConnection *gc, |
|
| 72 guint8 cmd, guint32 uid, const gchar *question_utf8, const gchar *answer_utf8); |
|
| 73 void qq_process_question(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid); |
|
| 74 |
|
| 75 void qq_process_add_buddy_auth_ex(PurpleConnection *gc, guint8 *data, gint data_len, guint32 ship32); |
|
| 76 |
|
| 77 qq_buddy_data *qq_buddy_data_find(PurpleConnection *gc, guint32 uid); |
|
| 78 void qq_buddy_data_free(qq_buddy_data *bd); |
|
| 79 |
|
| 80 PurpleBuddy *qq_buddy_new(PurpleConnection *gc, guint32 uid); |
|
| 81 PurpleBuddy *qq_buddy_find_or_new(PurpleConnection *gc, guint32 uid); |
|
| 82 PurpleBuddy *qq_buddy_find(PurpleConnection *gc, guint32 uid); |
|
| 83 PurpleGroup *qq_group_find_or_new(const gchar *group_name); |
|
| 84 #endif |
|