Mercurial > pidgin.yaz
changeset 26599:3609fb4bc78e
Inform the user when someone tries to initiate a video call with them in msn.
author | Mike Ruprecht <maiku@soc.pidgin.im> |
---|---|
date | Wed, 08 Apr 2009 22:49:14 +0000 |
parents | e15d189020c9 |
children | 79e043347bbe |
files | libpurple/protocols/msn/msn.h libpurple/protocols/msn/slp.c |
diffstat | 2 files changed, 46 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/protocols/msn/msn.h Wed Apr 08 22:48:04 2009 +0000 +++ b/libpurple/protocols/msn/msn.h Wed Apr 08 22:49:14 2009 +0000 @@ -76,6 +76,8 @@ #define BUDDY_ALIAS_MAXLEN 387 +#define MSN_CAM_GUID "4BD96FC0-AB17-4425-A14A-439185962DC8" +#define MSN_CAM_REQUEST_GUID "1C9AA97E-9C05-4583-A3BD-908A196F1E92" #define MSN_FT_GUID "5D3E02AB-6190-11D3-BBBB-00C04F795683" #define MSN_OBJ_GUID "A4268EEC-FEC5-49E5-95C3-F126696BDBF6"
--- a/libpurple/protocols/msn/slp.c Wed Apr 08 22:48:04 2009 +0000 +++ b/libpurple/protocols/msn/slp.c Wed Apr 08 22:49:14 2009 +0000 @@ -377,6 +377,50 @@ purple_xfer_request(xfer); } + } else if (!strcmp(euf_guid, MSN_CAM_REQUEST_GUID)) { + purple_debug_info("msn", "Cam request.\n"); + if (slpcall && slpcall->slplink && + slpcall->slplink->session) { + PurpleConversation *conv; + gchar *from = slpcall->slplink->remote_user; + conv = purple_find_conversation_with_account( + PURPLE_CONV_TYPE_IM, from, + slpcall->slplink->session->account); + if (conv) { + char *buf; + buf = g_strdup_printf( + _("%s requests to view your " + "webcam, but this request is " + "not yet supported."), from); + purple_conversation_write(conv, NULL, buf, + PURPLE_MESSAGE_SYSTEM | + PURPLE_MESSAGE_NOTIFY, + time(NULL)); + g_free(buf); + } + } + } else if (!strcmp(euf_guid, MSN_CAM_GUID)) { + purple_debug_info("msn", "Cam invite.\n"); + if (slpcall && slpcall->slplink && + slpcall->slplink->session) { + PurpleConversation *conv; + gchar *from = slpcall->slplink->remote_user; + conv = purple_find_conversation_with_account( + PURPLE_CONV_TYPE_IM, from, + slpcall->slplink->session->account); + if (conv) { + char *buf; + buf = g_strdup_printf( + _("%s has sent you a webcam " + "invite, which is not yet " + "supported."), from); + purple_conversation_write(conv, NULL, buf, + PURPLE_MESSAGE_SYSTEM | + PURPLE_MESSAGE_NOTIFY, + time(NULL)); + g_free(buf); + } + } } else purple_debug_warning("msn", "SLP SessionReq with unknown EUF-GUID: %s\n", euf_guid); }