soc.2009.telepathy: 418e04cd: Updated Client.Handler code, narrowed do...
sttwister at soc.pidgin.im
sttwister at soc.pidgin.im
Wed Jul 22 11:00:26 EDT 2009
-----------------------------------------------------------------
Revision: 418e04cd4c14b4f19f8bee2ef2a4a0aa9f393201
Ancestor: 0fc5d0d9285922f1462be04f3200ca7fa420665d
Author: sttwister at soc.pidgin.im
Date: 2009-07-22T14:57:52
Branch: im.pidgin.soc.2009.telepathy
URL: http://d.pidgin.im/viewmtn/revision/info/418e04cd4c14b4f19f8bee2ef2a4a0aa9f393201
Modified files:
libpurple/protocols/telepathy/telepathy_client.c
libpurple/protocols/telepathy/telepathy_client.h
ChangeLog:
Updated Client.Handler code, narrowed down to one error and some warnings
-------------- next part --------------
============================================================
--- libpurple/protocols/telepathy/telepathy_client.c f9bb151e3bf086cf4baf9c7623c532ed301f219b
+++ libpurple/protocols/telepathy/telepathy_client.c c05e95ebe8627706fb2c6cd844665c6211a25194
@@ -34,10 +34,14 @@
#define CLIENT_BUS_NAME TP_CLIENT_BUS_NAME_BASE "prpl_telepathy"
#define CLIENT_OBJECT_PATH TP_CLIENT_OBJECT_PATH_BASE "prpl_telepathy"
+#define TELEPATHY_GET_PRIV(obj,type) ((type##Priv *) ((type *) obj)->priv)
#define GET_PRIV(obj) TELEPATHY_GET_PRIV (obj, TelepathyClient)
+
typedef struct
{
/* TODO: Fill this in or delete it */
+ GList *channels;
+
} TelepathyClientPriv;
static void telepathy_client_client_handler_iface_init (gpointer g_iface,
@@ -99,7 +103,8 @@ client_finalize (GObject *object)
static void
client_finalize (GObject *object)
{
- TelepathyClientPriv *priv = GET_PRIV (object);
+ //TelepathyClientPriv *priv = GET_PRIV (object);
+
}
static void
@@ -233,3 +238,48 @@ telepathy_client_dup_singleton (void)
return TELEPATHY_CLIENT (g_object_new (TELEPATHY_TYPE_CLIENT, NULL));
}
+static void
+telepathy_client_handle_channels (TpSvcClientHandler *self,
+ const gchar *account_path,
+ const gchar *connection_path,
+ const GPtrArray *channels,
+ const GPtrArray *requests_satisfied,
+ guint64 timestamp,
+ GHashTable *handler_info,
+ DBusGMethodInvocation *context)
+{
+ TelepathyClient *client = TELEPATHY_CLIENT (self);
+ TelepathyClientPriv *priv = GET_PRIV (client);
+
+ int i;
+
+ for (i = 0; i < channels->len ; i++)
+ {
+ /* TODO: Try to do something here! */
+
+ /*
+ GValueArray *arr = g_ptr_array_index (channels, i);
+ const gchar *object_path;
+ GHashTable *properties;
+
+ object_path = g_value_get_boxed (g_value_array_get_nth (arr, 0));
+ properties = g_value_get_boxed (g_value_array_get_nth (arr, 1));
+
+ client_connection_new_channel_with_properties (client,
+ connection, object_path, properties);
+ */
+ }
+
+ tp_svc_client_handler_return_from_handle_channels (context);
+}
+
+
+static void
+telepathy_client_client_handler_iface_init (gpointer g_iface,
+ gpointer g_iface_data)
+{
+ TpSvcClientHandlerClass *klass = (TpSvcClientHandlerClass *) g_iface;
+
+ tp_svc_client_handler_implement_handle_channels (klass,
+ telepathy_client_handle_channels);
+}
============================================================
--- libpurple/protocols/telepathy/telepathy_client.h 2cb3469a5086d507d6d403dad2e1be136f6871bc
+++ libpurple/protocols/telepathy/telepathy_client.h 37bc86e7cc391e3a578adda0a9e920ec89fe3bcf
@@ -33,20 +33,20 @@
#define TELEPATHY_IS_CLIENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TELEPATHY_TYPE_CLIENT))
#define TELEPATHY_CLIENT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TELEPATHY_TYPE_CLIENT, TelepathyClientClass))
-typedef struct _TelepathyClient TelepathyClient;
-typedef struct _TelepathyClientClass TelepathyClientClass;
+//typedef struct _TelepathyClient TelepathyClient;
+//typedef struct _TelepathyClientClass TelepathyClientClass;
typedef struct
{
GObject parent;
gpointer priv;
-} _TelepathyClient;
+} TelepathyClient;
typedef struct
{
GObjectClass parent_class;
TpDBusPropertiesMixinClass dbus_props_class;
-} _TelepathyClientClass;
+} TelepathyClientClass;
GType telepathy_client_get_type (void) G_GNUC_CONST;
More information about the Commits
mailing list