![]() |
![]() |
![]() |
Reference Manual of the tinymail framework | ![]() |
---|---|---|---|---|
TnyPasswordGetter; TnyPasswordGetterIface; const gchar* tny_password_getter_get_password (TnyPasswordGetter *self, const gchar *aid, const gchar *prompt, gboolean *cancel); void tny_password_getter_forget_password (TnyPasswordGetter *self, const gchar *aid);
typedef struct _TnyPasswordGetter TnyPasswordGetter;
Gets a password
free-function: g_object_unref
typedef struct { GTypeInterface parent; const gchar* (*get_password) (TnyPasswordGetter *self, const gchar *aid, const gchar *prompt, gboolean *cancel); void (*forget_password) (TnyPasswordGetter *self, const gchar *aid); } TnyPasswordGetterIface;
const gchar* tny_password_getter_get_password (TnyPasswordGetter *self, const gchar *aid, const gchar *prompt, gboolean *cancel);
Get the password of self
identified by aid
. If you set the by reference
boolean cancel
to TRUE, the caller (who requested the password) will see
this as a negative answer (For example when the user didn't know the password,
and therefore pressed a cancel button).
The aid
string can be used for so called password stores. It will contain
a unique string. Possible values of this string are "acap.server.com" or the
result of a tny_account_get_id()
, or a combination of things.
|
a TnyPasswordGetter |
|
a unique string identifying the requested password |
|
(null-ok): A human-readable password question |
|
(out): by reference whether or not the user cancelled |
Returns : |
(null-ok) (caller-owns): the password |
Since 1.0 audience: application-developer, type-implementer, platform-developer
void tny_password_getter_forget_password (TnyPasswordGetter *self, const gchar *aid);
Forget the password in self
identified by aid
. This usually indicates that
the password was wrong. A subsequent call to tny_password_getter_get_password()
should not result in returning the same password anymore.
|
a TnyPasswordGetter object |
|
a unique string identifying the requested password |
Since 1.0 audience: application-developer, type-implementer, platform-developer