[Bug 31900] add a TpSimplePasswordManager or similar

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Nov 25 16:37:41 CET 2010


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

--- Comment #5 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-11-25 07:37:41 PST ---
The channel's header should be -internal.h, assuming you don't want it to be
API. You also need to edit docs/reference/Makefile.am to add it to the list of
headers to not scan (I'm fairly sure wildcards don't work in that context,
sadly).

The get_type function should be underscore-prefixed to not be ABI, which has
the side-effect that the init and class_init get prefixed too.

+GType tp_simple_password_channel_get_type (void);

Instead of the current "finished" signal, you could emit a signal with no
arguments, and have the recipient call a method to get the info out - that
might be nicer? I'd use something like this:

    GString *_tp_simple_password_channel_get_password (GError **error);

Or, if you're keeping the signal arguments:

> +      _tp_marshal_VOID__POINTER_POINTER,
> +      G_TYPE_NONE, 2,
> +      G_TYPE_STRING, G_TYPE_POINTER);

That should be VOID__STRING_POINTER. Sadly, development (odd-numbered) versions
of GLib really are that pedantic, and will warn.

What I think you *actually* want here is the BOXED marshaller and
G_TYPE_GSTRING.

If you're going to throw a GError via a signal, I'd be inclined to use three
arguments (guint, gint, string) like TpProxy::invalidated does.

> Do we also want to pass the SASLErrorDetails a{sv} to the prompt_async
> callback?

I don't think we do; what would go there, except the debug message? The Handler
for SASL channels has no way to provide anything beyond a reason code and a
debug message.

(Escape hatch: we can always add a get_more_info() method you can call from the
callback, if needed.)

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