/soc/2013/ankitkv/gobjectification: 6e23992964ed: Merged soc.201...

Ankit Vani a at nevitus.org
Sat Nov 16 17:08:57 EST 2013


Changeset: 6e23992964ed5a46fa42822daaa175ddcf275fd3
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-11-17 03:38 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/6e23992964ed

Description:

Merged soc.2013.gobjectification branch

diffstat:

 libpurple/protocols/jabber/google/google_p2p.c |   4 ++--
 libpurple/protocols/jabber/jingle/content.c    |  22 ++++++++++++++--------
 libpurple/protocols/jabber/jingle/iceudp.c     |   4 ++--
 libpurple/protocols/jabber/jingle/rawudp.c     |   4 ++--
 libpurple/protocols/jabber/jingle/rtp.c        |   6 ++++--
 libpurple/protocols/jabber/jingle/session.c    |  26 ++++++++++++++++++--------
 6 files changed, 42 insertions(+), 24 deletions(-)

diffs (293 lines):

diff --git a/libpurple/protocols/jabber/google/google_p2p.c b/libpurple/protocols/jabber/google/google_p2p.c
--- a/libpurple/protocols/jabber/google/google_p2p.c
+++ b/libpurple/protocols/jabber/google/google_p2p.c
@@ -141,13 +141,13 @@ jingle_google_p2p_class_init(JingleGoogl
 			g_param_spec_pointer("local-candidates",
 			"Local candidates",
 			"The local candidates for this transport.",
-			G_PARAM_READABLE));
+			G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_REMOTE_CANDIDATES,
 			g_param_spec_pointer("remote-candidates",
 			"Remote candidates",
 			"The remote candidates for this transport.",
-			G_PARAM_READABLE));
+			G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
 	g_type_class_add_private(klass, sizeof(JingleGoogleP2PPrivate));
 }
diff --git a/libpurple/protocols/jabber/jingle/content.c b/libpurple/protocols/jabber/jingle/content.c
--- a/libpurple/protocols/jabber/jingle/content.c
+++ b/libpurple/protocols/jabber/jingle/content.c
@@ -84,49 +84,49 @@ jingle_content_class_init (JingleContent
 			"Jingle Session",
 			"The jingle session parent of this content.",
 			JINGLE_TYPE_SESSION,
-			G_PARAM_READWRITE));
+			G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_CREATOR,
 			g_param_spec_string("creator",
 			"Creator",
 			"The participant that created this content.",
 			NULL,
-			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_DISPOSITION,
 			g_param_spec_string("disposition",
 			"Disposition",
 			"The disposition of the content.",
 			NULL,
-			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_NAME,
 			g_param_spec_string("name",
 			"Name",
 			"The name of this content.",
 			NULL,
-			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_SENDERS,
 			g_param_spec_string("senders",
 			"Senders",
 			"The sender of this content.",
 			NULL,
-			G_PARAM_CONSTRUCT | G_PARAM_READWRITE));
+			G_PARAM_CONSTRUCT | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_TRANSPORT,
 			g_param_spec_object("transport",
 			"transport",
 			"The transport of this content.",
 			JINGLE_TYPE_TRANSPORT,
-			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_PENDING_TRANSPORT,
 			g_param_spec_object("pending-transport",
 			"Pending transport",
 			"The pending transport contained within this content",
 			JINGLE_TYPE_TRANSPORT,
-			G_PARAM_READWRITE));
+			G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_type_class_add_private(klass, sizeof(JingleContentPrivate));
 }
@@ -322,7 +322,7 @@ JingleTransport *
 jingle_content_get_pending_transport(JingleContent *content)
 {
 	JingleTransport *pending_transport;
-	g_object_get(content, "pending_transport", &pending_transport, NULL);
+	g_object_get(content, "pending-transport", &pending_transport, NULL);
 	return pending_transport;
 }
 
@@ -337,8 +337,12 @@ jingle_content_accept_transport(JingleCo
 {
 	if (content->priv->transport)
 		g_object_unref(content->priv->transport);
+
 	content->priv->transport = content->priv->pending_transport;
 	content->priv->pending_transport = NULL;
+
+	g_object_notify(G_OBJECT(content), "transport");
+	g_object_notify(G_OBJECT(content), "pending-transport");
 }
 
 void
@@ -348,6 +352,8 @@ jingle_content_remove_pending_transport(
 		g_object_unref(content->priv->pending_transport);
 		content->priv->pending_transport = NULL;
 	}
+
+	g_object_notify(G_OBJECT(content), "pending-transport");
 }
 
 void
diff --git a/libpurple/protocols/jabber/jingle/iceudp.c b/libpurple/protocols/jabber/jingle/iceudp.c
--- a/libpurple/protocols/jabber/jingle/iceudp.c
+++ b/libpurple/protocols/jabber/jingle/iceudp.c
@@ -154,13 +154,13 @@ jingle_iceudp_class_init (JingleIceUdpCl
 			g_param_spec_pointer("local-candidates",
 			"Local candidates",
 			"The local candidates for this transport.",
-			G_PARAM_READABLE));
+			G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_REMOTE_CANDIDATES,
 			g_param_spec_pointer("remote-candidates",
 			"Remote candidates",
 			"The remote candidates for this transport.",
-			G_PARAM_READABLE));
+			G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
 	g_type_class_add_private(klass, sizeof(JingleIceUdpPrivate));
 }
diff --git a/libpurple/protocols/jabber/jingle/rawudp.c b/libpurple/protocols/jabber/jingle/rawudp.c
--- a/libpurple/protocols/jabber/jingle/rawudp.c
+++ b/libpurple/protocols/jabber/jingle/rawudp.c
@@ -125,13 +125,13 @@ jingle_rawudp_class_init (JingleRawUdpCl
 			g_param_spec_pointer("local-candidates",
 			"Local candidates",
 			"The local candidates for this transport.",
-			G_PARAM_READABLE));
+			G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_REMOTE_CANDIDATES,
 			g_param_spec_pointer("remote-candidates",
 			"Remote candidates",
 			"The remote candidates for this transport.",
-			G_PARAM_READABLE));
+			G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
 	g_type_class_add_private(klass, sizeof(JingleRawUdpPrivate));
 }
diff --git a/libpurple/protocols/jabber/jingle/rtp.c b/libpurple/protocols/jabber/jingle/rtp.c
--- a/libpurple/protocols/jabber/jingle/rtp.c
+++ b/libpurple/protocols/jabber/jingle/rtp.c
@@ -93,13 +93,13 @@ jingle_rtp_class_init (JingleRtpClass *k
 			"Media Type",
 			"The media type (\"audio\" or \"video\") for this rtp session.",
 			NULL,
-			G_PARAM_READWRITE));
+			G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 	g_object_class_install_property(gobject_class, PROP_SSRC,
 			g_param_spec_string("ssrc",
 			"ssrc",
 			"The ssrc for this rtp session.",
 			NULL,
-			G_PARAM_READWRITE));
+			G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_type_class_add_private(klass, sizeof(JingleRtpPrivate));
 }
@@ -861,6 +861,7 @@ jingle_rtp_initiate_media(JabberStream *
 		jingle_session_add_content(session, content);
 		JINGLE_RTP(content)->priv->media_type = g_strdup("audio");
 		jingle_rtp_init_media(content);
+		g_object_notify(G_OBJECT(content), "media-type");
 	}
 	if (type & PURPLE_MEDIA_VIDEO) {
 		transport = jingle_transport_create(transport_type);
@@ -869,6 +870,7 @@ jingle_rtp_initiate_media(JabberStream *
 		jingle_session_add_content(session, content);
 		JINGLE_RTP(content)->priv->media_type = g_strdup("video");
 		jingle_rtp_init_media(content);
+		g_object_notify(G_OBJECT(content), "media-type");
 	}
 
 	g_free(me);
diff --git a/libpurple/protocols/jabber/jingle/session.c b/libpurple/protocols/jabber/jingle/session.c
--- a/libpurple/protocols/jabber/jingle/session.c
+++ b/libpurple/protocols/jabber/jingle/session.c
@@ -82,53 +82,53 @@ jingle_session_class_init (JingleSession
 			"Session ID",
 			"The unique session ID of the Jingle Session.",
 			NULL,
-			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_JS,
 			g_param_spec_pointer("js",
 			"JabberStream",
 			"The Jabber stream associated with this session.",
-			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_REMOTE_JID,
 			g_param_spec_string("remote-jid",
 			"Remote JID",
 			"The JID of the remote participant.",
 			NULL,
-			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_LOCAL_JID,
 			g_param_spec_string("local-jid",
 			"Local JID",
 			"The JID of the local participant.",
 			NULL,
-			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_IS_INITIATOR,
 			g_param_spec_boolean("is-initiator",
 			"Is Initiator",
 			"Whether or not the local JID is the initiator of the session.",
 			FALSE,
-			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE));
+			G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_STATE,
 			g_param_spec_boolean("state",
 			"State",
 			"The state of the session (PENDING=FALSE, ACTIVE=TRUE).",
 			FALSE,
-			G_PARAM_READABLE));
+			G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_CONTENTS,
 			g_param_spec_pointer("contents",
 			"Contents",
 			"The active contents contained within this session",
-			G_PARAM_READABLE));
+			G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
 	g_object_class_install_property(gobject_class, PROP_PENDING_CONTENTS,
 			g_param_spec_pointer("pending-contents",
 			"Pending contents",
 			"The pending contents contained within this session",
-			G_PARAM_READABLE));
+			G_PARAM_READABLE | G_PARAM_STATIC_STRINGS));
 
 	g_type_class_add_private(klass, sizeof(JingleSessionPrivate));
 }
@@ -542,6 +542,8 @@ jingle_session_add_content(JingleSession
 	session->priv->contents =
 			g_list_append(session->priv->contents, content);
 	jingle_content_set_session(content, session);
+
+	g_object_notify(G_OBJECT(session), "contents");
 }
 
 void
@@ -554,6 +556,8 @@ jingle_session_remove_content(JingleSess
 		session->priv->contents =
 				g_list_remove(session->priv->contents, content);
 		g_object_unref(content);
+
+		g_object_notify(G_OBJECT(session), "contents");
 	}
 }
 
@@ -563,6 +567,8 @@ jingle_session_add_pending_content(Jingl
 	session->priv->pending_contents =
 			g_list_append(session->priv->pending_contents, content);
 	jingle_content_set_session(content, session);
+
+	g_object_notify(G_OBJECT(session), "pending-contents");
 }
 
 void
@@ -574,6 +580,8 @@ jingle_session_remove_pending_content(Ji
 		session->priv->pending_contents =
 				g_list_remove(session->priv->pending_contents, content);
 		g_object_unref(content);
+
+		g_object_notify(G_OBJECT(session), "pending-contents");
 	}
 }
 
@@ -593,6 +601,8 @@ void
 jingle_session_accept_session(JingleSession *session)
 {
 	session->priv->state = TRUE;
+
+	g_object_notify(G_OBJECT(session), "state");
 }
 
 JabberIq *



More information about the Commits mailing list