[Bug 34091] Allow TpSimplePasswordManager to be used with custom channels

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Feb 23 13:20:59 CET 2011


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

--- Comment #3 from Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> 2011-02-23 04:20:58 PST ---
Tp*Channel is currently used for client-side TpChannel sub-classes. We already
have TpTextChannel and TpStreamTubeChannel and will add TpFileTransferChannel
at some point.

On the other hand, server-side classes are generally named TpBase*:
TpBaseChannel, TpBaseClient, TpBaseConnection, etc.
So I think this class should be named TpBaseSimplePasswordChannel


+ * @channel: an output location to retrieve the custom password channel that
+ * was passed to tp_simple_password_manager_prompt_for_channel_async()
Should be annotate with (transfer none)
Or maybe it should ref it and be (transfer full), I *think* we usually return
a ref in such case.

 * Returns: a #GString with the password (or byte-blob) retrieved
+ *  by @manager

+ * Returns: a #GString with the password (or byte-blob) retrieved
+ *  by @manager
Shouldn't we return a copy of this string? We should have a transfer
annotation anyway.

Also, the lifetime of the GString stored in the GSimpleAsyncResult isn't very
clear to me. We get it from a signal, so it would be cleaner/safer to copy the
GString stored in the result and pass a GDestroyNotify to
g_simple_async_result_set_op_res_gpointer().
I'm all new to this code so please let me know if I missed something.

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