Mercurial > pidgin
changeset 5475:ad9887c91a59
[gaim-migrate @ 5871]
Fixed our support for the standard. I misread the discussion and used an
alternative proposal. So now we use the new, correct one.
Basically, what this means to the users is that 0.64 users will still see
0.63 MSN buddy icons, but 0.63 won't see 0.64's. No big deal.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Thu, 22 May 2003 01:31:56 +0000 |
parents | 0b355ec51083 |
children | 9bcd8cd625ae |
files | src/protocols/msn/msn.h src/protocols/msn/switchboard.c src/protocols/msn/user.c src/protocols/msn/user.h |
diffstat | 4 files changed, 25 insertions(+), 23 deletions(-) [+] |
line wrap: on
line diff
--- a/src/protocols/msn/msn.h Wed May 21 21:02:05 2003 +0000 +++ b/src/protocols/msn/msn.h Thu May 22 01:31:56 2003 +0000 @@ -72,8 +72,8 @@ #define MSN_FT_GUID "{5D3E02AB-6190-11d3-BBBB-00C04F795683}" #define MSN_CLIENTINFO \ - "User-Agent: Gaim/" VERSION "\r\n" \ - "Buddy-Icons: 1\r\n" \ - "Logging: 1\r\n" + "Client-Name: Gaim/" VERSION "\r\n" \ + "Chat-Logging: Y\r\n" \ + "Buddy-Icons: 1\r\n" #endif /* _MSN_H_ */
--- a/src/protocols/msn/switchboard.c Wed May 21 21:02:05 2003 +0000 +++ b/src/protocols/msn/switchboard.c Thu May 22 01:31:56 2003 +0000 @@ -30,7 +30,7 @@ * Utility functions **************************************************************************/ static gboolean -__send_clientinfo(MsnSwitchBoard *swboard) +__send_clientcaps(MsnSwitchBoard *swboard) { MsnMessage *msg; @@ -38,7 +38,7 @@ return TRUE; msg = msn_message_new(); - msn_message_set_content_type(msg, "text/x-clientinfo"); + msn_message_set_content_type(msg, "text/x-clientcaps"); msn_message_set_charset(msg, NULL); msn_message_set_attr(msg, "User-Agent", NULL); msn_message_set_body(msg, MSN_CLIENTINFO); @@ -89,7 +89,7 @@ if (swboard->chat != NULL) gaim_chat_add_user(GAIM_CHAT(swboard->chat), gc->username, NULL); - return __send_clientinfo(swboard); + return __send_clientcaps(swboard); } static gboolean @@ -196,7 +196,7 @@ } } - return __send_clientinfo(swboard); + return __send_clientcaps(swboard); } static gboolean @@ -318,19 +318,19 @@ } static gboolean -__clientinfo_msg(MsnServConn *servconn, const MsnMessage *msg) +__clientcaps_msg(MsnServConn *servconn, const MsnMessage *msg) { MsnSession *session = servconn->session; MsnSwitchBoard *swboard = servconn->data; MsnUser *user; - GHashTable *clientinfo; + GHashTable *clientcaps; const char *value; user = msn_user_new(session, servconn->msg_passport, NULL); - clientinfo = msn_message_get_hashtable_from_body(msg); + clientcaps = msn_message_get_hashtable_from_body(msg); - if ((value = g_hash_table_lookup(clientinfo, "Buddy-Icons")) != NULL) + if ((value = g_hash_table_lookup(clientcaps, "Buddy-Icons")) != NULL) msn_buddy_icon_invite(swboard); return TRUE; @@ -423,8 +423,10 @@ msn_servconn_register_msg_type(servconn, "text/plain", __plain_msg); msn_servconn_register_msg_type(servconn, "text/x-msmsgscontrol", __control_msg); + msn_servconn_register_msg_type(servconn, "text/x-clientcaps", + __clientcaps_msg); msn_servconn_register_msg_type(servconn, "text/x-clientinfo", - __clientinfo_msg); + __clientcaps_msg); msn_servconn_register_msg_type(servconn, "application/x-buddyicon", msn_buddy_icon_msg);
--- a/src/protocols/msn/user.c Wed May 21 21:02:05 2003 +0000 +++ b/src/protocols/msn/user.c Thu May 22 01:31:56 2003 +0000 @@ -69,8 +69,8 @@ if (user->session != NULL && user->session->users != NULL) msn_users_remove(user->session->users, user); - if (user->clientinfo != NULL) - g_hash_table_destroy(user->clientinfo); + if (user->clientcaps != NULL) + g_hash_table_destroy(user->clientcaps); if (user->passport != NULL) g_free(user->passport); if (user->name != NULL) g_free(user->name); @@ -224,23 +224,23 @@ } void -msn_user_set_client_info(MsnUser *user, GHashTable *info) +msn_user_set_client_caps(MsnUser *user, GHashTable *info) { g_return_if_fail(user != NULL); g_return_if_fail(info != NULL); - if (user->clientinfo != NULL) - g_hash_table_destroy(user->clientinfo); + if (user->clientcaps != NULL) + g_hash_table_destroy(user->clientcaps); - user->clientinfo = info; + user->clientcaps = info; } GHashTable * -msn_user_get_client_info(const MsnUser *user) +msn_user_get_client_caps(const MsnUser *user) { g_return_val_if_fail(user != NULL, NULL); - return user->clientinfo; + return user->clientcaps; } MsnUsers *
--- a/src/protocols/msn/user.h Wed May 21 21:02:05 2003 +0000 +++ b/src/protocols/msn/user.h Thu May 22 01:31:56 2003 +0000 @@ -51,7 +51,7 @@ size_t ref_count; /**< The reference count. */ - GHashTable *clientinfo; /**< The client information. */ + GHashTable *clientcaps; /**< The client's capabilities. */ }; /** @@ -209,7 +209,7 @@ * @param user The user. * @param info The client information. */ -void msn_user_set_client_info(MsnUser *user, GHashTable *info); +void msn_user_set_client_caps(MsnUser *user, GHashTable *info); /** * Returns the client information for a user. @@ -218,7 +218,7 @@ * * @return The client information. */ -GHashTable *msn_user_get_client_info(const MsnUser *user); +GHashTable *msn_user_get_client_caps(const MsnUser *user); /** * Creates a new MsnUsers structure.