[telepathy-gabble/master] Pass the GabbleConnection to the content
Sjoerd Simons
sjoerd.simons at collabora.co.uk
Tue Dec 29 05:34:40 PST 2009
---
src/call-channel.c | 1 +
src/call-content.c | 18 ++++++++++++++++++
2 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/src/call-channel.c b/src/call-channel.c
index 9d616d0..02eafca 100644
--- a/src/call-channel.c
+++ b/src/call-channel.c
@@ -521,6 +521,7 @@ call_channel_add_content (GabbleCallChannel *self,
object_path = g_strdup_printf ("%s/Content%p", priv->object_path, c);
content = g_object_new (GABBLE_TYPE_CALL_CONTENT,
+ "connection", priv->conn,
"object-path", object_path,
"jingle-content", c,
NULL);
diff --git a/src/call-content.c b/src/call-content.c
index 4c90e05..2744b7e 100644
--- a/src/call-content.c
+++ b/src/call-content.c
@@ -22,13 +22,16 @@
#include <stdio.h>
#include <stdlib.h>
+#include <telepathy-glib/base-connection.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/svc-properties-interface.h>
#include <telepathy-glib/base-connection.h>
+
#include <extensions/extensions.h>
#include "call-content.h"
#include "jingle-content.h"
+#include "connection.h"
#define DEBUG_FLAG GABBLE_DEBUG_MEDIA
@@ -52,6 +55,7 @@ enum
{
PROP_OBJECT_PATH = 1,
PROP_JINGLE_CONTENT,
+ PROP_CONNECTION,
};
#if 0
@@ -69,6 +73,8 @@ static guint signals[LAST_SIGNAL] = {0};
/* private structure */
struct _GabbleCallContentPrivate
{
+ GabbleConnection *conn;
+
gchar *object_path;
GabbleJingleContent *content;
@@ -104,6 +110,9 @@ gabble_call_content_get_property (GObject *object,
case PROP_JINGLE_CONTENT:
g_value_set_object (value, priv->content);
break;
+ case PROP_CONNECTION:
+ g_value_set_object (value, priv->conn);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -128,6 +137,9 @@ gabble_call_content_set_property (GObject *object,
case PROP_JINGLE_CONTENT:
priv->content = g_value_dup_object (value);
break;
+ case PROP_CONNECTION:
+ priv->conn = g_value_get_object (value);
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
@@ -193,6 +205,12 @@ gabble_call_content_class_init (
G_PARAM_STATIC_BLURB);
g_object_class_install_property (object_class, PROP_JINGLE_CONTENT,
param_spec);
+
+ param_spec = g_param_spec_object ("connection", "GabbleConnection object",
+ "Gabble connection object that owns this media channel object.",
+ GABBLE_TYPE_CONNECTION,
+ G_PARAM_CONSTRUCT_ONLY | G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS);
+ g_object_class_install_property (object_class, PROP_CONNECTION, param_spec);
}
void
--
1.5.6.5
More information about the telepathy-commits
mailing list