aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-04-21 14:12:19 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-04-21 14:12:19 +0800
commit618188fa1ac896a6d629c1e64e12f49c5ff65258 (patch)
tree9a9a6d4f89853dcdb5ac3f8d19cf984d88babce7 /camel
parentc99c1692987e9e58a9d800940e41855458424b85 (diff)
downloadgsoc2013-evolution-618188fa1ac896a6d629c1e64e12f49c5ff65258.tar.gz
gsoc2013-evolution-618188fa1ac896a6d629c1e64e12f49c5ff65258.tar.zst
gsoc2013-evolution-618188fa1ac896a6d629c1e64e12f49c5ff65258.zip
implement dummy virtual method.
2004-04-21 Not Zed <NotZed@Ximian.com> * camel-disco-folder.c (disco_refresh_info_online): implement dummy virtual method. * providers/nntp/camel-nntp-folder.c (nntp_folder_refresh_info_online): implement. Fixes #57280. svn path=/trunk/; revision=25552
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog8
-rw-r--r--camel/camel-disco-folder.c8
-rw-r--r--camel/providers/nntp/camel-nntp-folder.c29
3 files changed, 45 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 64f69d86d1..421bf36c1c 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,11 @@
+2004-04-21 Not Zed <NotZed@Ximian.com>
+
+ * camel-disco-folder.c (disco_refresh_info_online): implement
+ dummy virtual method.
+
+ * providers/nntp/camel-nntp-folder.c
+ (nntp_folder_refresh_info_online): implement. Fixes #57280.
+
2004-04-19 Jeffrey Stedfast <fejj@ximian.com>
* providers/imap4/camel-imap4-folder.c (untagged_fetch): Fixed to
diff --git a/camel/camel-disco-folder.c b/camel/camel-disco-folder.c
index 33148251f2..a5e7f80ee0 100644
--- a/camel/camel-disco-folder.c
+++ b/camel/camel-disco-folder.c
@@ -45,6 +45,7 @@ static int disco_getv(CamelObject *object, CamelException *ex, CamelArgGetV *arg
static int disco_setv(CamelObject *object, CamelException *ex, CamelArgV *args);
static void disco_refresh_info (CamelFolder *folder, CamelException *ex);
+static void disco_refresh_info_online (CamelFolder *folder, CamelException *ex);
static void disco_sync (CamelFolder *folder, gboolean expunge, CamelException *ex);
static void disco_expunge (CamelFolder *folder, CamelException *ex);
@@ -75,6 +76,7 @@ camel_disco_folder_class_init (CamelDiscoFolderClass *camel_disco_folder_class)
/* virtual method definition */
camel_disco_folder_class->cache_message = disco_cache_message;
camel_disco_folder_class->prepare_for_offline = disco_prepare_for_offline;
+ camel_disco_folder_class->refresh_info_online = disco_refresh_info_online;
/* virtual method overload */
camel_folder_class->refresh_info = disco_refresh_info;
@@ -252,6 +254,12 @@ disco_setv(CamelObject *object, CamelException *ex, CamelArgV *args)
}
static void
+disco_refresh_info_online(CamelFolder *folder, CamelException *ex)
+{
+ /* NOOP */;
+}
+
+static void
disco_refresh_info (CamelFolder *folder, CamelException *ex)
{
if (camel_disco_store_status (CAMEL_DISCO_STORE (folder->parent_store)) != CAMEL_DISCO_STORE_ONLINE)
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
index 6a6851232f..4ef92ea9b5 100644
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ b/camel/providers/nntp/camel-nntp-folder.c
@@ -66,6 +66,34 @@ static CamelDiscoFolderClass *parent_class = NULL;
#define CNNTPS_CLASS(so) CAMEL_STORE_CLASS (CAMEL_OBJECT_GET_CLASS(so))
static void
+nntp_folder_refresh_info_online (CamelFolder *folder, CamelException *ex)
+{
+ CamelNNTPStore *nntp_store;
+ CamelFolderChangeInfo *changes = NULL;
+ CamelNNTPFolder *nntp_folder;
+
+ nntp_store = (CamelNNTPStore *) folder->parent_store;
+ nntp_folder = (CamelNNTPFolder *) folder;
+
+ CAMEL_NNTP_STORE_LOCK(nntp_store, command_lock);
+
+ if (camel_nntp_summary_check ((CamelNNTPSummary *) folder->summary, nntp_folder->changes, ex) != -1)
+ camel_folder_summary_save (folder->summary);
+
+ if (camel_folder_change_info_changed(nntp_folder->changes)) {
+ changes = nntp_folder->changes;
+ nntp_folder->changes = camel_folder_change_info_new();
+ }
+
+ CAMEL_NNTP_STORE_UNLOCK(nntp_store, command_lock);
+
+ if (changes) {
+ camel_object_trigger_event ((CamelObject *) folder, "folder_changed", changes);
+ camel_folder_change_info_free (changes);
+ }
+}
+
+static void
nntp_folder_sync_online (CamelFolder *folder, CamelException *ex)
{
CamelNNTPStore *nntp_store;
@@ -505,6 +533,7 @@ nntp_folder_class_init (CamelNNTPFolderClass *camel_nntp_folder_class)
camel_disco_folder_class->transfer_online = nntp_folder_transfer_message;
camel_disco_folder_class->transfer_resyncing = nntp_folder_transfer_message;
camel_disco_folder_class->transfer_offline = nntp_folder_transfer_message;
+ camel_disco_folder_class->refresh_info_online = nntp_folder_refresh_info_online;
camel_folder_class->set_message_flags = nntp_folder_set_message_flags;
camel_folder_class->get_message = nntp_folder_get_message;