GMime 2.4 Reference Manual | ||||
---|---|---|---|---|
GMimeSessionSimple; void g_mime_session_simple_set_request_passwd (GMimeSessionSimple *session, GMimeSimpleRequestPasswdFunc request_passwd); void g_mime_session_simple_set_forget_passwd (GMimeSessionSimple *session, GMimeSimpleForgetPasswdFunc forget_passwd); void g_mime_session_simple_set_is_online (GMimeSessionSimple *session, GMimeSimpleIsOnlineFunc is_online);
A GMimeSessionSimple can be used for simple applications that don't care to implement their own GMimeSession.
typedef struct _GMimeSessionSimple GMimeSessionSimple;
A simple GMimeSession for applications that don't want to implement their own GMimeSession context.
void g_mime_session_simple_set_request_passwd (GMimeSessionSimple *session, GMimeSimpleRequestPasswdFunc request_passwd);
Sets the request_passwd
callback function on the simple session
object. request_passwd
should return a malloc'd string containing
the password that the user entered or NULL
on fail as well as
setting the 'err' argument. The 'item' argument can be used as a
unique key identifier if request_passwd
decides to cache the
passwd. The 'prompt' argument should be used as the string to
display to the user requesting the passwd. Finally, 'secret' should
be used to determine whether or not to hide the user's input.
|
Simple Session object |
|
callback to prompt the user for a passwd |
void g_mime_session_simple_set_forget_passwd (GMimeSessionSimple *session, GMimeSimpleForgetPasswdFunc forget_passwd);
Sets the forget_passwd
callback function on the simple session
object. forget_passwd
should uncache the passwd for 'item'. See
g_mime_session_simple_set_request_passwd()
for further details.
|
Simple Session object |
|
callback to forget the cached passwd keyed for 'item' |
void g_mime_session_simple_set_is_online (GMimeSessionSimple *session, GMimeSimpleIsOnlineFunc is_online);
Sets the is_online
callback function on the simple session
object. is_online
should return TRUE
if the network is reachable
or FALSE
otherwise.
|
Simple Session object |
|
callback to return if the system is connected to the 'net |