diff options
author | Dan Winship <danw@src.gnome.org> | 2001-05-10 05:57:32 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-05-10 05:57:32 +0800 |
commit | 630241d74b1a6dede97380c8ed70c74641399e0f (patch) | |
tree | 2a5642e69cf0bf563cd6c26176ac80633c9c82e0 /camel/camel-session.c | |
parent | c76080568db894f538f5b4d89293295b29fcc214 (diff) | |
download | gsoc2013-evolution-630241d74b1a6dede97380c8ed70c74641399e0f.tar gsoc2013-evolution-630241d74b1a6dede97380c8ed70c74641399e0f.tar.gz gsoc2013-evolution-630241d74b1a6dede97380c8ed70c74641399e0f.tar.bz2 gsoc2013-evolution-630241d74b1a6dede97380c8ed70c74641399e0f.tar.lz gsoc2013-evolution-630241d74b1a6dede97380c8ed70c74641399e0f.tar.xz gsoc2013-evolution-630241d74b1a6dede97380c8ed70c74641399e0f.tar.zst gsoc2013-evolution-630241d74b1a6dede97380c8ed70c74641399e0f.zip |
Set the disconnected status. (camel_disco_store_can_work_offline): Return
* camel-disco-store.c (camel_disco_set_status): Set the
disconnected status.
(camel_disco_store_can_work_offline): Return whether or not a
given CamelDiscoStore can work offline or not.
* camel-disco-folder.c (camel_disco_folder_cache_message):
Explicitly tell a folder to cache a message. (Better than using
get_message, because for IMAP that doesn't guarantee you'll get
all the message parts.)
(camel_disco_folder_prepare_for_offline): Prepare a folder for
offline use by caching all messages meeting given search criteria
(and doing anything else the particular folder implementation
needs).
* camel-session.c (camel_session_set_online,
camel_session_is_online): A session-wide online/offline toggle.
(camel_session_init): Set online to TRUE.
* providers/imap/camel-imap-store.c (can_work_offline):
Implementation of CamelDiscoStore::can_work_offline. (Checks that
the store has been used online at least once.)
(imap_get_folder_online, imap_get_folder_offline): Deal with
request for "inbox" properly. ("Don't you mean... 'INBOX'?").
* providers/imap/camel-imap-folder.c (imap_cache_message):
Implementation of CamelDiscoFolder::cache_message.
* camel.h: Add camel-disco-store.h and camel-disco-folder.h
svn path=/trunk/; revision=9738
Diffstat (limited to 'camel/camel-session.c')
-rw-r--r-- | camel/camel-session.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/camel/camel-session.c b/camel/camel-session.c index a6e308693f..5dbd19d963 100644 --- a/camel/camel-session.c +++ b/camel/camel-session.c @@ -81,6 +81,7 @@ static CamelProvider vee_provider = { static void camel_session_init (CamelSession *session) { + session->online = TRUE; session->modules = camel_provider_init (); session->providers = g_hash_table_new (g_strcase_hash, g_strcase_equal); session->priv = g_malloc0(sizeof(*session->priv)); @@ -640,3 +641,29 @@ camel_session_remove_timeout (CamelSession *session, guint handle) return CS_CLASS (session)->remove_timeout (session, handle); } + + +/** + * camel_session_is_online: + * @session: the session. + * + * Return value: whether or not @session is online. + **/ +gboolean +camel_session_is_online (CamelSession *session) +{ + return session->online; +} + +/** + * camel_session_set_online: + * @session: the session + * @online: whether or not the session should be online + * + * Sets the online status of @session to @online. + **/ +void +camel_session_set_online (CamelSession *session, gboolean online) +{ + session->online = online; +} |