pidgin.vv: 40dead6a: Added the accepted signal.

maiku at soc.pidgin.im maiku at soc.pidgin.im
Tue Jan 27 18:05:28 EST 2009


-----------------------------------------------------------------
Revision: 40dead6ac2846cad611d977d52f3e506e422aafc
Ancestor: aa2db844f3c9c26644fda280af06a0476d013cde
Author: maiku at soc.pidgin.im
Date: 2009-01-27T09:40:24
Branch: im.pidgin.pidgin.vv
URL: http://d.pidgin.im/viewmtn/revision/info/40dead6ac2846cad611d977d52f3e506e422aafc

Modified files:
        libpurple/media.c libpurple/protocols/jabber/jingle/rtp.c

ChangeLog: 

Added the accepted signal.

-------------- next part --------------
============================================================
--- libpurple/media.c	78b4d2918345185ac3e5bb14946204a86d9ba139
+++ libpurple/media.c	d838b233311e0bc79997f3995653f42ce699b3a6
@@ -118,6 +118,7 @@ enum {
 
 enum {
 	ERROR,
+	ACCEPTED,
 	CODECS_CHANGED,
 	NEW_CANDIDATE,
 	READY_NEW,
@@ -200,6 +201,10 @@ purple_media_class_init (PurpleMediaClas
 					 G_SIGNAL_RUN_LAST, 0, NULL, NULL,
 					 g_cclosure_marshal_VOID__STRING,
 					 G_TYPE_NONE, 1, G_TYPE_STRING);
+	purple_media_signals[ACCEPTED] = g_signal_new("accepted", G_TYPE_FROM_CLASS(klass),
+					 G_SIGNAL_RUN_LAST, 0, NULL, NULL,
+					 purple_smarshal_VOID__STRING_STRING,
+					 G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_STRING);
 	purple_media_signals[CODECS_CHANGED] = g_signal_new("codecs-changed", G_TYPE_FROM_CLASS(klass),
 					 G_SIGNAL_RUN_LAST, 0, NULL, NULL,
 					 g_cclosure_marshal_VOID__STRING,
@@ -1232,6 +1237,8 @@ purple_media_accept(PurpleMedia *media)
 			purple_media_emit_ready(media, session, NULL);
 	}
 
+	g_signal_emit(media, purple_media_signals[ACCEPTED],
+			0, NULL, NULL);
 	streams = media->priv->streams;
 
 	for (; streams; streams = g_list_next(streams)) {
============================================================
--- libpurple/protocols/jabber/jingle/rtp.c	cd41dec9fdaaf7c3bc00a2ad78fdb1cc77910fb4
+++ libpurple/protocols/jabber/jingle/rtp.c	754d68f08d668e2170577e80d7b1e8f072c4668d
@@ -271,6 +271,13 @@ static void
 }
 
 static void
+jingle_rtp_accepted_cb(PurpleMedia *media, gchar *sid, gchar *name,
+		JingleSession *session)
+{
+	purple_debug_info("jingle-rtp", "jingle_rtp_accepted_cb\n");
+}
+
+static void
 jingle_rtp_codecs_changed_cb(PurpleMedia *media, gchar *sid,
 		JingleSession *session)
 {
@@ -367,6 +374,8 @@ jingle_rtp_create_media(JingleContent *c
 	g_hash_table_insert(js->medias, sid, media);
 
 	/* connect callbacks */
+	g_signal_connect(G_OBJECT(media), "accepted",
+				 G_CALLBACK(jingle_rtp_accepted_cb), session);
 	g_signal_connect(G_OBJECT(media), "codecs-changed",
 				 G_CALLBACK(jingle_rtp_codecs_changed_cb), session);
 	g_signal_connect(G_OBJECT(media), "new-candidate",


More information about the Commits mailing list