[telepathy-salut/master] undraft tube new API implementation

Guillaume Desmottes guillaume.desmottes at collabora.co.uk
Fri Jun 26 07:16:31 PDT 2009


---
 src/salut-muc-manager.c   |   10 +++---
 src/salut-tubes-channel.c |   28 +++++++-------
 src/salut-tubes-manager.c |   44 ++++++++++++------------
 src/tube-stream.c         |   84 ++++++++++++++++++++++----------------------
 4 files changed, 83 insertions(+), 83 deletions(-)

diff --git a/src/salut-muc-manager.c b/src/salut-muc-manager.c
index 0bb8209..53b9610 100644
--- a/src/salut-muc-manager.c
+++ b/src/salut-muc-manager.c
@@ -395,7 +395,7 @@ salut_muc_manager_foreach_channel_class (TpChannelManager *manager,
 
   /* org.freedesktop.Telepathy.Channel.Type.StreamTube */
   g_value_set_static_string (channel_type_value,
-      SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE);
+      TP_IFACE_CHANNEL_TYPE_STREAM_TUBE);
   func (manager, table, salut_tube_stream_channel_get_allowed_properties (),
       user_data);
 
@@ -745,7 +745,7 @@ salut_muc_manager_request (SalutMucManager *self,
 
   if (tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TEXT) &&
       tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TUBES) &&
-      tp_strdiff (channel_type, SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE))
+      tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
     return FALSE;
 
   /* validity already checked by TpBaseConnection */
@@ -820,7 +820,7 @@ salut_muc_manager_request (SalutMucManager *self,
 
       return TRUE;
     }
-  else if (!tp_strdiff (channel_type, SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE))
+  else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
     {
       const gchar *service;
       SalutTubeIface *new_channel;
@@ -836,12 +836,12 @@ salut_muc_manager_request (SalutMucManager *self,
 
       /* "Service" is a mandatory, not-fixed property */
       service = tp_asv_get_string (request_properties,
-                SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
+                TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
       if (service == NULL)
         {
           g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
               "Request does not contain the mandatory property '%s'",
-              SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
+              TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
           goto error;
         }
 
diff --git a/src/salut-tubes-channel.c b/src/salut-tubes-channel.c
index 6b925fd..6e24310 100644
--- a/src/salut-tubes-channel.c
+++ b/src/salut-tubes-channel.c
@@ -1013,13 +1013,13 @@ salut_tubes_channel_tube_request (SalutTubesChannel *self,
 
   tube_id = generate_tube_id ();
 
-  if (!tp_strdiff (channel_type, SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE))
+  if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
     {
       type = TP_TUBE_TYPE_STREAM;
     }
 /* Temporarily disabled since the implementation is incomplete */
 #if 0
-  else if (!tp_strdiff (channel_type, SALUT_IFACE_CHANNEL_TYPE_DBUS_TUBE))
+  else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE))
     {
       type = TP_TUBE_TYPE_DBUS;
     }
@@ -1108,7 +1108,7 @@ copy_tube_in_ptr_array (gpointer key,
   TpHandle initiator;
   gchar *service;
   GHashTable *parameters;
-  SalutTubeChannelState state;
+  TpTubeChannelState state;
   TpTubeType type;
   GPtrArray *array = (GPtrArray *) user_data;
   GValue entry = {0,};
@@ -1294,7 +1294,7 @@ create_new_tube (SalutTubesChannel *self,
 {
   SalutTubesChannelPrivate *priv = SALUT_TUBES_CHANNEL_GET_PRIVATE (self);
   SalutTubeIface *tube;
-  SalutTubeChannelState state;
+  TpTubeChannelState state;
   GibberMucConnection *muc_connection = NULL;
 
   if (self->muc != NULL)
@@ -1322,7 +1322,7 @@ create_new_tube (SalutTubesChannel *self,
 
   g_object_get (tube, "state", &state, NULL);
 
-  if (state == SALUT_TUBE_CHANNEL_STATE_OPEN)
+  if (state == TP_TUBE_CHANNEL_STATE_OPEN)
     {
       /* FIXME: does it still make sense to call it here? */
       update_tubes_info (self);
@@ -1330,7 +1330,7 @@ create_new_tube (SalutTubesChannel *self,
 
   /* The old API doesn't know the "not offered" state, so we have to wait that
    * the tube is offered before announcing it. */
-  if (state != SALUT_TUBE_CHANNEL_STATE_NOT_OFFERED)
+  if (state != TP_TUBE_CHANNEL_STATE_NOT_OFFERED)
     {
       tp_svc_channel_type_tubes_emit_new_tube (self,
           tube_id,
@@ -1540,7 +1540,7 @@ publish_tubes_in_node (gpointer key,
     (struct _i_hate_g_hash_table_foreach *) user_data;
   SalutTubesChannelPrivate *priv = SALUT_TUBES_CHANNEL_GET_PRIVATE (
       data->self);
-  SalutTubeChannelState state;
+  TpTubeChannelState state;
   GibberXmppNode *tube_node;
   TpTubeType type;
   TpHandle initiator;
@@ -1669,7 +1669,7 @@ salut_tubes_channel_accept_d_bus_tube (TpSvcChannelTypeTubes *iface,
   SalutTubesChannel *self = SALUT_TUBES_CHANNEL (iface);
   SalutTubesChannelPrivate *priv;
   SalutTubeIface *tube;
-  SalutTubeChannelState state;
+  TpTubeChannelState state;
   TpTubeType type;
   gchar *addr;
 
@@ -1774,7 +1774,7 @@ salut_tubes_channel_get_d_bus_tube_address (TpSvcChannelTypeTubes *iface,
   SalutTubeIface *tube;
   gchar *addr;
   TpTubeType type;
-  SalutTubeChannelState state;
+  TpTubeChannelState state;
 
   g_assert (SALUT_IS_TUBES_CHANNEL (self));
 
@@ -1854,7 +1854,7 @@ salut_tubes_channel_get_d_bus_names (TpSvcChannelTypeTubes *iface,
   GHashTable *names;
   GPtrArray *ret;
   TpTubeType type;
-  SalutTubeChannelState state;
+  TpTubeChannelState state;
   guint i;
 
   g_assert (SALUT_IS_TUBES_CHANNEL (self));
@@ -1962,7 +1962,7 @@ send_channel_iq_tube (gpointer key,
   TpHandle initiator;
   gchar *service;
   GHashTable *parameters;
-  SalutTubeChannelState state;
+  TpTubeChannelState state;
   TpTubeType type;
 
   g_object_get (tube,
@@ -1973,7 +1973,7 @@ send_channel_iq_tube (gpointer key,
                 "state", &state,
                 NULL);
 
-  if (state != SALUT_TUBE_CHANNEL_STATE_NOT_OFFERED &&
+  if (state != TP_TUBE_CHANNEL_STATE_NOT_OFFERED &&
       salut_tube_iface_offer_needed (tube))
     {
       GError *error = NULL;
@@ -2175,7 +2175,7 @@ salut_tubes_channel_accept_stream_tube (TpSvcChannelTypeTubes *iface,
   SalutTubesChannel *self = SALUT_TUBES_CHANNEL (iface);
   SalutTubesChannelPrivate *priv;
   SalutTubeIface *tube;
-  SalutTubeChannelState state;
+  TpTubeChannelState state;
   TpTubeType type;
   GValue *address;
   GError *error = NULL;
@@ -2279,7 +2279,7 @@ salut_tubes_channel_get_stream_tube_socket_address (TpSvcChannelTypeTubes *iface
   SalutTubesChannelPrivate *priv  = SALUT_TUBES_CHANNEL_GET_PRIVATE (self);
   SalutTubeIface *tube;
   TpTubeType type;
-  SalutTubeChannelState state;
+  TpTubeChannelState state;
   GValue *address;
   TpSocketAddressType address_type;
 
diff --git a/src/salut-tubes-manager.c b/src/salut-tubes-manager.c
index ead05ab..ce2c2a5 100644
--- a/src/salut-tubes-manager.c
+++ b/src/salut-tubes-manager.c
@@ -819,7 +819,7 @@ static const gchar * const old_tubes_channel_allowed_properties[] = {
 
 static const gchar * const stream_tube_channel_allowed_properties[] = {
     TP_IFACE_CHANNEL ".TargetHandle",
-    SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service",
+    TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service",
     NULL
 };
 
@@ -827,7 +827,7 @@ static const gchar * const stream_tube_channel_allowed_properties[] = {
 #if 0
 static const gchar * const dbus_tube_channel_allowed_properties[] = {
     TP_IFACE_CHANNEL ".TargetHandle",
-    SALUT_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName",
+    TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName",
     NULL
 };
 #endif
@@ -864,7 +864,7 @@ salut_tubes_manager_foreach_channel_class (
       (GDestroyNotify) tp_g_value_slice_free);
 
   value = tp_g_value_slice_new (G_TYPE_STRING);
-  g_value_set_static_string (value, SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE);
+  g_value_set_static_string (value, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE);
   g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType",
       value);
 
@@ -885,7 +885,7 @@ salut_tubes_manager_foreach_channel_class (
       (GDestroyNotify) tp_g_value_slice_free);
 
   value = tp_g_value_slice_new (G_TYPE_STRING);
-  g_value_set_static_string (value, SALUT_IFACE_CHANNEL_TYPE_DBUS_TUBE);
+  g_value_set_static_string (value, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE);
   g_hash_table_insert (table, TP_IFACE_CHANNEL ".ChannelType",
       value);
 
@@ -926,8 +926,8 @@ salut_tubes_manager_requestotron (SalutTubesManager *self,
 
   if (tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TUBES) &&
   /* Temporarily disabled since the implementation is incomplete. */
-  /*  tp_strdiff (channel_type, SALUT_IFACE_CHANNEL_TYPE_DBUS_TUBE) && */
-      tp_strdiff (channel_type, SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE))
+  /*  tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE) && */
+      tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
     return FALSE;
 
   if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TUBES))
@@ -938,7 +938,7 @@ salut_tubes_manager_requestotron (SalutTubesManager *self,
               &error))
         goto error;
     }
-  else if (!tp_strdiff (channel_type, SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE))
+  else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
     {
       if (tp_channel_manager_asv_has_unknown_properties (request_properties,
               tubes_channel_fixed_properties,
@@ -948,18 +948,18 @@ salut_tubes_manager_requestotron (SalutTubesManager *self,
 
       /* "Service" is a mandatory, not-fixed property */
       service = tp_asv_get_string (request_properties,
-                SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
+                TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
       if (service == NULL)
         {
           g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
               "StreamTube requests must include '%s'",
-              SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
+              TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
           goto error;
         }
     }
 /* Temporarily disabled since the implementation is incomplete. */
 #if 0
-  else if (!tp_strdiff (channel_type, SALUT_IFACE_CHANNEL_TYPE_DBUS_TUBE))
+  else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE))
     {
       GError *err = NULL;
 
@@ -971,12 +971,12 @@ salut_tubes_manager_requestotron (SalutTubesManager *self,
 
       /* "ServiceName" is a mandatory, not-fixed property */
       service = tp_asv_get_string (request_properties,
-                SALUT_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName");
+                TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName");
       if (service == NULL)
         {
           g_set_error (&error, TP_ERRORS, TP_ERROR_NOT_IMPLEMENTED,
               "Request missed a mandatory property '%s'",
-              SALUT_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName");
+              TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName");
           goto error;
         }
 
@@ -1166,10 +1166,10 @@ add_service_to_array (gchar *service,
   channel_type_value = tp_g_value_slice_new (G_TYPE_STRING);
   if (type == TP_TUBE_TYPE_STREAM)
     g_value_set_static_string (channel_type_value,
-        SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE);
+        TP_IFACE_CHANNEL_TYPE_STREAM_TUBE);
   else
     g_value_set_static_string (channel_type_value,
-        SALUT_IFACE_CHANNEL_TYPE_DBUS_TUBE);
+        TP_IFACE_CHANNEL_TYPE_DBUS_TUBE);
   g_hash_table_insert (fixed_properties, TP_IFACE_CHANNEL ".ChannelType",
       channel_type_value);
 
@@ -1182,11 +1182,11 @@ add_service_to_array (gchar *service,
   g_value_set_string (target_handle_type_value, service);
   if (type == TP_TUBE_TYPE_STREAM)
     g_hash_table_insert (fixed_properties,
-        SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service",
+        TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service",
         target_handle_type_value);
   else
     g_hash_table_insert (fixed_properties,
-        SALUT_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName",
+        TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName",
         target_handle_type_value);
 
   dbus_g_type_struct_set (&monster,
@@ -1474,8 +1474,8 @@ salut_tubes_manager_add_cap (SalutCapsChannelManager *manager,
 
   /* this channel is not for this factory */
   if (tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_TUBES) &&
-      tp_strdiff (channel_type, SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE) &&
-      tp_strdiff (channel_type, SALUT_IFACE_CHANNEL_TYPE_DBUS_TUBE))
+      tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE) &&
+      tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE))
     return;
 
   if (tp_asv_get_uint32 (cap,
@@ -1510,21 +1510,21 @@ salut_tubes_manager_add_cap (SalutCapsChannelManager *manager,
       g_hash_table_insert (*per_channel_manager_caps, manager, caps);
     }
 
-  if (!tp_strdiff (channel_type, SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE))
+  if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
     {
       Feature *feat = g_slice_new (Feature);
       gchar *service = g_strdup (tp_asv_get_string (cap,
-          SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"));
+          TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service"));
       feat->feature_type = FEATURE_OPTIONAL;
       feat->ns = g_strdup_printf ("%s/stream#%s", GIBBER_TELEPATHY_NS_TUBES,
           service);
       g_hash_table_insert (caps->stream_tube_caps, service, feat);
     }
-  else if (!tp_strdiff (channel_type, SALUT_IFACE_CHANNEL_TYPE_DBUS_TUBE))
+  else if (!tp_strdiff (channel_type, TP_IFACE_CHANNEL_TYPE_DBUS_TUBE))
     {
       Feature *feat = g_slice_new (Feature);
       gchar *service = g_strdup (tp_asv_get_string (cap,
-          SALUT_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName"));
+          TP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName"));
       feat->feature_type = FEATURE_OPTIONAL;
       feat->ns = g_strdup_printf ("%s/dbus#%s", GIBBER_TELEPATHY_NS_TUBES,
           service);
diff --git a/src/tube-stream.c b/src/tube-stream.c
index 2a006f8..86c805c 100644
--- a/src/tube-stream.c
+++ b/src/tube-stream.c
@@ -84,9 +84,9 @@ G_DEFINE_TYPE_WITH_CODE (SalutTubeStream, salut_tube_stream, G_TYPE_OBJECT,
       tp_dbus_properties_mixin_iface_init);
     G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL, channel_iface_init);
     G_IMPLEMENT_INTERFACE (SALUT_TYPE_TUBE_IFACE, tube_iface_init);
-    G_IMPLEMENT_INTERFACE (SALUT_TYPE_SVC_CHANNEL_TYPE_STREAM_TUBE,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_TYPE_STREAM_TUBE,
       streamtube_iface_init);
-    G_IMPLEMENT_INTERFACE (SALUT_TYPE_SVC_CHANNEL_INTERFACE_TUBE,
+    G_IMPLEMENT_INTERFACE (TP_TYPE_SVC_CHANNEL_INTERFACE_TUBE,
       NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_EXPORTABLE_CHANNEL, NULL);
     G_IMPLEMENT_INTERFACE (TP_TYPE_CHANNEL_IFACE, NULL));
@@ -96,14 +96,14 @@ static const gchar *salut_tube_stream_interfaces[] = {
     /* If more interfaces are added, either keep Tube as the first, or change
      * the implementations of salut_tube_stream_get_interfaces () and
      * salut_tube_stream_get_property () too */
-    SALUT_IFACE_CHANNEL_INTERFACE_TUBE,
+    TP_IFACE_CHANNEL_INTERFACE_TUBE,
     NULL
 };
 
 static const gchar * const salut_tube_stream_channel_allowed_properties[] = {
     TP_IFACE_CHANNEL ".TargetHandle",
     TP_IFACE_CHANNEL ".TargetID",
-    SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service",
+    TP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service",
     NULL
 };
 
@@ -206,7 +206,7 @@ struct _SalutTubeStreamPrivate
   TpHandle initiator;
   gchar *service;
   GHashTable *parameters;
-  SalutTubeChannelState state;
+  TpTubeChannelState state;
   /* whether the tube is already offered at construct-time (with the
    * Channel.Type.Tubes interface) */
   gboolean offered;
@@ -310,7 +310,7 @@ fire_connection_closed (SalutTubeStream *self,
    * same connection. */
   g_hash_table_remove (priv->transport_to_id, transport);
 
-  salut_svc_channel_type_stream_tube_emit_connection_closed (self,
+  tp_svc_channel_type_stream_tube_emit_connection_closed (self,
       connection_id, error, debug_msg);
 }
 
@@ -713,7 +713,7 @@ fire_new_local_connection (SalutTubeStream *self,
 
   connection_id = generate_connection_id (self, transport);
 
-  salut_svc_channel_type_stream_tube_emit_new_local_connection (self,
+  tp_svc_channel_type_stream_tube_emit_new_local_connection (self,
       connection_id);
 }
 
@@ -777,7 +777,7 @@ fire_new_remote_connection (SalutTubeStream *self,
         transport));
   g_assert (connection_id != 0);
 
-  salut_svc_channel_type_stream_tube_emit_new_remote_connection (self,
+  tp_svc_channel_type_stream_tube_emit_new_remote_connection (self,
       contact, &access_control_param, connection_id);
   g_value_unset (&access_control_param);
 }
@@ -1160,7 +1160,7 @@ salut_tube_stream_get_property (GObject *object,
           }
         break;
       case PROP_CHANNEL_TYPE:
-        g_value_set_static_string (value, SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE);
+        g_value_set_static_string (value, TP_IFACE_CHANNEL_TYPE_STREAM_TUBE);
         break;
       case PROP_HANDLE:
         g_value_set_uint (value, priv->handle);
@@ -1229,8 +1229,8 @@ salut_tube_stream_get_property (GObject *object,
               TP_IFACE_CHANNEL, "InitiatorID",
               TP_IFACE_CHANNEL, "Requested",
               TP_IFACE_CHANNEL, "Interfaces",
-              SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE, "Service",
-              SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE, "SupportedSocketTypes",
+              TP_IFACE_CHANNEL_TYPE_STREAM_TUBE, "Service",
+              TP_IFACE_CHANNEL_TYPE_STREAM_TUBE, "SupportedSocketTypes",
               NULL);
 
           if (priv->initiator != priv->self_handle)
@@ -1241,12 +1241,12 @@ salut_tube_stream_get_property (GObject *object,
               /* FIXME: use tp_dbus_properties_mixin_add_properties once it's
                * added in tp-glib */
               tp_dbus_properties_mixin_get (object,
-                  SALUT_IFACE_CHANNEL_INTERFACE_TUBE, "Parameters",
+                  TP_IFACE_CHANNEL_INTERFACE_TUBE, "Parameters",
                   prop_value, NULL);
               g_assert (G_IS_VALUE (prop_value));
 
               g_hash_table_insert (properties,
-                  g_strdup_printf ("%s.%s", SALUT_IFACE_CHANNEL_INTERFACE_TUBE,
+                  g_strdup_printf ("%s.%s", TP_IFACE_CHANNEL_INTERFACE_TUBE,
                     "Parameters"), prop_value);
             }
 
@@ -1486,13 +1486,13 @@ salut_tube_stream_constructor (GType type,
   if (priv->initiator == priv->self_handle)
     {
       /* We initiated this tube */
-      priv->state = SALUT_TUBE_CHANNEL_STATE_NOT_OFFERED;
+      priv->state = TP_TUBE_CHANNEL_STATE_NOT_OFFERED;
       /* FIXME: we should probably remove this offer_needed */
       priv->offer_needed = TRUE;
     }
   else
     {
-      priv->state = SALUT_TUBE_CHANNEL_STATE_LOCAL_PENDING;
+      priv->state = TP_TUBE_CHANNEL_STATE_LOCAL_PENDING;
     }
 
   if (priv->handle_type == TP_HANDLE_TYPE_CONTACT)
@@ -1545,12 +1545,12 @@ salut_tube_stream_class_init (SalutTubeStreamClass *salut_tube_stream_class)
         NULL,
         channel_props,
       },
-      { SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE,
+      { TP_IFACE_CHANNEL_TYPE_STREAM_TUBE,
         tp_dbus_properties_mixin_getter_gobject_properties,
         NULL,
         stream_tube_props,
       },
-      { SALUT_IFACE_CHANNEL_INTERFACE_TUBE,
+      { TP_IFACE_CHANNEL_INTERFACE_TUBE,
         tp_dbus_properties_mixin_getter_gobject_properties,
         NULL,
         tube_iface_props,
@@ -1898,7 +1898,7 @@ salut_tube_stream_accept (SalutTubeIface *tube,
   SalutTubeStreamPrivate *priv = SALUT_TUBE_STREAM_GET_PRIVATE (self);
   GibberXmppStanza *reply;
 
-  if (priv->state != SALUT_TUBE_CHANNEL_STATE_LOCAL_PENDING)
+  if (priv->state != TP_TUBE_CHANNEL_STATE_LOCAL_PENDING)
     return TRUE;
 
   if (!tube_stream_open (self, error))
@@ -1922,11 +1922,11 @@ salut_tube_stream_accept (SalutTubeIface *tube,
         }
     }
 
-  priv->state = SALUT_TUBE_CHANNEL_STATE_OPEN;
+  priv->state = TP_TUBE_CHANNEL_STATE_OPEN;
   g_signal_emit (G_OBJECT (self), signals[OPENED], 0);
 
-  salut_svc_channel_interface_tube_emit_tube_channel_state_changed (
-      self, SALUT_TUBE_CHANNEL_STATE_OPEN);
+  tp_svc_channel_interface_tube_emit_tube_channel_state_changed (
+      self, TP_TUBE_CHANNEL_STATE_OPEN);
 
   return TRUE;
 }
@@ -1948,8 +1948,8 @@ salut_tube_stream_accepted (SalutTubeIface *tube)
   priv->state = TP_TUBE_STATE_OPEN;
   g_signal_emit (G_OBJECT (self), signals[OPENED], 0);
 
-  salut_svc_channel_interface_tube_emit_tube_channel_state_changed (
-      self, SALUT_TUBE_CHANNEL_STATE_OPEN);
+  tp_svc_channel_interface_tube_emit_tube_channel_state_changed (
+      self, TP_TUBE_CHANNEL_STATE_OPEN);
 }
 
 /**
@@ -2160,10 +2160,10 @@ salut_tube_stream_add_bytestream (SalutTubeIface *tube,
       TpHandleRepoIface *contact_repo = tp_base_connection_get_handles (
           (TpBaseConnection *) priv->conn, TP_HANDLE_TYPE_CONTACT);
 
-      if (priv->state == SALUT_TUBE_CHANNEL_STATE_REMOTE_PENDING)
+      if (priv->state == TP_TUBE_CHANNEL_STATE_REMOTE_PENDING)
         {
           DEBUG ("Received first connection. Tube is now open");
-          priv->state = SALUT_TUBE_CHANNEL_STATE_OPEN;
+          priv->state = TP_TUBE_CHANNEL_STATE_OPEN;
           g_signal_emit (G_OBJECT (self), signals[OPENED], 0);
         }
 
@@ -2371,7 +2371,7 @@ salut_tube_stream_check_params (TpSocketAddressType address_type,
  * on org.freedesktop.Telepathy.Channel.Type.StreamTube
  */
 static void
-salut_tube_stream_offer_async (SalutSvcChannelTypeStreamTube *iface,
+salut_tube_stream_offer_async (TpSvcChannelTypeStreamTube *iface,
     guint address_type,
     const GValue *address,
     guint access_control,
@@ -2382,7 +2382,7 @@ salut_tube_stream_offer_async (SalutSvcChannelTypeStreamTube *iface,
   SalutTubeStreamPrivate *priv = SALUT_TUBE_STREAM_GET_PRIVATE (self);
   GError *error = NULL;
 
-  if (priv->state != SALUT_TUBE_CHANNEL_STATE_NOT_OFFERED)
+  if (priv->state != TP_TUBE_CHANNEL_STATE_NOT_OFFERED)
     {
       g_set_error (&error, TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
           "Tube is not in the not offered state");
@@ -2418,7 +2418,7 @@ salut_tube_stream_offer_async (SalutSvcChannelTypeStreamTube *iface,
       return;
     }
 
-  salut_svc_channel_type_stream_tube_return_from_offer (context);
+  tp_svc_channel_type_stream_tube_return_from_offer (context);
 }
 
 /**
@@ -2428,7 +2428,7 @@ salut_tube_stream_offer_async (SalutSvcChannelTypeStreamTube *iface,
  * on org.freedesktop.Telepathy.Channel.Type.StreamTube
  */
 static void
-salut_tube_stream_accept_async (SalutSvcChannelTypeStreamTube *iface,
+salut_tube_stream_accept_async (TpSvcChannelTypeStreamTube *iface,
     guint address_type,
     guint access_control,
     const GValue *access_control_param,
@@ -2438,7 +2438,7 @@ salut_tube_stream_accept_async (SalutSvcChannelTypeStreamTube *iface,
   SalutTubeStreamPrivate *priv = SALUT_TUBE_STREAM_GET_PRIVATE (self);
   GError *error = NULL;
 
-  if (priv->state != SALUT_TUBE_CHANNEL_STATE_LOCAL_PENDING)
+  if (priv->state != TP_TUBE_CHANNEL_STATE_LOCAL_PENDING)
     {
       GError e = { TP_ERRORS, TP_ERROR_INVALID_ARGUMENT,
           "Tube is not in the local pending state" };
@@ -2487,7 +2487,7 @@ salut_tube_stream_accept_async (SalutSvcChannelTypeStreamTube *iface,
     salut_muc_channel_send_presence (self->muc, NULL);
 #endif
 
-  salut_svc_channel_type_stream_tube_return_from_accept (context,
+  tp_svc_channel_type_stream_tube_return_from_accept (context,
       priv->address);
 }
 
@@ -2516,7 +2516,7 @@ salut_tube_stream_get_channel_type (TpSvcChannel *iface,
                                     DBusGMethodInvocation *context)
 {
   tp_svc_channel_return_from_get_channel_type (context,
-      SALUT_IFACE_CHANNEL_TYPE_STREAM_TUBE);
+      TP_IFACE_CHANNEL_TYPE_STREAM_TUBE);
 }
 
 /**
@@ -2612,22 +2612,22 @@ salut_tube_stream_offer (SalutTubeStream *self,
 {
   SalutTubeStreamPrivate *priv = SALUT_TUBE_STREAM_GET_PRIVATE (self);
 
-  g_assert (priv->state == SALUT_TUBE_CHANNEL_STATE_NOT_OFFERED);
+  g_assert (priv->state == TP_TUBE_CHANNEL_STATE_NOT_OFFERED);
 
   if (priv->handle_type == TP_HANDLE_TYPE_CONTACT)
     {
-      priv->state = SALUT_TUBE_CHANNEL_STATE_REMOTE_PENDING;
+      priv->state = TP_TUBE_CHANNEL_STATE_REMOTE_PENDING;
       salut_tubes_channel_send_iq_offer (priv->tubes_channel);
 
-      salut_svc_channel_interface_tube_emit_tube_channel_state_changed (
-          self, SALUT_TUBE_CHANNEL_STATE_REMOTE_PENDING);
+      tp_svc_channel_interface_tube_emit_tube_channel_state_changed (
+          self, TP_TUBE_CHANNEL_STATE_REMOTE_PENDING);
     }
   else
     {
       /* muc tube is open as soon it's offered */
-      priv->state = SALUT_TUBE_CHANNEL_STATE_OPEN;
-      salut_svc_channel_interface_tube_emit_tube_channel_state_changed (
-          self, SALUT_TUBE_CHANNEL_STATE_OPEN);
+      priv->state = TP_TUBE_CHANNEL_STATE_OPEN;
+      tp_svc_channel_interface_tube_emit_tube_channel_state_changed (
+          self, TP_TUBE_CHANNEL_STATE_OPEN);
       g_signal_emit (G_OBJECT (self), signals[OPENED], 0);
     }
 
@@ -2659,10 +2659,10 @@ static void
 streamtube_iface_init (gpointer g_iface,
                        gpointer iface_data)
 {
-  SalutSvcChannelTypeStreamTubeClass *klass =
-      (SalutSvcChannelTypeStreamTubeClass *) g_iface;
+  TpSvcChannelTypeStreamTubeClass *klass =
+      (TpSvcChannelTypeStreamTubeClass *) g_iface;
 
-#define IMPLEMENT(x, suffix) salut_svc_channel_type_stream_tube_implement_##x (\
+#define IMPLEMENT(x, suffix) tp_svc_channel_type_stream_tube_implement_##x (\
     klass, salut_tube_stream_##x##suffix)
   IMPLEMENT(offer,_async);
   IMPLEMENT(accept,_async);
-- 
1.5.6.5




More information about the telepathy-commits mailing list