Summary: | Add smarter TpAccount API to get the connection error | ||
---|---|---|---|
Product: | Telepathy | Reporter: | Guillaume Desmottes <guillaume.desmottes> |
Component: | tp-glib | Assignee: | Telepathy bugs list <telepathy-bugs> |
Status: | RESOLVED MOVED | QA Contact: | Telepathy bugs list <telepathy-bugs> |
Severity: | enhancement | ||
Priority: | low | ||
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Guillaume Desmottes
2010-08-03 08:59:56 UTC
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) -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/telepathy/telepathy-glib/issues/38. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.