[Bug 55104] New: Provide GVariant-based access to all a{sv} things

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 19 17:17:41 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=55104

             Bug #: 55104
           Summary: Provide GVariant-based access to all a{sv} things
    Classification: Unclassified
           Product: Telepathy
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: medium
         Component: tp-glib
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: simon.mcvittie at collabora.co.uk
         QAContact: telepathy-bugs at lists.freedesktop.org
                CC: jonny.lamb at collabora.co.uk
            Blocks: 30422


+++ This bug was initially created as a clone of Bug #30422 +++

TpCallChannel:state-details and tp_call_channel_get_state() use a
GHashTable<string,variant>. We should have a GVariant version.

I think the API should maybe be this:

/**
 * tp_call_channel_dup_state:
 * @self: a #TpCallChannel
 * @flags: (out) (allow-none): a place to set the value of
 *  #TpCallChannel:flags
 * @details: (out) (allow-none) (transfer full): a place to set the value of
 *  #TpCallChannel:state-details-vardict. Free with g_variant_unref().
 * @reason: (out) (allow-none) (transfer none): a place to set the value of
 *  #TpCallChannel:state-reason. Free with tp_call_state_reason_unref().
 *
 * <!-- -->
 *
 * Returns: the value of #TpCallChannel:state
 */
TpCallState
tp_call_channel_dup_state (TpCallChannel *self,
    TpCallFlags *flags,
    GVariant **details,
    TpCallStateReason **reason)

but that would require exposing tp_call_state_reason_unref(), and preferably
tp_call_state_reason_ref() (both are currently private).

Alternatively, we could tell C programmers to use g_boxed_copy() and
g_boxed_free().

The ideal API might have been for TpCallStateReason to contain the GVariant,
but it's too late for that now until 1.0, because the struct is public and
contains no ABI padding. :'-(

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.
You are the assignee for the bug.



More information about the telepathy-bugs mailing list