pidgin: 70c87d17: Inform the user when someone tries to in...

maiku at soc.pidgin.im maiku at soc.pidgin.im
Wed Apr 8 18:50:32 EDT 2009


-----------------------------------------------------------------
Revision: 70c87d1707d48439fed0e2545ddd96c4714a69f1
Ancestor: 4d03eac0e16f79591c6eeae079311e339f8015c5
Author: maiku at soc.pidgin.im
Date: 2009-04-08T22:49:14
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/70c87d1707d48439fed0e2545ddd96c4714a69f1

Modified files:
        libpurple/protocols/msn/msn.h libpurple/protocols/msn/slp.c

ChangeLog: 

Inform the user when someone tries to initiate a video call with them in msn.

-------------- next part --------------
============================================================
--- libpurple/protocols/msn/msn.h	89e4aa44cedc77be4ae5ec5c0dd3e509eeed1641
+++ libpurple/protocols/msn/msn.h	3a35c43d1131b199a9f2c886f71cb60bc27c2201
@@ -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"
 
============================================================
--- libpurple/protocols/msn/slp.c	75ddba27c8537b193d1268d08fe4e4a6cf807695
+++ libpurple/protocols/msn/slp.c	60edbb80644c78487730734cf0785f45d171d9fc
@@ -377,6 +377,50 @@ got_sessionreq(MsnSlpCall *slpcall, cons
 
 			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);
 }


More information about the Commits mailing list