diff options
author | Dan Winship <danw@src.gnome.org> | 2000-07-13 04:37:00 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-07-13 04:37:00 +0800 |
commit | 540e1d7671ec843c2db2d03810d948f879ac1bfc (patch) | |
tree | 93b23a7c4a19ef3db93730064e0a9c5035a04f81 /camel/providers/nntp | |
parent | 4b7d13b41ff3dd03e8490108f30277f5469d40bf (diff) | |
download | gsoc2013-evolution-540e1d7671ec843c2db2d03810d948f879ac1bfc.tar.gz gsoc2013-evolution-540e1d7671ec843c2db2d03810d948f879ac1bfc.tar.zst gsoc2013-evolution-540e1d7671ec843c2db2d03810d948f879ac1bfc.zip |
Useful default implementations for free_{uids,subfolder_names,summary}.
* camel-folder.c (camel_folder_free_deep,
camel_folder_free_shallow, camel_folder_free_nop): Useful default
implementations for free_{uids,subfolder_names,summary}.
(free_subfolder_names, free_uids): Make these g_warning-ing
default implementations.
* providers/*/camel-*-folder.c: Use the new functions where
appropriate, remove duplicated code.
svn path=/trunk/; revision=4120
Diffstat (limited to 'camel/providers/nntp')
-rw-r--r-- | camel/providers/nntp/camel-nntp-folder.c | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c index 00e709b20b..2b41768d36 100644 --- a/camel/providers/nntp/camel-nntp-folder.c +++ b/camel/providers/nntp/camel-nntp-folder.c @@ -334,17 +334,6 @@ nntp_folder_get_uids (CamelFolder *folder, return out; } -static void -nntp_folder_free_uids (CamelFolder *folder, - GPtrArray *array) -{ - int i; - for (i = 0; i < array->len; i ++) { - g_free (g_ptr_array_index (array, i)); - } - g_ptr_array_free (array, TRUE /* XXX? */); -} - static GPtrArray * nntp_folder_get_summary (CamelFolder *folder, CamelException *ex) @@ -354,13 +343,6 @@ nntp_folder_get_summary (CamelFolder *folder, return nntp_folder->summary->messages; } -static void -nntp_folder_free_summary (CamelFolder *folder, - GPtrArray *summary) -{ - g_assert (0); -} - static GPtrArray * nntp_folder_get_subfolder_names (CamelFolder *folder, CamelException *ex) { @@ -441,9 +423,9 @@ camel_nntp_folder_class_init (CamelNNTPFolderClass *camel_nntp_folder_class) camel_folder_class->get_message = nntp_folder_get_message; camel_folder_class->delete_message = nntp_folder_delete_message; camel_folder_class->get_uids = nntp_folder_get_uids; - camel_folder_class->free_uids = nntp_folder_free_uids; + camel_folder_class->free_uids = camel_folder_free_deep; camel_folder_class->get_summary = nntp_folder_get_summary; - camel_folder_class->free_summary = nntp_folder_free_summary; + camel_folder_class->free_summary = camel_folder_free_nop; camel_folder_class->get_subfolder_names = nntp_folder_get_subfolder_names; camel_folder_class->free_subfolder_names = nntp_folder_free_subfolder_names; camel_folder_class->search_by_expression = nntp_folder_search_by_expression; |