aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-08-22 02:17:21 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-08-22 02:17:21 +0800
commit577c14751f5305ab925af567082b0f71f3616d18 (patch)
treeb1a9d81d84c817343d30750b087ac4998395edb9 /camel
parentf871ef2a856abbfd9002ac28ba39a6e26dc393b8 (diff)
downloadgsoc2013-evolution-577c14751f5305ab925af567082b0f71f3616d18.tar
gsoc2013-evolution-577c14751f5305ab925af567082b0f71f3616d18.tar.gz
gsoc2013-evolution-577c14751f5305ab925af567082b0f71f3616d18.tar.bz2
gsoc2013-evolution-577c14751f5305ab925af567082b0f71f3616d18.tar.lz
gsoc2013-evolution-577c14751f5305ab925af567082b0f71f3616d18.tar.xz
gsoc2013-evolution-577c14751f5305ab925af567082b0f71f3616d18.tar.zst
gsoc2013-evolution-577c14751f5305ab925af567082b0f71f3616d18.zip
Don't register the noop timeout here anymore, we're gonna handle all this
2002-08-21 Jeffrey Stedfast <fejj@ximian.com> * camel-session.c (get_service): Don't register the noop timeout here anymore, we're gonna handle all this in the mailer now. (camel_session_register_timeout): Removed. (camel_session_remove_timeout): Removed. svn path=/trunk/; revision=17830
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog7
-rw-r--r--camel/camel-session.c80
-rw-r--r--camel/camel-session.h16
-rw-r--r--camel/tests/lib/session.c17
4 files changed, 11 insertions, 109 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 340a3f75cf..6599dfbdba 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,10 @@
+2002-08-21 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-session.c (get_service): Don't register the noop timeout
+ here anymore, we're gonna handle all this in the mailer now.
+ (camel_session_register_timeout): Removed.
+ (camel_session_remove_timeout): Removed.
+
2002-08-20 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap/camel-imap-store.c (imap_noop): Override the
diff --git a/camel/camel-session.c b/camel/camel-session.c
index 29a2928794..a3e94a5f38 100644
--- a/camel/camel-session.c
+++ b/camel/camel-session.c
@@ -398,30 +398,6 @@ service_cache_remove (CamelService *service, gpointer event_data, gpointer user_
CAMEL_SESSION_UNLOCK(session, lock);
}
-static gboolean
-noop_cb (gpointer user_data)
-{
- CamelStore *store = (CamelStore *) user_data;
- CamelException ex;
-
- camel_exception_init (&ex);
- camel_store_noop (store, &ex);
- camel_exception_clear (&ex);
-
- return TRUE;
-}
-
-static void
-unregister_noop (CamelObject *object, gpointer event_data, gpointer user_data)
-{
- CamelService *service = (CamelService *) object;
- guint id;
-
- id = GPOINTER_TO_INT (user_data);
-
- camel_session_remove_timeout (service->session, id);
-}
-
static CamelService *
get_service (CamelSession *session, const char *url_string,
CamelProviderType type, CamelException *ex)
@@ -472,21 +448,12 @@ get_service (CamelSession *session, const char *url_string,
camel_object_unref (CAMEL_OBJECT (service));
service = NULL;
} else {
- if (type == CAMEL_PROVIDER_STORE) {
- guint id;
-
- id = camel_session_register_timeout (session, 600000, noop_cb, service);
- camel_object_hook_event (CAMEL_OBJECT (service), "finalize",
- (CamelObjectEventHookFunc) unregister_noop,
- GINT_TO_POINTER (id));
- }
-
g_hash_table_insert (provider->service_cache[type], url, service);
camel_object_hook_event (CAMEL_OBJECT (service), "finalize",
(CamelObjectEventHookFunc) service_cache_remove,
GINT_TO_POINTER (type));
}
-
+
return service;
}
@@ -647,6 +614,7 @@ camel_session_get_password (CamelSession *session, const char *prompt,
return CS_CLASS (session)->get_password (session, prompt, secret, service, item, ex);
}
+
/**
* camel_session_forget_password:
* @session: session object
@@ -673,6 +641,7 @@ camel_session_forget_password (CamelSession *session, CamelService *service,
CS_CLASS (session)->forget_password (session, service, item, ex);
}
+
/**
* camel_session_alert_user:
* @session: session object
@@ -697,48 +666,6 @@ camel_session_alert_user (CamelSession *session, CamelSessionAlertType type,
return CS_CLASS (session)->alert_user (session, type, prompt, cancel);
}
-/**
- * camel_session_register_timeout:
- * @session: the CamelSession
- * @interval: the number of milliseconds interval between calls
- * @callback: the function to call
- * @user_data: extra data to be passed to the callback
- *
- * Registers the given timeout. @callback will be called every
- * @interval milliseconds with one argument, @user_data, until it
- * returns %FALSE.
- *
- * Return value: On success, a non-zero handle that can be used with
- * camel_session_remove_timeout(). On failure, 0.
- **/
-guint
-camel_session_register_timeout (CamelSession *session,
- guint32 interval,
- CamelTimeoutCallback callback,
- gpointer user_data)
-{
- g_return_val_if_fail (CAMEL_IS_SESSION (session), 0);
-
- return CS_CLASS (session)->register_timeout (session, interval, callback, user_data);
-}
-
-/**
- * camel_session_remove_timeout:
- * @session: the CamelSession
- * @handle: a value returned from camel_session_register_timeout()
- *
- * Removes the indicated timeout.
- *
- * Return value: %TRUE on success, %FALSE on failure.
- **/
-gboolean
-camel_session_remove_timeout (CamelSession *session, guint handle)
-{
- g_return_val_if_fail (CAMEL_IS_SESSION (session), FALSE);
-
- return CS_CLASS (session)->remove_timeout (session, handle);
-}
-
/**
* camel_session_is_online:
@@ -752,6 +679,7 @@ camel_session_is_online (CamelSession *session)
return session->online;
}
+
/**
* camel_session_set_online:
* @session: the session
diff --git a/camel/camel-session.h b/camel/camel-session.h
index 00083fcdf8..0105f2ce8b 100644
--- a/camel/camel-session.h
+++ b/camel/camel-session.h
@@ -100,13 +100,6 @@ typedef struct {
const char *prompt,
gboolean cancel);
- guint (*register_timeout) (CamelSession *session,
- guint32 interval,
- CamelTimeoutCallback callback,
- gpointer user_data);
- gboolean (*remove_timeout) (CamelSession *session,
- guint handle);
-
CamelFilterDriver * (*get_filter_driver) (CamelSession *session,
const char *type,
CamelException *ex);
@@ -172,15 +165,6 @@ gboolean camel_session_alert_user (CamelSession *session,
const char *prompt,
gboolean cancel);
-guint camel_session_register_timeout (CamelSession *session,
- guint32 interval,
- CamelTimeoutCallback callback,
- gpointer user_data);
-
-gboolean camel_session_remove_timeout (CamelSession *session,
- guint handle);
-
-
gboolean camel_session_is_online (CamelSession *session);
void camel_session_set_online (CamelSession *session,
gboolean online);
diff --git a/camel/tests/lib/session.c b/camel/tests/lib/session.c
index a1f8df3ea0..bf23fbe377 100644
--- a/camel/tests/lib/session.c
+++ b/camel/tests/lib/session.c
@@ -4,28 +4,11 @@
#include "session.h"
-static guint
-register_timeout (CamelSession *session, guint32 interval, CamelTimeoutCallback callback, gpointer user_data)
-{
- return 1;
-}
-
-static gboolean
-unregister_timeout (CamelSession *session, guint handle)
-{
- return TRUE;
-}
-
-
static void
class_init (CamelTestSessionClass *camel_test_session_class)
{
CamelSessionClass *camel_session_class =
CAMEL_SESSION_CLASS (camel_test_session_class);
-
- /* virtual method override */
- camel_session_class->register_timeout = register_timeout;
- camel_session_class->remove_timeout = unregister_timeout;
}
CamelType