pidgin.vv: 425ee87b: Add stream-info signal.

maiku at soc.pidgin.im maiku at soc.pidgin.im
Sat Mar 21 05:15:45 EDT 2009


-----------------------------------------------------------------
Revision: 425ee87b3d3da7d8ab3defdb223a2c9fcb728a27
Ancestor: f98d41285fc5ad6a52b4d745b64c48077587732b
Author: maiku at soc.pidgin.im
Date: 2009-03-21T00:27:22
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/425ee87b3d3da7d8ab3defdb223a2c9fcb728a27

Modified files:
        libpurple/media.c libpurple/media.h

ChangeLog: 

Add stream-info signal.

-------------- next part --------------
============================================================
--- libpurple/media.c	7a66ee2ab066eae2b3f945c855292c6717ed904e
+++ libpurple/media.c	c3345fc5c95f7238cf4f9703d3e7c4f8c56ce4b0
@@ -128,6 +128,7 @@ enum {
 	CODECS_CHANGED,
 	NEW_CANDIDATE,
 	STATE_CHANGED,
+	STREAM_INFO,
 	LAST_SIGNAL
 };
 static guint purple_media_signals[LAST_SIGNAL] = {0};
@@ -251,6 +252,11 @@ purple_media_class_init (PurpleMediaClas
 					 purple_smarshal_VOID__ENUM_STRING_STRING,
 					 G_TYPE_NONE, 3, PURPLE_MEDIA_TYPE_STATE_CHANGED,
 					 G_TYPE_STRING, G_TYPE_STRING);
+	purple_media_signals[STREAM_INFO] = g_signal_new("stream-info", G_TYPE_FROM_CLASS(klass),
+					 G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+					 purple_smarshal_VOID__ENUM_STRING_STRING,
+					 G_TYPE_NONE, 3, PURPLE_MEDIA_TYPE_STATE_CHANGED,
+					 G_TYPE_STRING, G_TYPE_STRING);
 	g_type_class_add_private(klass, sizeof(PurpleMediaPrivate));
 }
 
@@ -1403,6 +1409,9 @@ purple_media_hangup(PurpleMedia *media)
 	g_signal_emit(media, purple_media_signals[STATE_CHANGED],
 			0, PURPLE_MEDIA_STATE_CHANGED_HANGUP,
 			NULL, NULL);
+	g_signal_emit(media, purple_media_signals[STREAM_INFO],
+			0, PURPLE_MEDIA_INFO_HANGUP,
+			NULL, NULL);
 	purple_media_end(media, NULL, NULL);
 }
 
@@ -1413,6 +1422,9 @@ purple_media_reject(PurpleMedia *media)
 	g_signal_emit(media, purple_media_signals[STATE_CHANGED],
 			0, PURPLE_MEDIA_STATE_CHANGED_REJECTED,
 			NULL, NULL);
+	g_signal_emit(media, purple_media_signals[STREAM_INFO],
+			0, PURPLE_MEDIA_INFO_REJECT,
+			NULL, NULL);
 	purple_media_end(media, NULL, NULL);
 }
 
============================================================
--- libpurple/media.h	6e56939a2014daf75e28f1bac53a492edd597f10
+++ libpurple/media.h	f5089c527e11047e35ea3a6fe72c40d3ab745ee9
@@ -97,7 +97,15 @@ typedef enum {
 	PURPLE_MEDIA_STATE_CHANGED_END,
 } PurpleMediaStateChangedType;
 
+/** Media info types */
 typedef enum {
+	PURPLE_MEDIA_INFO_HANGUP = 0,
+	PURPLE_MEDIA_INFO_REJECT,
+	PURPLE_MEDIA_INFO_MUTE,
+	PURPLE_MEDIA_INFO_HOLD,
+} PurpleMediaInfoType;
+
+typedef enum {
 	PURPLE_MEDIA_CANDIDATE_TYPE_HOST,
 	PURPLE_MEDIA_CANDIDATE_TYPE_SRFLX,
 	PURPLE_MEDIA_CANDIDATE_TYPE_PRFLX,


More information about the Commits mailing list