[Bug 71384] improve account storage GInterface

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Mon Nov 11 04:05:53 PST 2013


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

--- Comment #16 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
> + PARAM ("param-modem", path);

Use the modem's object path as the StorageIdentifier, maybe?

+ g_hash_table_insert (modem->attributes,
+ "org.freedesktop.Telepathy.Account.Interface.Addressing.URISchemes",
+ g_variant_ref_sink (g_variant_new_strv (&uri_scheme, 1)));

My understanding had been that URISchemes is for "secondary" URI schemes, and
that a telephony UI should use this pseudocode:

    if account.protocol_name == "tel" or account.use_for("tel"):
        add_button("Call using %s" % account, account)

Otherwise, a telephony account without "tel" in URISchemes would be completely
useless...

+ variant = g_hash_table_lookup (modem->properties, "Powered");
+ if (variant != NULL)
+ return g_variant_get_boolean (variant);

Don't be remotely crashable:

if (variant != NULL && g_variant_classify (variant) == G_VARIANT_CLASS_BOOLEAN)

or equivalent.

Or you could use tp_vardict_get_boolean().

+ if (g_str_equal (property, "Powered"))
+ {
+ mcp_account_storage_emit_toggled ((McpAccountStorage *) self,
+ modem->account_name, g_variant_get_boolean (value));
+ }

Likewise.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.


More information about the telepathy-bugs mailing list