Provide GVariant-based access to TpCallChannel:state-details
Submitted by Simon McVittie
Assigned to Telepathy bugs list
Description
+++ 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. :'-(