[telepathy-gabble/master] tube-dbus: add priv->access_control

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Tue May 26 02:38:35 PDT 2009


---
 src/tube-dbus.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/src/tube-dbus.c b/src/tube-dbus.c
index 9a7b9b7..843d4dc 100644
--- a/src/tube-dbus.c
+++ b/src/tube-dbus.c
@@ -153,6 +153,7 @@ struct _GabbleTubeDBusPrivate
   gchar *service;
   GHashTable *parameters;
   GabbleMucChannel *muc;
+  TpSocketAccessControl access_control;
   /* GArray of guint */
   GArray *supported_access_controls;
 
@@ -946,6 +947,10 @@ gabble_tube_dbus_constructor (GType type,
       priv->offered = TRUE;
     }
 
+  /* default access control is Credentials as that's the one used by the old
+   * tube API */
+  priv->access_control = TP_SOCKET_ACCESS_CONTROL_CREDENTIALS;
+
   /* Set SupportedAccessesControl */
   priv->supported_access_controls = g_array_sized_new (FALSE, FALSE,
       sizeof (guint), 1);
@@ -1898,6 +1903,7 @@ gabble_tube_dbus_offer_async (GabbleSvcChannelTypeDBusTube *self,
     DBusGMethodInvocation *context)
 {
   GabbleTubeDBus *tube = GABBLE_TUBE_DBUS (self);
+  GabbleTubeDBusPrivate *priv = GABBLE_TUBE_DBUS_GET_PRIVATE (tube);
   GError *error = NULL;
 
   if (!gabble_tube_dbus_check_access_control (tube, access_control, &error))
@@ -1907,6 +1913,8 @@ gabble_tube_dbus_offer_async (GabbleSvcChannelTypeDBusTube *self,
       return;
     }
 
+  priv->access_control = access_control;
+
   g_object_set (self, "parameters", parameters, NULL);
 
   if (gabble_tube_dbus_offer (tube, &error))
-- 
1.5.6.5




More information about the telepathy-commits mailing list