summaryrefslogtreecommitdiff
path: root/telepathy-glib/observe-channels-context.c
diff options
context:
space:
mode:
authorGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2010-12-21 13:48:08 +0100
committerGuillaume Desmottes <guillaume.desmottes@collabora.co.uk>2011-02-22 16:29:49 +0100
commit8ca567b5fe1f1ae576d2abd6b557ecbc4c90912a (patch)
tree9ebc84554eb8be1db83ad92fe8ab5d61ba68fe20 /telepathy-glib/observe-channels-context.c
parent4e44959998dbab6daa9bbaf4b9f3ab765a3aaa70 (diff)
downloadtelepathy-glib-8ca567b5fe1f1ae576d2abd6b557ecbc4c90912a.tar.gz
factor out _tp_create_channel_request_list
Diffstat (limited to 'telepathy-glib/observe-channels-context.c')
-rw-r--r--telepathy-glib/observe-channels-context.c27
1 files changed, 3 insertions, 24 deletions
diff --git a/telepathy-glib/observe-channels-context.c b/telepathy-glib/observe-channels-context.c
index 4d0cf81d3..69cec0472 100644
--- a/telepathy-glib/observe-channels-context.c
+++ b/telepathy-glib/observe-channels-context.c
@@ -51,6 +51,7 @@
#include <telepathy-glib/channel-request.h>
#include <telepathy-glib/dbus.h>
#include <telepathy-glib/gtypes.h>
+#include <telepathy-glib/util-internal.h>
#define DEBUG_FLAG TP_DEBUG_CLIENT
#include "telepathy-glib/debug-internal.h"
@@ -686,34 +687,12 @@ GList *
tp_observe_channels_context_get_requests (TpObserveChannelsContext *self)
{
GHashTable *request_props;
- GHashTableIter iter;
- GList *result = NULL;
- gpointer key, value;
request_props = tp_asv_get_boxed (self->observer_info, "request-properties",
TP_HASH_TYPE_OBJECT_IMMUTABLE_PROPERTIES_MAP);
if (request_props == NULL)
return NULL;
- g_hash_table_iter_init (&iter, request_props);
- while (g_hash_table_iter_next (&iter, &key, &value))
- {
- TpChannelRequest *req;
- const gchar *path = key;
- GHashTable *props = value;
- GError *error = NULL;
-
- req = tp_channel_request_new (
- tp_proxy_get_dbus_daemon (self->account), path, props, &error);
- if (req == NULL)
- {
- DEBUG ("Failed to create TpChannelRequest: %s", error->message);
- g_error_free (error);
- continue;
- }
-
- result = g_list_prepend (result, req);
- }
-
- return result;
+ return _tp_create_channel_request_list (
+ tp_proxy_get_dbus_daemon (self->account),request_props);
}