Mercurial > pidgin
diff libpurple/protocols/qq/buddy_opt.c @ 31191:4deef745de87
2010.01.23 - flos <lonicerae(at)gmail.com>
* added an option to force incoming message in chat room to use a default font instead of the font in message itself
2010.01.18 - flos <lonicerae(at)gmail.com>
* added type 'UPDCLS' and 'UID' for implementing business logic layer
2010.01.13 - ccpaging <ccpaging(at)gmail.com>
* qq2009-1 patch from ccpaging
author | SHiNE CsyFeK <csyfek@gmail.com> |
---|---|
date | Sun, 06 Feb 2011 05:23:22 +0000 |
parents | a8cc50c2279f |
children |
line wrap: on
line diff
--- a/libpurple/protocols/qq/buddy_opt.c Tue Feb 01 12:55:48 2011 +0000 +++ b/libpurple/protocols/qq/buddy_opt.c Sun Feb 06 05:23:22 2011 +0000 @@ -51,12 +51,12 @@ typedef struct _qq_buddy_req { PurpleConnection *gc; - guint32 uid; + UID uid; guint8 *auth; guint8 auth_len; } qq_buddy_req; -void add_buddy_authorize_input(PurpleConnection *gc, guint32 uid, +void add_buddy_authorize_input(PurpleConnection *gc, UID uid, guint8 *auth, guint8 auth_len); static void buddy_req_free(qq_buddy_req *add_req) @@ -88,7 +88,7 @@ return g; } -static qq_buddy_data *qq_buddy_data_new(guint32 uid) +static qq_buddy_data *qq_buddy_data_new(UID uid) { qq_buddy_data *bd = g_new0(qq_buddy_data, 1); memset(bd, 0, sizeof(qq_buddy_data)); @@ -97,7 +97,7 @@ return bd; } -qq_buddy_data *qq_buddy_data_find(PurpleConnection *gc, guint32 uid) +qq_buddy_data *qq_buddy_data_find(PurpleConnection *gc, UID uid) { gchar *who; PurpleBuddy *buddy; @@ -131,7 +131,7 @@ } /* create purple buddy without data and display with no-auth icon */ -PurpleBuddy *qq_buddy_new(PurpleConnection *gc, guint32 uid) +PurpleBuddy *qq_buddy_new(PurpleConnection *gc, UID uid) { PurpleBuddy *buddy; PurpleGroup *group; @@ -175,7 +175,7 @@ purple_blist_remove_buddy(buddy); } -PurpleBuddy *qq_buddy_find(PurpleConnection *gc, guint32 uid) +PurpleBuddy *qq_buddy_find(PurpleConnection *gc, UID uid) { PurpleBuddy *buddy; gchar *who; @@ -188,7 +188,7 @@ return buddy; } -PurpleBuddy *qq_buddy_find_or_new(PurpleConnection *gc, guint32 uid) +PurpleBuddy *qq_buddy_find_or_new(PurpleConnection *gc, UID uid) { PurpleBuddy *buddy; qq_buddy_data *bd; @@ -213,7 +213,7 @@ } /* send packet to remove a buddy from my buddy list */ -static void request_remove_buddy(PurpleConnection *gc, guint32 uid) +static void request_remove_buddy(PurpleConnection *gc, UID uid) { gchar uid_str[11]; gint bytes; @@ -226,7 +226,7 @@ } static void request_remove_buddy_ex(PurpleConnection *gc, - guint32 uid, guint8 *auth, guint8 auth_len) + UID uid, guint8 *auth, guint8 auth_len) { gint bytes; guint8 *raw_data; @@ -246,7 +246,7 @@ qq_send_cmd_mess(gc, QQ_CMD_REMOVE_BUDDY, raw_data, bytes, 0, uid); } -void qq_request_auth_code(PurpleConnection *gc, guint8 cmd, guint16 sub_cmd, guint32 uid) +void qq_request_auth_code(PurpleConnection *gc, guint8 cmd, guint16 sub_cmd, UID uid) { guint8 raw_data[16]; gint bytes; @@ -260,7 +260,7 @@ qq_send_cmd_mess(gc, QQ_CMD_AUTH_CODE, raw_data, bytes, 0, uid); } -void qq_process_auth_code(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid) +void qq_process_auth_code(PurpleConnection *gc, guint8 *data, gint data_len, UID uid) { gint bytes; guint8 cmd, reply; @@ -308,7 +308,7 @@ buddy_req_free(add_req); } -static void add_buddy_question_input(PurpleConnection *gc, guint32 uid, gchar *question) +static void add_buddy_question_input(PurpleConnection *gc, UID uid, gchar *question) { gchar *who, *msg; qq_buddy_req *add_req; @@ -336,7 +336,7 @@ } void qq_request_question(PurpleConnection *gc, - guint8 cmd, guint32 uid, const gchar *question_utf8, const gchar *answer_utf8) + guint8 cmd, UID uid, const gchar *question_utf8, const gchar *answer_utf8) { guint8 raw_data[MAX_PACKET_SIZE - 16]; gint bytes; @@ -371,7 +371,7 @@ return; } -static void request_add_buddy_by_question(PurpleConnection *gc, guint32 uid, +static void request_add_buddy_by_question(PurpleConnection *gc, UID uid, guint8 *code, guint16 code_len) { guint8 raw_data[MAX_PACKET_SIZE - 16]; @@ -395,7 +395,7 @@ qq_send_cmd(gc, QQ_CMD_ADD_BUDDY_AUTH_EX, raw_data, bytes); } -void qq_process_question(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid) +void qq_process_question(PurpleConnection *gc, guint8 *data, gint data_len, UID uid) { gint bytes; guint8 cmd, reply; @@ -461,7 +461,7 @@ } /* try to remove myself from someone's buddy list */ -static void request_buddy_remove_me(PurpleConnection *gc, guint32 uid) +static void request_buddy_remove_me(PurpleConnection *gc, UID uid) { guint8 raw_data[16] = {0}; gint bytes = 0; @@ -474,7 +474,7 @@ } /* try to add a buddy without authentication */ -static void request_add_buddy_no_auth(PurpleConnection *gc, guint32 uid) +static void request_add_buddy_no_auth(PurpleConnection *gc, UID uid) { gchar uid_str[11]; @@ -486,7 +486,7 @@ (guint8 *) uid_str, strlen(uid_str), 0, uid); } -static void request_add_buddy_no_auth_ex(PurpleConnection *gc, guint32 uid) +static void request_add_buddy_no_auth_ex(PurpleConnection *gc, UID uid) { guint bytes; guint8 raw_data[16]; @@ -499,7 +499,7 @@ } /* this buddy needs authentication, text conversion is done at lowest level */ -static void request_add_buddy_auth(PurpleConnection *gc, guint32 uid, const gchar response, const gchar *text) +static void request_add_buddy_auth(PurpleConnection *gc, UID uid, const gchar response, const gchar *text) { guint8 raw_data[MAX_PACKET_SIZE - 16]; gint bytes; @@ -526,7 +526,7 @@ qq_send_cmd(gc, QQ_CMD_ADD_BUDDY_AUTH, raw_data, bytes); } -static void request_add_buddy_auth_ex(PurpleConnection *gc, guint32 uid, +static void request_add_buddy_auth_ex(PurpleConnection *gc, UID uid, const gchar *text, guint8 *auth, guint8 auth_len) { guint8 raw_data[MAX_PACKET_SIZE - 16]; @@ -643,7 +643,7 @@ buddy_req_free(add_req); } -void add_buddy_authorize_input(PurpleConnection *gc, guint32 uid, +void add_buddy_authorize_input(PurpleConnection *gc, UID uid, guint8 *auth, guint8 auth_len) { gchar *who, *msg; @@ -683,7 +683,7 @@ void qq_add_buddy(PurpleConnection *gc, PurpleBuddy *buddy, PurpleGroup *group) { qq_data *qd; - guint32 uid; + UID uid; g_return_if_fail(NULL != gc && NULL != gc->proto_data); g_return_if_fail(buddy != NULL); @@ -733,7 +733,7 @@ } /* process the server reply for my request to remove a buddy */ -void qq_process_remove_buddy(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid) +void qq_process_remove_buddy(PurpleConnection *gc, guint8 *data, gint data_len, UID uid) { PurpleBuddy *buddy = NULL; gchar *msg; @@ -756,7 +756,7 @@ } /* process the server reply for my request to remove myself from a buddy */ -void qq_process_buddy_remove_me(PurpleConnection *gc, guint8 *data, gint data_len, guint32 uid) +void qq_process_buddy_remove_me(PurpleConnection *gc, guint8 *data, gint data_len, UID uid) { gchar *msg; @@ -772,7 +772,7 @@ } void qq_process_add_buddy_no_auth(PurpleConnection *gc, - guint8 *data, gint data_len, guint32 uid) + guint8 *data, gint data_len, UID uid) { qq_data *qd; gchar **segments; @@ -834,11 +834,11 @@ } void qq_process_add_buddy_no_auth_ex(PurpleConnection *gc, - guint8 *data, gint data_len, guint32 uid) + guint8 *data, gint data_len, UID uid) { qq_data *qd; gint bytes; - guint32 dest_uid; + UID dest_uid; guint8 reply; guint8 auth_type; @@ -903,7 +903,7 @@ { qq_data *qd; qq_buddy_data *bd; - guint32 uid; + UID uid; g_return_if_fail(gc != NULL && gc->proto_data != NULL); g_return_if_fail(buddy != NULL); @@ -933,7 +933,7 @@ * otherwise purple segmentation fault */ } -static void buddy_add_input(PurpleConnection *gc, guint32 uid, gchar *reason) +static void buddy_add_input(PurpleConnection *gc, UID uid, gchar *reason) { PurpleAccount *account = purple_connection_get_account(gc); qq_buddy_req *add_req; @@ -967,7 +967,7 @@ static void server_buddy_add_request(PurpleConnection *gc, gchar *from, gchar *to, guint8 *data, gint data_len) { - guint32 uid; + UID uid; gchar *msg, *reason; g_return_if_fail(from != NULL && to != NULL); @@ -996,7 +996,7 @@ gint bytes; guint8 cmd; guint8 reply; - guint32 uid; + UID uid; guint16 flag1, flag2; g_return_if_fail(data != NULL && data_len >= 5); @@ -1026,7 +1026,7 @@ { guint8 *raw_data; gint bytes; - guint32 uid; + UID uid; g_return_if_fail(code != NULL && code_len > 0 && from != NULL); @@ -1073,7 +1073,7 @@ guint8 *data, gint data_len) { gint bytes; - guint32 uid; + UID uid; gchar *msg; guint8 allow_reverse; @@ -1103,7 +1103,7 @@ { PurpleAccount *account = purple_connection_get_account(gc); PurpleBuddy *buddy; - guint32 uid; + UID uid; qq_buddy_req *add_req; gchar *who; gchar *primary; @@ -1177,7 +1177,7 @@ { PurpleAccount *account = purple_connection_get_account(gc); qq_data *qd; - guint32 uid; + UID uid; g_return_if_fail(from != NULL && to != NULL); @@ -1204,7 +1204,7 @@ static void server_buddy_rejected_me(PurpleConnection *gc, gchar *from, gchar *to, guint8 *data, gint data_len) { - guint32 uid; + UID uid; PurpleBuddy *buddy; gchar *msg, *msg_utf8; gint bytes;