[Bug 37360] TpChannel: high level API for Password

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed May 25 11:03:31 CEST 2011


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

--- Comment #1 from Guillaume Desmottes <guillaume.desmottes at collabora.co.uk> 2011-05-25 02:03:30 PDT ---
How do you feel about this API?

/* Channel.Interface.Password */
#define TP_CHANNEL_FEATURE_PASSWORD \
  tp_channel_get_feature_quark_password ()
GQuark tp_channel_get_feature_quark_password (void) G_GNUC_CONST;

void tp_channel_password_provide_password_async (TpChannel *self,
    const gchar *password,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean tp_channel_password_provide_password_finish (TpChannel *self,
    GAsyncResult *result,
    GError **error);

gboolean tp_channel_password_needed (TpChannel *self);

/**
 * TpChannel:password-needed:
 *
 * If %TRUE, tp_channel_password_provide_password_async() has to be called
 * to be able to join the channel.
 *
 * This is not guaranteed to be meaningful until tp_proxy_prepare_async() has
 * finished preparing %TP_CHANNEL_FEATURE_PASSWORD; until then, it may return
 * %FALSE even if the channel is actually protected by a password.
 */


Maybe the provide async call should fail with TP_ERROR_AUTHENTICATION_FAILED if
the password is not correct?

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