From 618188fa1ac896a6d629c1e64e12f49c5ff65258 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 21 Apr 2004 06:12:19 +0000 Subject: implement dummy virtual method. 2004-04-21 Not Zed * 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 --- camel/providers/nntp/camel-nntp-folder.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'camel/providers') 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 @@ -65,6 +65,34 @@ static CamelDiscoFolderClass *parent_class = NULL; #define CF_CLASS(so) CAMEL_FOLDER_CLASS (CAMEL_OBJECT_GET_CLASS(so)) #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) { @@ -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; -- cgit v1.2.3