# HG changeset patch # User Ankit Vani # Date 1384639709 -19800 # Node ID 6e23992964ed5a46fa42822daaa175ddcf275fd3 # Parent 5dbe8b930aef0fd7236ff2f204270fbf02b063cf# Parent 307195f879f332475fe06a6d20ab1c29e751cecb Merged soc.2013.gobjectification branch diff -r 5dbe8b930aef -r 6e23992964ed libpurple/protocols/jabber/google/google_p2p.c --- a/libpurple/protocols/jabber/google/google_p2p.c Sun Nov 17 03:09:54 2013 +0530 +++ b/libpurple/protocols/jabber/google/google_p2p.c Sun Nov 17 03:38:29 2013 +0530 @@ -141,13 +141,13 @@ 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 -r 5dbe8b930aef -r 6e23992964ed libpurple/protocols/jabber/jingle/content.c --- a/libpurple/protocols/jabber/jingle/content.c Sun Nov 17 03:09:54 2013 +0530 +++ b/libpurple/protocols/jabber/jingle/content.c Sun Nov 17 03:38:29 2013 +0530 @@ -84,49 +84,49 @@ "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 @@ 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 @@ { 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 @@ g_object_unref(content->priv->pending_transport); content->priv->pending_transport = NULL; } + + g_object_notify(G_OBJECT(content), "pending-transport"); } void diff -r 5dbe8b930aef -r 6e23992964ed libpurple/protocols/jabber/jingle/iceudp.c --- a/libpurple/protocols/jabber/jingle/iceudp.c Sun Nov 17 03:09:54 2013 +0530 +++ b/libpurple/protocols/jabber/jingle/iceudp.c Sun Nov 17 03:38:29 2013 +0530 @@ -154,13 +154,13 @@ 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 -r 5dbe8b930aef -r 6e23992964ed libpurple/protocols/jabber/jingle/rawudp.c --- a/libpurple/protocols/jabber/jingle/rawudp.c Sun Nov 17 03:09:54 2013 +0530 +++ b/libpurple/protocols/jabber/jingle/rawudp.c Sun Nov 17 03:38:29 2013 +0530 @@ -125,13 +125,13 @@ 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 -r 5dbe8b930aef -r 6e23992964ed libpurple/protocols/jabber/jingle/rtp.c --- a/libpurple/protocols/jabber/jingle/rtp.c Sun Nov 17 03:09:54 2013 +0530 +++ b/libpurple/protocols/jabber/jingle/rtp.c Sun Nov 17 03:38:29 2013 +0530 @@ -93,13 +93,13 @@ "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_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_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 -r 5dbe8b930aef -r 6e23992964ed libpurple/protocols/jabber/jingle/session.c --- a/libpurple/protocols/jabber/jingle/session.c Sun Nov 17 03:09:54 2013 +0530 +++ b/libpurple/protocols/jabber/jingle/session.c Sun Nov 17 03:38:29 2013 +0530 @@ -82,53 +82,53 @@ "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 @@ 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 @@ 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 @@ 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 @@ 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 @@ jingle_session_accept_session(JingleSession *session) { session->priv->state = TRUE; + + g_object_notify(G_OBJECT(session), "state"); } JabberIq *