pidgin: 25bd5b38: Updated client capabilities and networks...
qulogic at pidgin.im
qulogic at pidgin.im
Mon Feb 14 21:40:49 EST 2011
----------------------------------------------------------------------
Revision: 25bd5b382cc84daef94ed59dab062fea9d1613f9
Parent: c22777dae7e766426b17df35dbf42ba6d49bf820
Author: qulogic at pidgin.im
Date: 02/12/11 20:27:17
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/25bd5b382cc84daef94ed59dab062fea9d1613f9
Changelog:
Updated client capabilities and networks from msnpsharp.
Changes against parent c22777dae7e766426b17df35dbf42ba6d49bf820
patched libpurple/protocols/msn/msn.c
patched libpurple/protocols/msn/msn.h
patched libpurple/protocols/msn/notification.c
patched libpurple/protocols/msn/state.c
patched libpurple/protocols/msn/user.h
-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.c d460366876352188a28848eb61f9caf76b642864
+++ libpurple/protocols/msn/msn.c 5776381396d6ea737e23e1b39a826f90d9306e2d
@@ -931,8 +931,8 @@ msn_can_receive_file(PurpleConnection *g
if (session) {
MsnUser *user = msn_userlist_find_user(session->userlist, who);
if (user) {
- /* Include these too: MSN_CLIENT_CAP_MSNMOBILE|MSN_CLIENT_CAP_MSNDIRECT ? */
- if ((user->clientid & MSN_CLIENT_CAP_WEBMSGR) ||
+ /* Include these too: MSN_CAP_MOBILE_ON|MSN_CAP_WEB_WATCH ? */
+ if ((user->clientid & MSN_CAP_VIA_WEBIM) ||
user->networkid == MSN_NETWORK_YAHOO)
ret = FALSE;
else
@@ -961,16 +961,16 @@ msn_list_emblems(PurpleBuddy *b)
MsnUser *user = purple_buddy_get_protocol_data(b);
if (user != NULL) {
- if (user->clientid & MSN_CLIENT_CAP_BOT)
+ if (user->clientid & MSN_CAP_BOT)
return "bot";
- if (user->clientid & MSN_CLIENT_CAP_WIN_MOBILE)
+ if (user->clientid & MSN_CAP_VIA_MOBILE)
return "mobile";
#if 0
/* XXX: Since we don't support this, there's no point in showing it just yet */
- if (user->clientid & MSN_CLIENT_CAP_SCHANNEL)
+ if (user->clientid & MSN_CAP_SCHANNEL)
return "secure";
#endif
- if (user->clientid & MSN_CLIENT_CAP_WEBMSGR)
+ if (user->clientid & MSN_CAP_VIA_WEBIM)
return "external";
if (user->networkid == MSN_NETWORK_YAHOO)
return "yahoo";
============================================================
--- libpurple/protocols/msn/msn.h 19cfb512bd575bc1896695498c3ccf995fb680ac
+++ libpurple/protocols/msn/msn.h 2b9dc0da233cb36c2afcfef9465d20c7810cd17e
@@ -26,34 +26,65 @@ typedef enum
typedef enum
{
- MSN_CLIENT_CAP_WIN_MOBILE = 0x0000001,
- MSN_CLIENT_CAP_INK_GIF = 0x0000004,
- MSN_CLIENT_CAP_INK_ISF = 0x0000008,
- MSN_CLIENT_CAP_VIDEO_CHAT = 0x0000010,
- MSN_CLIENT_CAP_PACKET = 0x0000020,
- MSN_CLIENT_CAP_MSNMOBILE = 0x0000040,
- MSN_CLIENT_CAP_MSNDIRECT = 0x0000080,
- MSN_CLIENT_CAP_WEBMSGR = 0x0000200,
- MSN_CLIENT_CAP_TGW = 0x0000800,
- MSN_CLIENT_CAP_SPACE = 0x0001000,
- MSN_CLIENT_CAP_MCE = 0x0002000,
- MSN_CLIENT_CAP_DIRECTIM = 0x0004000,
- MSN_CLIENT_CAP_WINKS = 0x0008000,
- MSN_CLIENT_CAP_SEARCH = 0x0010000,
- MSN_CLIENT_CAP_BOT = 0x0020000,
- MSN_CLIENT_CAP_VOICEIM = 0x0040000,
- MSN_CLIENT_CAP_SCHANNEL = 0x0080000,
- MSN_CLIENT_CAP_SIP_INVITE = 0x0100000,
- MSN_CLIENT_CAP_SDRIVE = 0x0400000,
- MSN_CLIENT_CAP_ONECARE = 0x1000000,
- MSN_CLIENT_CAP_P2P_TURN = 0x2000000,
- MSN_CLIENT_CAP_P2P_BOOTSTRAP_VIA_UUN = 0x4000000,
+ MSN_CAP_VIA_MOBILE = 0x0000001,
+ MSN_CAP_VIA_TEXAS = 0x0000002,
+ MSN_CAP_INK_GIF = 0x0000004,
+ MSN_CAP_INK_ISF = 0x0000008,
+ MSN_CAP_VIDEO_CHAT = 0x0000010,
+ MSN_CAP_PACKET = 0x0000020,
+ MSN_CAP_MOBILE_ON = 0x0000040,
+ MSN_CAP_WEB_WATCH = 0x0000080,
+ MSN_CAP_ACTIVITIES = 0x0000100,
+ MSN_CAP_VIA_WEBIM = 0x0000200,
+ MSN_CAP_MOBILE_DEV = 0x0000400,
+ MSN_CAP_VIA_FEDERATED = 0x0000800,
+ MSN_CAP_SPACE = 0x0001000,
+ MSN_CAP_MCE = 0x0002000,
+ MSN_CAP_DIRECTIM = 0x0004000,
+ MSN_CAP_WINKS = 0x0008000,
+ MSN_CAP_SEARCH = 0x0010000,
+ MSN_CAP_BOT = 0x0020000,
+ MSN_CAP_VOICEIM = 0x0040000,
+ MSN_CAP_SCHANNEL = 0x0080000,
+ MSN_CAP_SIP_INVITE = 0x0100000,
+ MSN_CAP_MULTI_VV = 0x0200000,
+ MSN_CAP_SDRIVE = 0x0400000,
+ MSN_CAP_PAGEMODE_MSG = 0x080000,
+ MSN_CAP_ONECARE = 0x1000000,
+ MSN_CAP_P2P_TURN = 0x2000000,
+ MSN_CAP_P2P_BOOTSTRAP_VIA_UUN = 0x4000000,
+ MSN_CAP_ALIASED = 0x8000000
} MsnClientCaps;
typedef enum
{
- MSN_CLIENT_EXT_CAP_RTC_VIDEO = 0x10,
- MSN_CLIENT_EXT_CAP_P2PV2 = 0x20
+ MSN_EXT_CAP_SMS_ONLY = 0x1,
+ MSN_EXT_CAP_VOICE_OVER_MSNP = 0x2,
+ MSN_EXT_CAP_UUCP_SIP = 0x4,
+ MSN_EXT_CAP_APP_MSGS = 0x8,
+ MSN_EXT_CAP_RTC_VIDEO = 0x10,
+ MSN_EXT_CAP_P2PV2 = 0x20,
+ MSN_EXT_CAP_AUTH_WEBIM = 0x40,
+ MSN_EXT_CAP_1ON1_VIA_GROUP = 0x80,
+ MSN_EXT_CAP_OFFLINEIM = 0x100,
+ MSN_EXT_CAP_SHARING_VIDEO = 0x200,
+ MSN_EXT_CAP_NUDGE = 0x400,
+ MSN_EXT_CAP_CIRCLE_VOICEIM = 0x800,
+ MSN_EXT_CAP_SHARING = 0x1000,
+ MSN_EXT_CAP_P2P_MIXER_RELAY = 0x8000,
+ MSN_EXT_CAP_CONV_WINDOW_FT = 0x20000,
+ MSN_EXT_CAP_VIDEO_16x9 = 0x40000,
+ MSN_EXT_CAP_P2P_ENVELOPE = 0x80000,
+ MSN_EXT_CAP_YAHOOIM_DISABLE = 0x400000,
+ MSN_EXT_CAP_SIP_TUNNELv2 = 0x800000,
+ MSN_EXT_CAP_VOICE_CLIP_WMA = 0x1000000,
+ MSN_EXT_CAP_VOICE_CLIP_CIRCLEIM = 0x2000000,
+ MSN_EXT_CAP_SOCIAL_NEWS = 0x4000000,
+ MSN_EXT_CAP_CUSTOM_SMILEY = 0x8000000,
+ MSN_EXT_CAP_UTF8_MOODS = 0x10000000,
+ MSN_EXT_CAP_FTURN = 0x20000000,
+ MSN_EXT_CAP_P4_ACTIVITY = 0x40000000,
+ MSN_EXT_CAP_MUC = 0x80000000
} MsnClientExtCaps;
typedef enum
@@ -68,7 +99,8 @@ typedef enum
MSN_CLIENT_VER_8_1 = 0x70, /* MSNC7 */
MSN_CLIENT_VER_8_5 = 0x80, /* MSNC8 */
MSN_CLIENT_VER_9_0 = 0x90, /* MSNC9 */
- MSN_CLIENT_VER_14_0 = 0xA0 /* MSNC10 */
+ MSN_CLIENT_VER_14_0 = 0xA0, /* MSNC10 */
+ MSN_CLIENT_VER_15_0 = 0xB0 /* MSNC11 */
} MsnClientVerId;
#include "internal.h"
@@ -109,7 +141,7 @@ typedef enum
#define MSN_NUDGE 0
#define MSN_CLIENT_ID_VERSION MSN_CLIENT_VER_9_0
-#define MSN_CLIENT_ID_CAPABILITIES (MSN_CLIENT_CAP_PACKET|MSN_CLIENT_CAP_INK_GIF|MSN_CLIENT_CAP_VOICEIM)
+#define MSN_CLIENT_ID_CAPABILITIES (MSN_CAP_PACKET|MSN_CAP_INK_GIF|MSN_CAP_VOICEIM)
#define MSN_CLIENT_ID_EXT_CAPS (0)
#define MSN_CLIENT_ID \
============================================================
--- libpurple/protocols/msn/notification.c 0c46e67fc3374006412c41ec0248c7fb3c41cf10
+++ libpurple/protocols/msn/notification.c d2cf259e32d9efed7f9be8b21156e2afb9c8b44c
@@ -1099,7 +1099,7 @@ iln_cmd(MsnCmdProc *cmdproc, MsnCommand
msn_user_set_object(user, msnobj);
- user->mobile = (clientid & MSN_CLIENT_CAP_MSNMOBILE) || (user->extinfo && user->extinfo->phone_mobile && user->extinfo->phone_mobile[0] == '+');
+ user->mobile = (clientid & MSN_CAP_MOBILE_ON) || (user->extinfo && user->extinfo->phone_mobile && user->extinfo->phone_mobile[0] == '+');
msn_user_set_clientid(user, clientid);
msn_user_set_extcaps(user, extcaps);
msn_user_set_network(user, networkid);
@@ -1274,7 +1274,7 @@ nln_cmd(MsnCmdProc *cmdproc, MsnCommand
else
extcaps = 0;
- user->mobile = (clientid & MSN_CLIENT_CAP_MSNMOBILE) || (user->extinfo && user->extinfo->phone_mobile && user->extinfo->phone_mobile[0] == '+');
+ user->mobile = (clientid & MSN_CAP_MOBILE_ON) || (user->extinfo && user->extinfo->phone_mobile && user->extinfo->phone_mobile[0] == '+');
msn_user_set_clientid(user, clientid);
msn_user_set_extcaps(user, extcaps);
============================================================
--- libpurple/protocols/msn/user.h 640c139b7374d4a1a66954f69464e53b5b14f5b1
+++ libpurple/protocols/msn/user.h 0d8b8dfd862734da629d31ec1ef52fc14b122e15
@@ -28,13 +28,18 @@ typedef enum
typedef enum
{
- MSN_NETWORK_UNKNOWN = 0x00,
- MSN_NETWORK_PASSPORT = 0x01,
- MSN_NETWORK_COMMUNICATOR = 0x02,
- MSN_NETWORK_MOBILE = 0x04,
- MSN_NETWORK_MNI = 0x08,
- MSN_NETWORK_SMTP = 0x10,
- MSN_NETWORK_YAHOO = 0x20
+ MSN_NETWORK_UNKNOWN = 0,
+ MSN_NETWORK_PASSPORT = 1,
+ MSN_NETWORK_COMMUNICATOR = 2,
+ MSN_NETWORK_MOBILE = 4,
+ MSN_NETWORK_MNI = 8,
+ MSN_NETWORK_CIRCLE = 9,
+ MSN_NETWORK_TEMP_GROUP = 10,
+ MSN_NETWORK_CID = 11,
+ MSN_NETWORK_CONNECT = 13,
+ MSN_NETWORK_REMOTE = 14,
+ MSN_NETWORK_SMTP = 16,
+ MSN_NETWORK_YAHOO = 32
} MsnNetwork;
/**
============================================================
--- libpurple/protocols/msn/state.c 294b7bf132bf79202fb85e10094e87891f7c43f8
+++ libpurple/protocols/msn/state.c 32d23c9160735eaf6c155cb31718afac858ebfeb
@@ -217,11 +217,11 @@ msn_change_status(MsnSession *session)
if (client_type) {
if (strcmp(client_type, "phone") == 0 ||
strcmp(client_type, "handheld") == 0) {
- caps |= MSN_CLIENT_CAP_WIN_MOBILE;
+ caps |= MSN_CAP_VIA_MOBILE;
} else if (strcmp(client_type, "web") == 0) {
- caps |= MSN_CLIENT_CAP_WEBMSGR;
+ caps |= MSN_CAP_VIA_WEBIM;
} else if (strcmp(client_type, "bot") == 0) {
- caps |= MSN_CLIENT_CAP_BOT;
+ caps |= MSN_CAP_BOT;
}
/* MSN doesn't a "console" type...
What, they have no ncurses UI? :-) */
More information about the Commits
mailing list