empathy r2490 - in trunk: libempathy src
- From: xclaesse svn gnome org
- To: svn-commits-list gnome org
- Subject: empathy r2490 - in trunk: libempathy src
- Date: Mon, 16 Feb 2009 21:25:25 +0000 (UTC)
Author: xclaesse
Date: Mon Feb 16 21:25:25 2009
New Revision: 2490
URL: http://svn.gnome.org/viewvc/empathy?rev=2490&view=rev
Log:
use TpTubeType instead of EmpathyTubeType
From: Guillaume Desmottes <gdesmott gnome org>
Modified:
trunk/libempathy/empathy-tube-handler.c
trunk/libempathy/empathy-tube-handler.h
trunk/src/empathy-tube-dispatch.c
Modified: trunk/libempathy/empathy-tube-handler.c
==============================================================================
--- trunk/libempathy/empathy-tube-handler.c (original)
+++ trunk/libempathy/empathy-tube-handler.c Mon Feb 16 21:25:25 2009
@@ -144,7 +144,7 @@
}
EmpathyTubeHandler *
-empathy_tube_handler_new (EmpathyTubeType type, const gchar *service)
+empathy_tube_handler_new (TpTubeType type, const gchar *service)
{
EmpathyTubeHandler *thandler = NULL;
DBusGProxy *proxy;
@@ -153,7 +153,7 @@
gchar *object_path;
GError *error = NULL;
- g_return_val_if_fail (type <= EMPATHY_TYPE_DBUS_TUBE, NULL);
+ g_return_val_if_fail (type < NUM_TP_TUBE_TYPES, NULL);
g_return_val_if_fail (service != NULL, NULL);
bus_name = empathy_tube_handler_build_bus_name (type, service);
@@ -186,18 +186,18 @@
}
gchar *
-empathy_tube_handler_build_bus_name (EmpathyTubeType type,
+empathy_tube_handler_build_bus_name (TpTubeType type,
const gchar *service)
{
gchar *str = NULL;
const gchar *prefix = NULL;
- g_return_val_if_fail (type <= EMPATHY_TYPE_DBUS_TUBE, NULL);
+ g_return_val_if_fail (type < NUM_TP_TUBE_TYPES, NULL);
g_return_val_if_fail (service != NULL, NULL);
- if (type == EMPATHY_TYPE_DBUS_TUBE)
+ if (type == TP_TUBE_TYPE_DBUS)
prefix = "org.gnome.Empathy.DTubeHandler.";
- else if (type == EMPATHY_TYPE_STREAM_TUBE)
+ else if (type == TP_TUBE_TYPE_STREAM)
prefix = "org.gnome.Empathy.StreamTubeHandler.";
else
g_return_val_if_reached (NULL);
@@ -208,13 +208,13 @@
}
gchar *
-empathy_tube_handler_build_object_path (EmpathyTubeType type,
+empathy_tube_handler_build_object_path (TpTubeType type,
const gchar *service)
{
gchar *bus_name;
gchar *str;
- g_return_val_if_fail (type <= EMPATHY_TYPE_DBUS_TUBE, NULL);
+ g_return_val_if_fail (type < NUM_TP_TUBE_TYPES, NULL);
g_return_val_if_fail (service != NULL, NULL);
bus_name = empathy_tube_handler_build_bus_name (type, service);
Modified: trunk/libempathy/empathy-tube-handler.h
==============================================================================
--- trunk/libempathy/empathy-tube-handler.h (original)
+++ trunk/libempathy/empathy-tube-handler.h Mon Feb 16 21:25:25 2009
@@ -24,6 +24,8 @@
#include <glib.h>
+#include <telepathy-glib/enums.h>
+
G_BEGIN_DECLS
#define EMPATHY_TYPE_TUBE_HANDLER (empathy_tube_handler_get_type ())
@@ -49,17 +51,12 @@
GObjectClass parent_class;
};
-typedef enum {
- EMPATHY_TYPE_STREAM_TUBE = 0,
- EMPATHY_TYPE_DBUS_TUBE
-} EmpathyTubeType;
-
GType empathy_tube_handler_get_type (void) G_GNUC_CONST;
-EmpathyTubeHandler *empathy_tube_handler_new (EmpathyTubeType type,
+EmpathyTubeHandler *empathy_tube_handler_new (TpTubeType type,
const gchar *service);
-gchar *empathy_tube_handler_build_bus_name (EmpathyTubeType type,
+gchar *empathy_tube_handler_build_bus_name (TpTubeType type,
const gchar *service);
-gchar *empathy_tube_handler_build_object_path (EmpathyTubeType type,
+gchar *empathy_tube_handler_build_object_path (TpTubeType type,
const gchar *service);
G_END_DECLS
Modified: trunk/src/empathy-tube-dispatch.c
==============================================================================
--- trunk/src/empathy-tube-dispatch.c (original)
+++ trunk/src/empathy-tube-dispatch.c Mon Feb 16 21:25:25 2009
@@ -147,7 +147,7 @@
GHashTable *properties;
const gchar *service;
const gchar *channel_type;
- EmpathyTubeType type;
+ TpTubeType type;
priv->dbus = tp_dbus_daemon_new (tp_get_bus());
@@ -161,13 +161,13 @@
if (!tp_strdiff (channel_type, EMP_IFACE_CHANNEL_TYPE_STREAM_TUBE))
{
- type = EMPATHY_TYPE_STREAM_TUBE;
+ type = TP_TUBE_TYPE_STREAM;
service = tp_asv_get_string (properties,
EMP_IFACE_CHANNEL_TYPE_STREAM_TUBE ".Service");
}
else if (!tp_strdiff (channel_type, EMP_IFACE_CHANNEL_TYPE_DBUS_TUBE))
{
- type = EMPATHY_TYPE_DBUS_TUBE;
+ type = TP_TUBE_TYPE_DBUS;
service = tp_asv_get_string (properties,
EMP_IFACE_CHANNEL_TYPE_DBUS_TUBE ".ServiceName");
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]