summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonny Lamb <jonny.lamb@collabora.co.uk>2012-05-23 12:31:39 +0100
committerJonny Lamb <jonny.lamb@collabora.co.uk>2012-05-23 12:31:39 +0100
commit4d2d6969223b71f58e8968b089aae016fca2e609 (patch)
treed6f25000fc5a7c4f6944a1ae527350d7d58aac44
parent9156cecdd2473e065a3d7104bc6233306c166106 (diff)
tube-dbus: explicitly set the requested property
Signed-off-by: Jonny Lamb <jonny.lamb@collabora.co.uk>
-rw-r--r--src/tube-dbus.c4
-rw-r--r--src/tube-dbus.h3
-rw-r--r--src/tubes-channel.c17
3 files changed, 14 insertions, 10 deletions
diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index cfa504bf..e92dde9b 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -1455,7 +1455,8 @@ salut_tube_dbus_new (SalutConnection *conn,
TpHandle initiator,
const gchar *service,
GHashTable *parameters,
- guint id)
+ guint id,
+ gboolean requested)
{
SalutTubeDBus *tube;
gchar *object_path;
@@ -1475,6 +1476,7 @@ salut_tube_dbus_new (SalutConnection *conn,
"service", service,
"parameters", parameters,
"id", id,
+ "requested", requested,
NULL);
return tube;
diff --git a/src/tube-dbus.h b/src/tube-dbus.h
index e8a64eb1..b90285ac 100644
--- a/src/tube-dbus.h
+++ b/src/tube-dbus.h
@@ -69,7 +69,8 @@ SalutTubeDBus *
salut_tube_dbus_new (SalutConnection *conn, SalutTubesChannel *tubes_channel,
TpHandle handle, TpHandleType handle_type, TpHandle self_handle,
GibberMucConnection *muc_connection, TpHandle initiator,
- const gchar *service, GHashTable *parameters, guint id);
+ const gchar *service, GHashTable *parameters, guint id,
+ gboolean requested);
gboolean salut_tube_dbus_add_name (SalutTubeDBus *self, TpHandle handle,
const gchar *name);
diff --git a/src/tubes-channel.c b/src/tubes-channel.c
index c847208a..834c6ad3 100644
--- a/src/tubes-channel.c
+++ b/src/tubes-channel.c
@@ -166,7 +166,7 @@ static gboolean extract_tube_information (SalutTubesChannel *self,
static SalutTubeIface * create_new_tube (SalutTubesChannel *self,
TpTubeType type, TpHandle initiator, gboolean offered,
const gchar *service, GHashTable *parameters, guint tube_id, guint portnum,
- WockyStanza *iq_req);
+ WockyStanza *iq_req, gboolean requested);
static void
salut_tubes_channel_init (SalutTubesChannel *self)
@@ -698,7 +698,7 @@ salut_tubes_channel_muc_message_received (SalutTubesChannel *self,
}
tube = create_new_tube (self, type, initiator_handle, FALSE,
- service, parameters, id, 0, NULL);
+ service, parameters, id, 0, NULL, FALSE);
g_ptr_array_add (result, tube);
/* the tube has reffed its initiator, no need to keep a ref */
@@ -794,7 +794,7 @@ salut_tubes_channel_message_received (SalutTubesChannel *self,
if (tube == NULL)
{
tube = create_new_tube (self, tube_type, initiator_handle, FALSE,
- service, parameters, tube_id, portnum, iq_req);
+ service, parameters, tube_id, portnum, iq_req, FALSE);
return tube;
}
@@ -876,7 +876,7 @@ salut_tubes_channel_tube_request (SalutTubesChannel *self,
(GDestroyNotify) tp_g_value_slice_free);
tube = create_new_tube (self, type, priv->self_handle, FALSE, service,
- parameters, tube_id, 0, NULL);
+ parameters, tube_id, 0, NULL, TRUE);
g_hash_table_unref (parameters);
return tube;
@@ -1131,7 +1131,8 @@ create_new_tube (SalutTubesChannel *self,
GHashTable *parameters,
guint tube_id,
guint portnum,
- WockyStanza *iq_req)
+ WockyStanza *iq_req,
+ gboolean requested)
{
SalutTubesChannelPrivate *priv = SALUT_TUBES_CHANNEL_GET_PRIVATE (self);
SalutTubeIface *tube;
@@ -1146,7 +1147,7 @@ create_new_tube (SalutTubesChannel *self,
case TP_TUBE_TYPE_DBUS:
tube = SALUT_TUBE_IFACE (salut_tube_dbus_new (priv->conn, self,
priv->handle, priv->handle_type, priv->self_handle, muc_connection,
- initiator, service, parameters, tube_id));
+ initiator, service, parameters, tube_id, requested));
break;
case TP_TUBE_TYPE_STREAM:
tube = SALUT_TUBE_IFACE (salut_tube_stream_new (priv->conn, self,
@@ -1480,7 +1481,7 @@ salut_tubes_channel_offer_d_bus_tube (TpSvcChannelTypeTubes *iface,
tube_id = generate_tube_id ();
tube = create_new_tube (self, TP_TUBE_TYPE_DBUS, priv->self_handle,
- TRUE, service, parameters, tube_id, 0, NULL);
+ TRUE, service, parameters, tube_id, 0, NULL, TRUE);
if (!salut_tube_dbus_offer (SALUT_TUBE_DBUS (tube), &err))
{
@@ -1970,7 +1971,7 @@ salut_tubes_channel_offer_stream_tube (TpSvcChannelTypeTubes *iface,
tube_id = generate_tube_id ();
tube = create_new_tube (self, TP_TUBE_TYPE_STREAM, priv->self_handle,
- TRUE, service, parameters, tube_id, 0, NULL);
+ TRUE, service, parameters, tube_id, 0, NULL, TRUE);
g_object_set (tube,
"address-type", address_type,