[next] telepathy-glib: handle-channel-context: replace get_handler_info by a GVariant version
Guillaume Desmottes
gdesmott at kemper.freedesktop.org
Mon Mar 3 02:03:24 PST 2014
Module: telepathy-glib
Branch: next
Commit: 2c8be276ca305d57f0c862b84d4f6e38e9ec1307
URL: http://cgit.freedesktop.org/telepathy/telepathy-glib/commit/?id=2c8be276ca305d57f0c862b84d4f6e38e9ec1307
Author: Guillaume Desmottes <guillaume.desmottes at collabora.co.uk>
Date: Fri Feb 28 13:15:31 2014 +0100
handle-channel-context: replace get_handler_info by a GVariant version
---
.../telepathy-glib/telepathy-glib-sections.txt | 2 +-
telepathy-glib/account-channel-request.c | 4 ++--
telepathy-glib/handle-channel-context.c | 18 +++++++-----------
telepathy-glib/handle-channel-context.h | 2 +-
4 files changed, 11 insertions(+), 15 deletions(-)
diff --git a/docs/reference/telepathy-glib/telepathy-glib-sections.txt b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
index 1808f6f..a1511cd 100644
--- a/docs/reference/telepathy-glib/telepathy-glib-sections.txt
+++ b/docs/reference/telepathy-glib/telepathy-glib-sections.txt
@@ -4666,7 +4666,7 @@ TpHandleChannelContext
tp_handle_channel_context_accept
tp_handle_channel_context_delay
tp_handle_channel_context_fail
-tp_handle_channel_context_get_handler_info
+tp_handle_channel_context_dup_handler_info
tp_handle_channel_context_get_requests
<SUBSECTION Standard>
tp_handle_channel_context_get_type
diff --git a/telepathy-glib/account-channel-request.c b/telepathy-glib/account-channel-request.c
index f0fff11..8b92815 100644
--- a/telepathy-glib/account-channel-request.c
+++ b/telepathy-glib/account-channel-request.c
@@ -456,7 +456,7 @@ tp_account_channel_request_class_init (
* @user_action_time, and if appropriate, moving to the foreground.
*
* @context can be used to obtain extensible information about the channel
- * via tp_handle_channel_context_get_handler_info(), and any similar methods
+ * via tp_handle_channel_context_dup_handler_info(), and any similar methods
* that are added in future. It is not valid for the receiver of this signal
* to call tp_handle_channel_context_accept(),
* tp_handle_channel_context_delay() or tp_handle_channel_context_fail().
@@ -1144,7 +1144,7 @@ tp_account_channel_request_ensure_and_handle_channel_async (
* will fail with the error %TP_ERROR_NOT_YOURS.
*
* @context can be used to obtain extensible information about the channel
- * via tp_handle_channel_context_get_handler_info(), and any similar methods
+ * via tp_handle_channel_context_dup_handler_info(), and any similar methods
* that are added in future. It is not valid for the caller of this method
* to call tp_handle_channel_context_accept(),
* tp_handle_channel_context_delay() or tp_handle_channel_context_fail().
diff --git a/telepathy-glib/handle-channel-context.c b/telepathy-glib/handle-channel-context.c
index 1b38424..522f012 100644
--- a/telepathy-glib/handle-channel-context.c
+++ b/telepathy-glib/handle-channel-context.c
@@ -57,6 +57,7 @@
#include <telepathy-glib/gtypes.h>
#include <telepathy-glib/interfaces.h>
#include <telepathy-glib/util-internal.h>
+#include <telepathy-glib/variant-util.h>
#define DEBUG_FLAG TP_DEBUG_CLIENT
#include "telepathy-glib/debug-internal.h"
@@ -673,7 +674,7 @@ _tp_handle_channel_context_prepare_finish (
}
/**
- * tp_handle_channel_context_get_handler_info:
+ * tp_handle_channel_context_dup_handler_info:
* @self: a channel-handling context
*
* Return any extra information that accompanied this request to handle
@@ -681,19 +682,14 @@ _tp_handle_channel_context_prepare_finish (
* Well-known keys for this map will be defined by the Telepathy D-Bus
* Interface Specification; at the time of writing, none have been defined.
*
- * The returned hash table is only valid for as long as @self is.
- *
- * Returns: (transfer none) (element-type utf8 GObject.Value): extensible
- * extra handler information, in a form suitable for use with
- * tp_asv_get_string() etc.
- *
- * Since: 0.11.14
+ * Returns: (transfer full): a #G_VARIANT_TYPE_VARDICT #Gvariant containing the
+ * extra handler information.
*/
-const GHashTable *
-tp_handle_channel_context_get_handler_info (TpHandleChannelContext *self)
+GVariant *
+tp_handle_channel_context_dup_handler_info (TpHandleChannelContext *self)
{
g_return_val_if_fail (TP_IS_HANDLE_CHANNELS_CONTEXT (self), NULL);
- return self->handler_info;
+ return g_variant_ref_sink (tp_asv_to_vardict (self->handler_info));
}
/**
diff --git a/telepathy-glib/handle-channel-context.h b/telepathy-glib/handle-channel-context.h
index 476c0fc..320d152 100644
--- a/telepathy-glib/handle-channel-context.h
+++ b/telepathy-glib/handle-channel-context.h
@@ -64,7 +64,7 @@ void tp_handle_channel_context_fail (
void tp_handle_channel_context_delay (
TpHandleChannelContext *self);
-const GHashTable *tp_handle_channel_context_get_handler_info (
+GVariant * tp_handle_channel_context_dup_handler_info (
TpHandleChannelContext *self);
GList * tp_handle_channel_context_get_requests (
More information about the telepathy-commits
mailing list