GMimeSessionSimple

GMimeSessionSimple — A Simple Session

Synopsis

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

Object Hierarchy

  GObject
   +----GMimeSession
         +----GMimeSessionSimple

Description

A GMimeSessionSimple can be used for simple applications that don't care to implement their own GMimeSession.

Details

GMimeSessionSimple

typedef struct _GMimeSessionSimple GMimeSessionSimple;

A simple GMimeSession for applications that don't want to implement their own GMimeSession context.


g_mime_session_simple_set_request_passwd ()

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.

session :

Simple Session object

request_passwd :

callback to prompt the user for a passwd

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

session :

Simple Session object

forget_passwd :

callback to forget the cached passwd keyed for 'item'

g_mime_session_simple_set_is_online ()

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.

session :

Simple Session object

is_online :

callback to return if the system is connected to the 'net

See Also

GMimeSession