[evolution-data-server] Remove camel_folder_has_search_capability()
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Remove camel_folder_has_search_capability()
- Date: Fri, 18 May 2012 06:58:59 +0000 (UTC)
commit 779baa21be659df38aadf2bd95db69d0d61f6ddc
Author: Milan Crha <mcrha redhat com>
Date: Fri May 18 08:58:28 2012 +0200
Remove camel_folder_has_search_capability()
CamelFolder descendants are supposed to implement search API now.
camel/camel-enums.h | 1 -
camel/camel-folder.c | 19 -------------------
camel/camel-folder.h | 2 --
camel/camel-imapx-folder.c | 3 +--
camel/camel-vee-folder.c | 3 +--
camel/providers/imap/camel-imap-folder.c | 3 +--
camel/providers/local/camel-local-folder.c | 3 +--
camel/providers/nntp/camel-nntp-folder.c | 4 +---
8 files changed, 5 insertions(+), 33 deletions(-)
---
diff --git a/camel/camel-enums.h b/camel/camel-enums.h
index 1ad1682..1fbb41c 100644
--- a/camel/camel-enums.h
+++ b/camel/camel-enums.h
@@ -44,7 +44,6 @@ typedef enum {
typedef enum { /*< flags >*/
CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY = 1 << 0,
- CAMEL_FOLDER_HAS_SEARCH_CAPABILITY = 1 << 1,
CAMEL_FOLDER_FILTER_RECENT = 1 << 2,
CAMEL_FOLDER_HAS_BEEN_DELETED = 1 << 3,
CAMEL_FOLDER_IS_TRASH = 1 << 4,
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 45dd1d2..125387c 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -2628,22 +2628,6 @@ camel_folder_free_summary (CamelFolder *folder,
}
/**
- * camel_folder_has_search_capability:
- * @folder: a #CamelFolder
- *
- * Checks if a folder supports searching.
- *
- * Returns: %TRUE if the folder supports searching or %FALSE otherwise
- **/
-gboolean
-camel_folder_has_search_capability (CamelFolder *folder)
-{
- g_return_val_if_fail (CAMEL_IS_FOLDER (folder), FALSE);
-
- return folder->folder_flags & CAMEL_FOLDER_HAS_SEARCH_CAPABILITY;
-}
-
-/**
* camel_folder_search_by_expression:
* @folder: a #CamelFolder
* @expr: a search expression
@@ -2665,7 +2649,6 @@ camel_folder_search_by_expression (CamelFolder *folder,
GPtrArray *matches;
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
- g_return_val_if_fail (folder->folder_flags & CAMEL_FOLDER_HAS_SEARCH_CAPABILITY, NULL);
class = CAMEL_FOLDER_GET_CLASS (folder);
g_return_val_if_fail (class->search_by_expression != NULL, NULL);
@@ -2700,7 +2683,6 @@ camel_folder_count_by_expression (CamelFolder *folder,
CamelFolderClass *class;
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), 0);
- g_return_val_if_fail (folder->folder_flags & CAMEL_FOLDER_HAS_SEARCH_CAPABILITY, 0);
class = CAMEL_FOLDER_GET_CLASS (folder);
g_return_val_if_fail (class->count_by_expression != NULL, 0);
@@ -2734,7 +2716,6 @@ camel_folder_search_by_uids (CamelFolder *folder,
GPtrArray *matches;
g_return_val_if_fail (CAMEL_IS_FOLDER (folder), NULL);
- g_return_val_if_fail (folder->folder_flags & CAMEL_FOLDER_HAS_SEARCH_CAPABILITY, NULL);
class = CAMEL_FOLDER_GET_CLASS (folder);
g_return_val_if_fail (class->search_by_uids != NULL, NULL);
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
index f289146..c029c41 100644
--- a/camel/camel-folder.h
+++ b/camel/camel-folder.h
@@ -461,8 +461,6 @@ gint camel_folder_cmp_uids (CamelFolder *folder,
const gchar *uid2);
void camel_folder_sort_uids (CamelFolder *folder,
GPtrArray *uids);
-gboolean camel_folder_has_search_capability
- (CamelFolder *folder);
GPtrArray * camel_folder_search_by_expression
(CamelFolder *folder,
const gchar *expr,
diff --git a/camel/camel-imapx-folder.c b/camel/camel-imapx-folder.c
index 2453da3..a3e05e4 100644
--- a/camel/camel-imapx-folder.c
+++ b/camel/camel-imapx-folder.c
@@ -795,8 +795,7 @@ camel_imapx_folder_init (CamelIMAPXFolder *imapx_folder)
{
CamelFolder *folder = CAMEL_FOLDER (imapx_folder);
- folder->folder_flags |= (CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
- CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
+ folder->folder_flags |= CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY;
folder->permanent_flags = CAMEL_MESSAGE_ANSWERED |
CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_DRAFT |
diff --git a/camel/camel-vee-folder.c b/camel/camel-vee-folder.c
index e716e60..c66b40a 100644
--- a/camel/camel-vee-folder.c
+++ b/camel/camel-vee-folder.c
@@ -2072,8 +2072,7 @@ camel_vee_folder_init (CamelVeeFolder *vee_folder)
vee_folder->priv = CAMEL_VEE_FOLDER_GET_PRIVATE (vee_folder);
- folder->folder_flags |= (CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
- CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
+ folder->folder_flags |= CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY;
/* FIXME: what to do about user flags if the subfolder doesn't support them? */
folder->permanent_flags = CAMEL_MESSAGE_ANSWERED |
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 6add270..060f0c5 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -372,8 +372,7 @@ camel_imap_folder_init (CamelImapFolder *imap_folder)
folder->permanent_flags = CAMEL_MESSAGE_ANSWERED | CAMEL_MESSAGE_DELETED |
CAMEL_MESSAGE_DRAFT | CAMEL_MESSAGE_FLAGGED | CAMEL_MESSAGE_SEEN;
- folder->folder_flags |= (CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
- CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
+ folder->folder_flags |= CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY;
g_static_mutex_init (&imap_folder->priv->search_lock);
g_static_rec_mutex_init (&imap_folder->priv->cache_lock);
diff --git a/camel/providers/local/camel-local-folder.c b/camel/providers/local/camel-local-folder.c
index d50a56e..8ebef32 100644
--- a/camel/providers/local/camel-local-folder.c
+++ b/camel/providers/local/camel-local-folder.c
@@ -506,8 +506,7 @@ camel_local_folder_init (CamelLocalFolder *local_folder)
local_folder->priv = CAMEL_LOCAL_FOLDER_GET_PRIVATE (local_folder);
local_folder->priv->search_lock = g_mutex_new ();
- folder->folder_flags |= (CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
- CAMEL_FOLDER_HAS_SEARCH_CAPABILITY);
+ folder->folder_flags |= CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY;
folder->permanent_flags = CAMEL_MESSAGE_ANSWERED |
CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_DRAFT |
diff --git a/camel/providers/nntp/camel-nntp-folder.c b/camel/providers/nntp/camel-nntp-folder.c
index 65aa2ca..94d151a 100644
--- a/camel/providers/nntp/camel-nntp-folder.c
+++ b/camel/providers/nntp/camel-nntp-folder.c
@@ -808,9 +808,7 @@ camel_nntp_folder_new (CamelStore *parent,
"parent-store", parent, NULL);
nntp_folder = (CamelNNTPFolder *) folder;
- folder->folder_flags |=
- CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY |
- CAMEL_FOLDER_HAS_SEARCH_CAPABILITY;
+ folder->folder_flags |= CAMEL_FOLDER_HAS_SUMMARY_CAPABILITY;
nntp_folder->storage_path =
g_build_filename (user_cache_dir, folder_name, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]