[Bug 29385] Add smarter TpAccount API to get the connection error

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri May 4 20:22:34 CEST 2012


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

Simon McVittie <simon.mcvittie at collabora.co.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|medium                      |low

--- Comment #1 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2012-05-04 11:22:34 PDT ---
You can now sort of do this, by combining these:

TpConnectionStatus tp_account_get_connection_status (TpAccount *account,
    TpConnectionStatusReason *reason);
gchar *tp_account_dup_detailed_error_vardict (TpAccount *self,
    GVariant **details);

but that doesn't do the GError mapping. Lower severity, at least, though.

If we add one, we should give these a similar treatment:

TpConnectionStatus tp_connection_get_status (TpConnection *self,
    TpConnectionStatusReason *reason);
gchar *tp_connection_dup_detailed_error_vardict (TpConnection *self,
    GVariant **details) G_GNUC_WARN_UNUSED_RESULT;

It might even be nice to have something more like this:

    /* returns TRUE if still extant, FALSE if invalidated */
    gboolean tp_proxy_check_error (gpointer, GError **);

    /* returns TRUE if connecting or connected, FALSE with error
       if disconnected */
    gboolean tp_account_check_connection_error (TpAccount *, GError **);

so you can do this in g-i languages:

    try:
        account.check_connection_error()
    except Exception as e:
        print(e)

    try:
        connection.check_error()
    except Exception as e:
        print(e)

-- 
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