[evolution-kolab] CamelKolabIMAPXStore: allow retrieval of complete folder info
- From: Christian Hilberg <chilberg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab] CamelKolabIMAPXStore: allow retrieval of complete folder info
- Date: Thu, 16 Aug 2012 15:44:54 +0000 (UTC)
commit 71fbe1fe93918f322b9c6e44831706462bea22c4
Author: Christian Hilberg <hilberg kernelconcepts de>
Date: Thu Aug 16 17:36:03 2012 +0200
CamelKolabIMAPXStore: allow retrieval of complete folder info
* usually, imapx_store_get_folder_info_sync() will return
the CamelIMAPXStore CamelFolderInfo* tree, with the folders
removed from the data structure which do not match the
currently-configured folder context (mail, contacts, calendar)
* in order to support folder autodiscovery, we need to allow
retrieval of the complete folder list, regardless of the
configured context (this is being used in the collection
backend)
src/libekolab/camel-kolab-imapx-store.c | 23 +++++++++++++++--------
1 files changed, 15 insertions(+), 8 deletions(-)
---
diff --git a/src/libekolab/camel-kolab-imapx-store.c b/src/libekolab/camel-kolab-imapx-store.c
index 16f0de0..dee055e 100644
--- a/src/libekolab/camel-kolab-imapx-store.c
+++ b/src/libekolab/camel-kolab-imapx-store.c
@@ -270,7 +270,7 @@ imapx_store_get_foldertype (CamelKolabIMAPXStore *self,
* means we cannot return a folder type
* other than UNKNOWN
*/
- g_debug ("%s: must be online to complete this operation",
+ g_debug ("%s: You must be online to complete this operation",
__func__);
return KOLAB_FOLDER_TYPE_UNKNOWN;
}
@@ -530,6 +530,7 @@ imapx_store_get_folder_info_sync (CamelKolabIMAPXStore *self,
const gchar *top,
CamelStoreGetFolderInfoFlags flags,
gboolean do_updatedb,
+ gboolean get_all,
GCancellable *cancellable,
GError **err)
{
@@ -556,12 +557,16 @@ imapx_store_get_folder_info_sync (CamelKolabIMAPXStore *self,
goto exit;
if (fi != NULL) {
- k_fi = imapx_store_folder_info_build_restricted (self,
- fi,
- do_updatedb,
- cancellable,
- &tmp_err);
- camel_store_free_folder_info (CAMEL_STORE (self), fi);
+ if (get_all) {
+ k_fi = fi;
+ } else {
+ k_fi = imapx_store_folder_info_build_restricted (self,
+ fi,
+ do_updatedb,
+ cancellable,
+ &tmp_err);
+ camel_store_free_folder_info (CAMEL_STORE (self), fi);
+ }
if (tmp_err != NULL)
goto exit;
@@ -671,7 +676,8 @@ kolab_imapx_store_get_folder_info_sync (CamelStore *self,
k_fi = imapx_store_get_folder_info_sync (myself,
top,
flags,
- TRUE, /* update SQLite DBs */
+ TRUE, /* update SQLite DBs */
+ FALSE, /* get folders matching context only */
cancellable,
err);
@@ -696,6 +702,7 @@ kolab_imapx_store_get_folder_info_online (CamelKolabIMAPXStore *self,
top,
flags,
FALSE, /* do not update DBs */
+ TRUE, /* get info for all folders, disregard context */
cancellable,
err);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]