Mercurial > pidgin.yaz
changeset 31657:d235da74af79
Updated client capabilities and networks from msnpsharp.
author | Elliott Sales de Andrade <qulogic@pidgin.im> |
---|---|
date | Sun, 13 Feb 2011 01:27:17 +0000 |
parents | 1b1f9d6b25d0 |
children | 0dade4c34d24 |
files | libpurple/protocols/msn/msn.c libpurple/protocols/msn/msn.h libpurple/protocols/msn/notification.c libpurple/protocols/msn/state.c libpurple/protocols/msn/user.h |
diffstat | 5 files changed, 81 insertions(+), 44 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.c Sat Feb 12 16:27:10 2011 +0000 +++ b/libpurple/protocols/msn/msn.c Sun Feb 13 01:27:17 2011 +0000 @@ -931,8 +931,8 @@ 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 @@ 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";
--- a/libpurple/protocols/msn/msn.h Sat Feb 12 16:27:10 2011 +0000 +++ b/libpurple/protocols/msn/msn.h Sun Feb 13 01:27:17 2011 +0000 @@ -26,34 +26,65 @@ 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 @@ 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 @@ #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 \
--- a/libpurple/protocols/msn/notification.c Sat Feb 12 16:27:10 2011 +0000 +++ b/libpurple/protocols/msn/notification.c Sun Feb 13 01:27:17 2011 +0000 @@ -1099,7 +1099,7 @@ 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 @@ 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);
--- a/libpurple/protocols/msn/state.c Sat Feb 12 16:27:10 2011 +0000 +++ b/libpurple/protocols/msn/state.c Sun Feb 13 01:27:17 2011 +0000 @@ -217,11 +217,11 @@ 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? :-) */
--- a/libpurple/protocols/msn/user.h Sat Feb 12 16:27:10 2011 +0000 +++ b/libpurple/protocols/msn/user.h Sun Feb 13 01:27:17 2011 +0000 @@ -28,13 +28,18 @@ 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; /**