[evolution-data-server] CamelIMAPXStoreSummary: Remove all public members.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] CamelIMAPXStoreSummary: Remove all public members.
- Date: Sun, 27 Oct 2013 14:55:59 +0000 (UTC)
commit 066937daf09ab09af54d62eebdf17ce971ce1b8e
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Sep 11 17:04:44 2013 -0400
CamelIMAPXStoreSummary: Remove all public members.
The 'version' member was not used for anything and we no longer use the
'namespaces' member. Only the CamelIMAPXServer knows about server-side
mailbox namespaces. That information is not relevant when offline, and
therefore doesn't need to be cached.
This also removes imapx_fabricate_old_namespace_list() and similar hacks
in CamelIMAPXServer.
camel/camel-imapx-server.c | 99 -------------------------------------
camel/camel-imapx-store-summary.c | 24 ---------
camel/camel-imapx-store-summary.h | 4 --
3 files changed, 0 insertions(+), 127 deletions(-)
---
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index bd44514..e3a498c 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -1882,84 +1882,6 @@ imapx_untagged_vanished (CamelIMAPXServer *is,
return TRUE;
}
-static void
-imapx_fabricate_old_namespace_list (CamelIMAPXServer *is,
- CamelIMAPXNamespaceResponse *response)
-{
- CamelIMAPXStore *store;
- CamelIMAPXNamespaceList *nsl;
- CamelIMAPXStoreNamespace *ns;
- GList *list, *link;
-
- /* XXX This is all a temporary hack to be deleted ASAP. */
-
- store = camel_imapx_server_ref_store (is);
-
- if (store->summary->namespaces != NULL)
- camel_imapx_namespace_list_clear (store->summary->namespaces);
-
- nsl = g_new0 (CamelIMAPXNamespaceList, 1);
-
- list = camel_imapx_namespace_response_list (response);
-
- for (link = list; link != NULL; link = g_list_next (link)) {
- CamelIMAPXNamespace *namespace;
- CamelIMAPXNamespaceCategory category;
- const gchar *prefix;
- gchar separator;
-
- namespace = CAMEL_IMAPX_NAMESPACE (link->data);
- category = camel_imapx_namespace_get_category (namespace);
- prefix = camel_imapx_namespace_get_prefix (namespace);
- separator = camel_imapx_namespace_get_separator (namespace);
-
- /* We only supported one namespace per category. */
- switch (category) {
- case CAMEL_IMAPX_NAMESPACE_PERSONAL:
- if (nsl->personal != NULL)
- continue;
- nsl->personal = g_new0 (
- CamelIMAPXStoreNamespace, 1);
- nsl->personal->prefix = g_strdup (prefix);
- nsl->personal->sep = separator;
- break;
- case CAMEL_IMAPX_NAMESPACE_OTHER_USERS:
- if (nsl->other != NULL)
- continue;
- nsl->other = g_new0 (
- CamelIMAPXStoreNamespace, 1);
- nsl->other->prefix = g_strdup (prefix);
- nsl->other->sep = separator;
- break;
- case CAMEL_IMAPX_NAMESPACE_SHARED:
- if (nsl->shared != NULL)
- continue;
- nsl->shared = g_new0 (
- CamelIMAPXStoreNamespace, 1);
- nsl->shared->prefix = g_strdup (prefix);
- nsl->shared->sep = separator;
- break;
- default:
- continue;
- }
- }
-
- g_list_free_full (list, (GDestroyNotify) g_object_unref);
-
- store->summary->namespaces = nsl;
- camel_store_summary_touch (CAMEL_STORE_SUMMARY (store->summary));
-
- /* TODO Need to remove store->dir_sep to support multiple namespaces */
- ns = nsl->personal;
- if (ns) {
- store->dir_sep = ns->sep;
- if (!store->dir_sep)
- store->dir_sep = '/';
- }
-
- g_object_unref (store);
-}
-
static gboolean
imapx_untagged_namespace (CamelIMAPXServer *is,
CamelIMAPXStream *stream,
@@ -1982,10 +1904,6 @@ imapx_untagged_namespace (CamelIMAPXServer *is,
g_mutex_unlock (&is->priv->namespaces_lock);
- /* XXX This is a temporary stop-gap until we can
- * fully migrate to CamelIMAPXNamespaceResponse. */
- imapx_fabricate_old_namespace_list (is, response);
-
g_object_unref (response);
return TRUE;
@@ -4738,23 +4656,6 @@ preauthed:
}
}
- if (store->summary->namespaces == NULL) {
- CamelIMAPXNamespaceList *nsl = NULL;
- CamelIMAPXStoreNamespace *ns = NULL;
-
- /* set a default namespace */
- nsl = g_malloc0 (sizeof (CamelIMAPXNamespaceList));
- ns = g_new0 (CamelIMAPXStoreNamespace, 1);
- ns->next = NULL;
- ns->prefix = g_strdup ("");
- ns->sep = '/';
- nsl->personal = ns;
-
- store->summary->namespaces = nsl;
- /* FIXME needs to be identified from list response */
- store->dir_sep = ns->sep;
- }
-
is->state = IMAPX_INITIALISED;
success = TRUE;
diff --git a/camel/camel-imapx-store-summary.c b/camel/camel-imapx-store-summary.c
index 58d86dd..5ce7b58 100644
--- a/camel/camel-imapx-store-summary.c
+++ b/camel/camel-imapx-store-summary.c
@@ -94,30 +94,13 @@ exit:
return success;
}
-static void
-imapx_store_summary_finalize (GObject *object)
-{
- CamelIMAPXStoreSummary *summary;
-
- summary = CAMEL_IMAPX_STORE_SUMMARY (object);
-
- camel_imapx_namespace_list_clear (summary->namespaces);
-
- /* Chain up to parent's finalize() method. */
- G_OBJECT_CLASS (camel_imapx_store_summary_parent_class)->
- finalize (object);
-}
-
static gint
imapx_store_summary_summary_header_load (CamelStoreSummary *s,
FILE *in)
{
- CamelIMAPXStoreSummary *is = (CamelIMAPXStoreSummary *) s;
CamelStoreSummaryClass *store_summary_class;
gint32 version, unused;
- camel_imapx_namespace_list_clear (is->namespaces);
-
store_summary_class =
CAMEL_STORE_SUMMARY_CLASS (
camel_imapx_store_summary_parent_class);
@@ -129,8 +112,6 @@ imapx_store_summary_summary_header_load (CamelStoreSummary *s,
if (camel_file_util_decode_fixed_int32 (in, &version) == -1)
return -1;
- is->version = version;
-
if (version < CAMEL_IMAPX_STORE_SUMMARY_VERSION) {
g_warning (
"Unable to load store summary: "
@@ -279,12 +260,8 @@ imapx_store_summary_store_info_free (CamelStoreSummary *s,
static void
camel_imapx_store_summary_class_init (CamelIMAPXStoreSummaryClass *class)
{
- GObjectClass *object_class;
CamelStoreSummaryClass *store_summary_class;
- object_class = G_OBJECT_CLASS (class);
- object_class->finalize = imapx_store_summary_finalize;
-
store_summary_class = CAMEL_STORE_SUMMARY_CLASS (class);
store_summary_class->store_info_size = sizeof (CamelIMAPXStoreInfo);
store_summary_class->summary_header_load =imapx_store_summary_summary_header_load;
@@ -297,7 +274,6 @@ camel_imapx_store_summary_class_init (CamelIMAPXStoreSummaryClass *class)
static void
camel_imapx_store_summary_init (CamelIMAPXStoreSummary *s)
{
- s->version = CAMEL_IMAPX_STORE_SUMMARY_VERSION;
}
/**
diff --git a/camel/camel-imapx-store-summary.h b/camel/camel-imapx-store-summary.h
index 03dd4b7..03ac470 100644
--- a/camel/camel-imapx-store-summary.h
+++ b/camel/camel-imapx-store-summary.h
@@ -77,10 +77,6 @@ typedef struct _CamelIMAPXNamespaceList {
struct _CamelIMAPXStoreSummary {
CamelStoreSummary parent;
-
- /* header info */
- guint32 version; /* version of base part of file */
- CamelIMAPXNamespaceList *namespaces; /* eventually to be a list */
};
struct _CamelIMAPXStoreSummaryClass {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]