diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2002-08-21 05:44:29 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2002-08-21 05:44:29 +0800 |
commit | 164f4653dd98cd41fc7e3dd64b09145dec04bed8 (patch) | |
tree | 04d58b72775bf962314eb9a98870408407f6f48e /camel/camel-store.c | |
parent | 07c805c9f58f4b025960ea5718f4e1448bf9c4cc (diff) | |
download | gsoc2013-evolution-164f4653dd98cd41fc7e3dd64b09145dec04bed8.tar.gz gsoc2013-evolution-164f4653dd98cd41fc7e3dd64b09145dec04bed8.tar.zst gsoc2013-evolution-164f4653dd98cd41fc7e3dd64b09145dec04bed8.zip |
Override the default noop implementation.
2002-08-20 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-store.c (imap_noop): Override the
default noop implementation.
* camel-store.c (camel_store_noop): New virtual method to ping a
store.
* camel-session.c (get_service): Register a timeout that calls
camel_store_noop() every 10 minutes.
svn path=/trunk/; revision=17822
Diffstat (limited to 'camel/camel-store.c')
-rw-r--r-- | camel/camel-store.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/camel/camel-store.c b/camel/camel-store.c index 23a7e9109d..1987ea4ddd 100644 --- a/camel/camel-store.c +++ b/camel/camel-store.c @@ -71,6 +71,8 @@ static gboolean folder_subscribed (CamelStore *store, const char *folder_name); static void subscribe_folder (CamelStore *store, const char *folder_name, CamelException *ex); static void unsubscribe_folder (CamelStore *store, const char *folder_name, CamelException *ex); +static void noop (CamelStore *store, CamelException *ex); + static void construct (CamelService *service, CamelSession *session, CamelProvider *provider, CamelURL *url, CamelException *ex); @@ -102,6 +104,7 @@ camel_store_class_init (CamelStoreClass *camel_store_class) camel_store_class->folder_subscribed = folder_subscribed; camel_store_class->subscribe_folder = subscribe_folder; camel_store_class->unsubscribe_folder = unsubscribe_folder; + camel_store_class->noop = noop; /* virtual method overload */ camel_service_class->construct = construct; @@ -1115,6 +1118,28 @@ camel_store_unsubscribe_folder (CamelStore *store, } +static void +noop (CamelStore *store, CamelException *ex) +{ + /* no-op */ + ; +} + + +/** + * camel_store_noop: + * @store: CamelStore + * @ex: exception + * + * Pings @store so that its connection doesn't timeout. + **/ +void +camel_store_noop (CamelStore *store, CamelException *ex) +{ + CS_CLASS (store)->noop (store, ex); +} + + int camel_mkdir_hier (const char *path, mode_t mode) { |