[evolution-data-server] Rename CamelIMAPXStoreSummary API: 'full' to 'mailbox'.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Rename CamelIMAPXStoreSummary API: 'full' to 'mailbox'.
- Date: Tue, 20 Aug 2013 19:08:46 +0000 (UTC)
commit b52413aacdb9a5c45f787ef651fa1e5c053d598b
Author: Matthew Barnes <mbarnes redhat com>
Date: Tue Aug 20 13:21:28 2013 -0400
Rename CamelIMAPXStoreSummary API: 'full' to 'mailbox'.
The namespace code becomes a little clearer with these renames.
Renamed functions:
- camel_imapx_store_summary_namespace_find_path
+ camel_imapx_store_summary_namespace_find_by_path
- camel_imapx_store_summary_namespace_find_full
+ camel_imapx_store_summary_namespace_find_by_mailbox
- camel_imapx_store_summary_full_to_path
+ camel_imapx_store_summary_mailbox_to_path
- camel_imapx_store_summary_path_to_full
+ camel_imapx_store_summary_path_to_mailbox
- camel_imapx_store_summary_full_name
+ camel_imapx_store_summary_mailbox
- camel_imapx_store_summary_add_from_full
+ camel_imapx_store_summary_add_from_mailbox
- camel_imapx_store_summary_full_from_path
+ camel_imapx_store_summary_mailbox_from_path
camel/camel-imapx-command.c | 11 ++-
camel/camel-imapx-server.c | 38 +++++----
camel/camel-imapx-store-summary.c | 143 ++++++++++++++++---------------
camel/camel-imapx-store-summary.h | 22 +++---
camel/camel-imapx-store.c | 69 ++++++++-------
docs/reference/camel/camel-sections.txt | 14 ++--
6 files changed, 152 insertions(+), 145 deletions(-)
---
diff --git a/camel/camel-imapx-command.c b/camel/camel-imapx-command.c
index 10ffad2..4322777 100644
--- a/camel/camel-imapx-command.c
+++ b/camel/camel-imapx-command.c
@@ -261,7 +261,7 @@ camel_imapx_command_addv (CamelIMAPXCommand *ic,
CamelFolder *folder;
CamelStore *parent_store;
GString *buffer;
- gchar *fname = NULL, *encoded = NULL;
+ gchar *mailbox = NULL, *encoded = NULL;
const gchar *full_name;
g_return_if_fail (CAMEL_IS_IMAPX_COMMAND (ic));
@@ -373,10 +373,11 @@ camel_imapx_command_addv (CamelIMAPXCommand *ic,
full_name = camel_folder_get_full_name (folder);
c (ic->is->tagprefix, "got folder '%s'\n", full_name);
parent_store = camel_folder_get_parent_store (folder);
- fname = camel_imapx_store_summary_full_from_path (((CamelIMAPXStore *)
parent_store)->summary, full_name);
- if (fname) {
- encoded = camel_utf8_utf7 (fname);
- g_free (fname);
+ mailbox = camel_imapx_store_summary_mailbox_from_path (
+ ((CamelIMAPXStore *) parent_store)->summary, full_name);
+ if (mailbox != NULL) {
+ encoded = camel_utf8_utf7 (mailbox);
+ g_free (mailbox);
} else
encoded = camel_utf8_utf7 (full_name);
diff --git a/camel/camel-imapx-server.c b/camel/camel-imapx-server.c
index 0ad5520..3cee058 100644
--- a/camel/camel-imapx-server.c
+++ b/camel/camel-imapx-server.c
@@ -2071,31 +2071,31 @@ imapx_untagged_quotaroot (CamelIMAPXServer *is,
CamelIMAPXStore *store;
CamelIMAPXStoreNamespace *ns;
CamelFolder *folder = NULL;
- gchar *mailbox_name = NULL;
+ gchar *mailbox = NULL;
gchar **quota_root_names = NULL;
gboolean success;
GError *local_error = NULL;
success = camel_imapx_parse_quotaroot (
- stream, cancellable, &mailbox_name, "a_root_names, error);
+ stream, cancellable, &mailbox, "a_root_names, error);
/* Sanity check */
g_return_val_if_fail (
- (success && (mailbox_name != NULL)) ||
- (!success && (mailbox_name == NULL)), FALSE);
+ (success && (mailbox != NULL)) ||
+ (!success && (mailbox == NULL)), FALSE);
if (!success)
return FALSE;
store = camel_imapx_server_ref_store (is);
- ns = camel_imapx_store_summary_namespace_find_full (
- store->summary, mailbox_name);
+ ns = camel_imapx_store_summary_namespace_find_by_mailbox (
+ store->summary, mailbox);
if (ns != NULL) {
gchar *folder_path;
- folder_path = camel_imapx_store_summary_full_to_path (
- store->summary, mailbox_name, ns->sep);
+ folder_path = camel_imapx_store_summary_mailbox_to_path (
+ store->summary, mailbox, ns->sep);
if (folder_path != NULL) {
folder = camel_store_get_folder_sync (
CAMEL_STORE (store), folder_path, 0,
@@ -2114,11 +2114,11 @@ imapx_untagged_quotaroot (CamelIMAPXServer *is,
if (local_error != NULL) {
g_warning (
"%s: Failed to get folder '%s': %s",
- G_STRFUNC, mailbox_name, local_error->message);
+ G_STRFUNC, mailbox, local_error->message);
g_error_free (local_error);
}
- g_free (mailbox_name);
+ g_free (mailbox);
g_strfreev (quota_root_names);
return TRUE;
@@ -2214,13 +2214,13 @@ imapx_untagged_status (CamelIMAPXServer *is,
store = camel_imapx_server_ref_store (is);
- ns = camel_imapx_store_summary_namespace_find_full (
+ ns = camel_imapx_store_summary_namespace_find_by_mailbox (
store->summary, mailbox);
if (ns != NULL) {
gchar *path_name;
- path_name = camel_imapx_store_summary_full_to_path (
+ path_name = camel_imapx_store_summary_mailbox_to_path (
store->summary, mailbox, ns->sep);
c (is->tagprefix,
"Got folder path '%s' for full '%s'\n",
@@ -6036,12 +6036,14 @@ static gchar *
imapx_encode_folder_name (CamelIMAPXStore *istore,
const gchar *folder_name)
{
- gchar *fname, *encoded;
+ gchar *mailbox;
+ gchar *encoded;
- fname = camel_imapx_store_summary_full_from_path (istore->summary, folder_name);
- if (fname) {
- encoded = camel_utf8_utf7 (fname);
- g_free (fname);
+ mailbox = camel_imapx_store_summary_mailbox_from_path (
+ istore->summary, folder_name);
+ if (mailbox != NULL) {
+ encoded = camel_utf8_utf7 (mailbox);
+ g_free (mailbox);
} else
encoded = camel_utf8_utf7 (folder_name);
diff --git a/camel/camel-imapx-store-summary.c b/camel/camel-imapx-store-summary.c
index 567c072..76fe495 100644
--- a/camel/camel-imapx-store-summary.c
+++ b/camel/camel-imapx-store-summary.c
@@ -103,29 +103,29 @@ camel_imapx_store_summary_new (void)
}
/**
- * camel_imapx_store_summary_full_name:
+ * camel_imapx_store_summary_mailbox:
* @s:
- * @full_name:
+ * @mailbox:
*
- * Retrieve a summary item by full name.
+ * Retrieve a summary item by mailbox name.
*
* A referenced to the summary item is returned, which may be
* ref'd or free'd as appropriate.
*
- * Returns: The summary item, or NULL if the @full_name name
+ * Returns: The summary item, or NULL if the @mailbox name
* is not available.
* It must be freed using camel_store_summary_info_unref().
**/
CamelIMAPXStoreInfo *
-camel_imapx_store_summary_full_name (CamelIMAPXStoreSummary *s,
- const gchar *full_name)
+camel_imapx_store_summary_mailbox (CamelIMAPXStoreSummary *s,
+ const gchar *mailbox)
{
CamelStoreInfo *match = NULL;
GPtrArray *array;
gboolean find_inbox;
guint ii;
- find_inbox = camel_imapx_mailbox_is_inbox (full_name);
+ find_inbox = camel_imapx_mailbox_is_inbox (mailbox);
array = camel_store_summary_array (CAMEL_STORE_SUMMARY (s));
@@ -143,7 +143,7 @@ camel_imapx_store_summary_full_name (CamelIMAPXStoreSummary *s,
break;
}
- if (g_str_equal (info->mailbox, full_name)) {
+ if (g_str_equal (info->mailbox, mailbox)) {
match = camel_store_summary_info_ref (
CAMEL_STORE_SUMMARY (s),
(CamelStoreInfo *) info);
@@ -157,13 +157,13 @@ camel_imapx_store_summary_full_name (CamelIMAPXStoreSummary *s,
}
gchar *
-camel_imapx_store_summary_full_to_path (CamelIMAPXStoreSummary *s,
- const gchar *full_name,
- gchar dir_sep)
+camel_imapx_store_summary_mailbox_to_path (CamelIMAPXStoreSummary *s,
+ const gchar *mailbox,
+ gchar dir_sep)
{
gchar *path, *p;
- p = path = g_strdup (full_name);
+ p = path = g_strdup (mailbox);
if (dir_sep && dir_sep != '/') {
while (*p) {
@@ -178,11 +178,12 @@ camel_imapx_store_summary_full_to_path (CamelIMAPXStoreSummary *s,
}
gchar *
-camel_imapx_store_summary_path_to_full (CamelIMAPXStoreSummary *s,
- const gchar *path,
- gchar dir_sep)
+camel_imapx_store_summary_path_to_mailbox (CamelIMAPXStoreSummary *s,
+ const gchar *path,
+ gchar dir_sep)
{
- gchar *full, *f;
+ gchar *full;
+ gchar *mailbox;
const gchar *p;
gchar *subpath, *last = NULL;
CamelStoreInfo *si;
@@ -202,12 +203,12 @@ camel_imapx_store_summary_path_to_full (CamelIMAPXStoreSummary *s,
/* path is already present, use the raw version we have */
if (si && strlen (subpath) == strlen (path)) {
- f = g_strdup (((CamelIMAPXStoreInfo *) si)->mailbox);
+ mailbox = g_strdup (((CamelIMAPXStoreInfo *) si)->mailbox);
camel_store_summary_info_unref ((CamelStoreSummary *) s, si);
- return f;
+ return mailbox;
}
- ns = camel_imapx_store_summary_namespace_find_path (s, path);
+ ns = camel_imapx_store_summary_namespace_find_by_path (s, path);
if (si)
p = path + strlen (subpath);
@@ -216,70 +217,71 @@ camel_imapx_store_summary_path_to_full (CamelIMAPXStoreSummary *s,
else
p = path;
- f = full = g_strdup (p);
+ mailbox = full = g_strdup (p);
if (dir_sep != '/') {
- while (*f) {
- if (*f == '/')
- *f = dir_sep;
- else if (*f == dir_sep)
- *f = '/';
- f++;
+ while (*mailbox) {
+ if (*mailbox == '/')
+ *mailbox = dir_sep;
+ else if (*mailbox == dir_sep)
+ *mailbox = '/';
+ mailbox++;
}
}
/* merge old path part if required */
- f = full;
+ mailbox = full;
if (si) {
- full = g_strdup_printf ("%s%s", ((CamelIMAPXStoreInfo *) si)->mailbox, f);
- g_free (f);
+ full = g_strdup_printf ("%s%s", ((CamelIMAPXStoreInfo *) si)->mailbox, mailbox);
+ g_free (mailbox);
camel_store_summary_info_unref ((CamelStoreSummary *) s, si);
- f = full;
+ mailbox = full;
} else if (ns) {
- full = g_strdup_printf ("%s%s", ns->prefix, f);
- g_free (f);
- f = full;
+ full = g_strdup_printf ("%s%s", ns->prefix, mailbox);
+ g_free (mailbox);
+ mailbox = full;
}
- return f;
+ return mailbox;
}
CamelIMAPXStoreInfo *
-camel_imapx_store_summary_add_from_full (CamelIMAPXStoreSummary *s,
- const gchar *full,
- gchar dir_sep)
+camel_imapx_store_summary_add_from_mailbox (CamelIMAPXStoreSummary *s,
+ const gchar *mailbox,
+ gchar dir_sep)
{
CamelIMAPXStoreInfo *info;
gchar *pathu8, *prefix;
gint len;
- gchar *mailbox;
+ gchar *mailbox_copy;
CamelIMAPXStoreNamespace *ns;
- d ("adding full name '%s' '%c'\n", full, dir_sep);
+ d ("adding mailbox '%s' '%c'\n", mailbox, dir_sep);
- len = strlen (full);
- mailbox = alloca (len + 1);
- strcpy (mailbox, full);
- if (mailbox[len - 1] == dir_sep)
- mailbox[len - 1] = 0;
+ len = strlen (mailbox);
+ mailbox_copy = alloca (len + 1);
+ strcpy (mailbox_copy, mailbox);
+ if (mailbox_copy[len - 1] == dir_sep)
+ mailbox_copy[len - 1] = 0;
- info = camel_imapx_store_summary_full_name (s, mailbox);
+ info = camel_imapx_store_summary_mailbox (s, mailbox_copy);
if (info) {
camel_store_summary_info_unref ((CamelStoreSummary *) s, (CamelStoreInfo *) info);
d (" already there\n");
return info;
}
- ns = camel_imapx_store_summary_namespace_find_full (s, mailbox);
+ ns = camel_imapx_store_summary_namespace_find_by_mailbox (s, mailbox_copy);
if (ns) {
- d ("(found namespace for '%s' ns '%s') ", mailbox, ns->prefix);
+ d ("(found namespace for '%s' ns '%s') ", mailbox_copy, ns->prefix);
len = strlen (ns->prefix);
- if (len >= strlen (mailbox)) {
+ if (len >= strlen (mailbox_copy)) {
pathu8 = g_strdup (ns->prefix);
} else {
- if (mailbox[len] == ns->sep)
+ if (mailbox_copy[len] == ns->sep)
len++;
- prefix = camel_imapx_store_summary_full_to_path (s, mailbox + len, ns->sep);
+ prefix = camel_imapx_store_summary_mailbox_to_path (
+ s, mailbox_copy + len, ns->sep);
if (*ns->prefix) {
pathu8 = g_strdup_printf ("%s/%s", ns->prefix, prefix);
g_free (prefix);
@@ -289,16 +291,17 @@ camel_imapx_store_summary_add_from_full (CamelIMAPXStoreSummary *s,
}
d (" (pathu8 = '%s')", pathu8);
} else {
- d ("(Cannot find namespace for '%s')\n", mailbox);
- pathu8 = camel_imapx_store_summary_full_to_path (s, mailbox, dir_sep);
+ d ("(Cannot find namespace for '%s')\n", mailbox_copy);
+ pathu8 = camel_imapx_store_summary_mailbox_to_path (
+ s, mailbox_copy, dir_sep);
}
info = (CamelIMAPXStoreInfo *) camel_store_summary_add_from_path ((CamelStoreSummary *) s, pathu8);
if (info) {
- d (" '%s' -> '%s'\n", pathu8, mailbox);
- camel_store_info_set_string ((CamelStoreSummary *) s, (CamelStoreInfo *) info,
CAMEL_IMAPX_STORE_INFO_MAILBOX, mailbox);
+ d (" '%s' -> '%s'\n", pathu8, mailbox_copy);
+ camel_store_info_set_string ((CamelStoreSummary *) s, (CamelStoreInfo *) info,
CAMEL_IMAPX_STORE_INFO_MAILBOX, mailbox_copy);
- if (!g_ascii_strcasecmp (mailbox, "inbox"))
+ if (!g_ascii_strcasecmp (mailbox_copy, "inbox"))
info->info.flags |= CAMEL_FOLDER_SYSTEM | CAMEL_FOLDER_TYPE_INBOX;
} else {
d (" failed\n");
@@ -310,26 +313,27 @@ camel_imapx_store_summary_add_from_full (CamelIMAPXStoreSummary *s,
}
/* should this be const? */
-/* TODO: deprecate/merge this function with path_to_full */
+/* TODO: deprecate/merge this function with path_to_mailbox */
gchar *
-camel_imapx_store_summary_full_from_path (CamelIMAPXStoreSummary *s,
- const gchar *path)
+camel_imapx_store_summary_mailbox_from_path (CamelIMAPXStoreSummary *s,
+ const gchar *path)
{
CamelIMAPXStoreNamespace *ns;
- gchar *name = NULL;
+ gchar *mailbox = NULL;
- ns = camel_imapx_store_summary_namespace_find_path (s, path);
+ ns = camel_imapx_store_summary_namespace_find_by_path (s, path);
if (ns)
- name = camel_imapx_store_summary_path_to_full (s, path, ns->sep);
+ mailbox = camel_imapx_store_summary_path_to_mailbox (
+ s, path, ns->sep);
- d ("looking up path %s -> %s\n", path, name ? name:"not found");
+ d ("looking up path %s -> %s\n", path, mailbox ? mailbox:"not found");
- return name;
+ return mailbox;
}
CamelIMAPXStoreNamespace *
-camel_imapx_store_summary_namespace_find_path (CamelIMAPXStoreSummary *s,
- const gchar *path)
+camel_imapx_store_summary_namespace_find_by_path (CamelIMAPXStoreSummary *s,
+ const gchar *path)
{
gint len;
CamelIMAPXStoreNamespace *ns;
@@ -351,8 +355,8 @@ camel_imapx_store_summary_namespace_find_path (CamelIMAPXStoreSummary *s,
}
CamelIMAPXStoreNamespace *
-camel_imapx_store_summary_namespace_find_full (CamelIMAPXStoreSummary *s,
- const gchar *full)
+camel_imapx_store_summary_namespace_find_by_mailbox (CamelIMAPXStoreSummary *s,
+ const gchar *mailbox)
{
gint len = 0;
CamelIMAPXStoreNamespace *ns;
@@ -363,10 +367,9 @@ camel_imapx_store_summary_namespace_find_full (CamelIMAPXStoreSummary *s,
while (ns) {
if (ns->prefix)
len = strlen (ns->prefix);
- d ("find_full: comparing namespace '%s' to name '%s'\n", ns->prefix, full);
if (len == 0
- || (strncmp (ns->prefix, full, len) == 0
- && (full[len] == ns->sep || full[len] == 0)))
+ || (strncmp (ns->prefix, mailbox, len) == 0
+ && (mailbox[len] == ns->sep || mailbox[len] == 0)))
break;
ns = NULL;
}
diff --git a/camel/camel-imapx-store-summary.h b/camel/camel-imapx-store-summary.h
index 15cdbbe..b586d2d 100644
--- a/camel/camel-imapx-store-summary.h
+++ b/camel/camel-imapx-store-summary.h
@@ -96,36 +96,36 @@ CamelIMAPXStoreSummary *
/* TODO: this api needs some more work, needs to support lists */
CamelIMAPXStoreNamespace *
- camel_imapx_store_summary_namespace_find_path
+ camel_imapx_store_summary_namespace_find_by_path
(CamelIMAPXStoreSummary *s,
const gchar *path);
CamelIMAPXStoreNamespace *
- camel_imapx_store_summary_namespace_find_full
+ camel_imapx_store_summary_namespace_find_by_mailbox
(CamelIMAPXStoreSummary *s,
- const gchar *full_name);
+ const gchar *mailbox);
/* converts to/from utf8 canonical nasmes */
-gchar * camel_imapx_store_summary_full_to_path
+gchar * camel_imapx_store_summary_mailbox_to_path
(CamelIMAPXStoreSummary *s,
- const gchar *full_name,
+ const gchar *mailbox,
gchar dir_sep);
-gchar * camel_imapx_store_summary_path_to_full
+gchar * camel_imapx_store_summary_path_to_mailbox
(CamelIMAPXStoreSummary *s,
const gchar *path,
gchar dir_sep);
CamelIMAPXStoreInfo *
- camel_imapx_store_summary_full_name
+ camel_imapx_store_summary_mailbox
(CamelIMAPXStoreSummary *s,
- const gchar *full_name);
+ const gchar *mailbox);
CamelIMAPXStoreInfo *
- camel_imapx_store_summary_add_from_full
+ camel_imapx_store_summary_add_from_mailbox
(CamelIMAPXStoreSummary *s,
- const gchar *full_name,
+ const gchar *mailbox,
gchar dir_sep);
/* a convenience lookup function. always use this if path known */
-gchar * camel_imapx_store_summary_full_from_path
+gchar * camel_imapx_store_summary_mailbox_from_path
(CamelIMAPXStoreSummary *s,
const gchar *path);
diff --git a/camel/camel-imapx-store.c b/camel/camel-imapx-store.c
index 8d71ca2..7ae70dc 100644
--- a/camel/camel-imapx-store.c
+++ b/camel/camel-imapx-store.c
@@ -520,9 +520,12 @@ get_folder_offline (CamelStore *store,
si = camel_store_summary_path (store_summary, folder_name);
is_inbox = camel_imapx_mailbox_is_inbox (folder_name);
- if (si == NULL && is_inbox)
- si = (CamelStoreInfo *) camel_imapx_store_summary_full_name (
+ if (si == NULL && is_inbox) {
+ /* XXX This function takes a mailbox name but we're passing
+ * a folder path. Are they always identical for INBOX? */
+ si = (CamelStoreInfo *) camel_imapx_store_summary_mailbox (
imapx_store->summary, folder_name);
+ }
if (si != NULL) {
gchar *base_dir;
@@ -885,7 +888,7 @@ rename_folder_info (CamelIMAPXStore *imapx_store,
"%s/%s", new_name, path + olen + 1);
else
new_path = g_strdup (new_name);
- new_mailbox = camel_imapx_store_summary_path_to_full (
+ new_mailbox = camel_imapx_store_summary_path_to_mailbox (
imapx_store->summary, new_path,
imapx_store->dir_sep);
@@ -1000,9 +1003,11 @@ get_folder_info_offline (CamelStore *store,
g_free (namespace);
} else {
- name = camel_imapx_store_summary_full_from_path (imapx_store->summary, top);
+ name = camel_imapx_store_summary_mailbox_from_path (
+ imapx_store->summary, top);
if (name == NULL)
- name = camel_imapx_store_summary_path_to_full (imapx_store->summary, top,
imapx_store->dir_sep);
+ name = camel_imapx_store_summary_path_to_mailbox (
+ imapx_store->summary, top, imapx_store->dir_sep);
}
pattern = imapx_concat (imapx_store, name, "*");
@@ -1027,7 +1032,7 @@ get_folder_info_offline (CamelStore *store,
if (mailbox == NULL || *mailbox == '\0')
continue;
- ns = camel_imapx_store_summary_namespace_find_full (
+ ns = camel_imapx_store_summary_namespace_find_by_mailbox (
imapx_store->summary, mailbox);
/* Modify the checks to see match the namespaces from preferences */
@@ -1096,19 +1101,13 @@ add_folder_to_summary (CamelIMAPXStore *imapx_store,
flags = camel_imapx_list_response_get_summary_flags (response);
if (update_for_lsub) {
- gchar *full_name;
-
- full_name = camel_imapx_store_summary_path_to_full (
- imapx_store->summary, mailbox, separator);
- fi = g_hash_table_lookup (table, full_name);
+ fi = g_hash_table_lookup (table, mailbox);
if (fi != NULL)
fi->flags |= CAMEL_STORE_INFO_FOLDER_SUBSCRIBED;
- g_free (full_name);
-
return;
}
- si = camel_imapx_store_summary_add_from_full (
+ si = camel_imapx_store_summary_add_from_mailbox (
imapx_store->summary, mailbox, separator);
if (si == NULL)
return;
@@ -1335,7 +1334,7 @@ sync_folders (CamelIMAPXStore *imapx_store,
if (mailbox == NULL || *mailbox == '\0')
continue;
- ns = camel_imapx_store_summary_namespace_find_full (
+ ns = camel_imapx_store_summary_namespace_find_by_mailbox (
imapx_store->summary, mailbox);
pattern_match =
@@ -1635,20 +1634,20 @@ imapx_store_get_folder_info_sync (CamelStore *store,
}
if (*top) {
- gchar *name;
+ gchar *mailbox;
gint i;
- name = camel_imapx_store_summary_full_from_path (
+ mailbox = camel_imapx_store_summary_mailbox_from_path (
imapx_store->summary, top);
- if (name == NULL)
- name = camel_imapx_store_summary_path_to_full (
+ if (mailbox == NULL)
+ mailbox = camel_imapx_store_summary_path_to_mailbox (
imapx_store->summary, top,
imapx_store->dir_sep);
- i = strlen (name);
+ i = strlen (mailbox);
pattern = g_alloca (i + 5);
- strcpy (pattern, name);
- g_free (name);
+ strcpy (pattern, mailbox);
+ g_free (mailbox);
} else {
pattern = g_alloca (1);
pattern[0] = '\0';
@@ -1746,7 +1745,9 @@ imapx_store_create_folder_sync (CamelStore *store,
CamelIMAPXStoreNamespace *ns;
CamelIMAPXStore *imapx_store;
CamelIMAPXServer *imapx_server;
- gchar *real_name, *full_name, *parent_real;
+ gchar *mailbox;
+ gchar *child_mailbox;
+ gchar *parent_mailbox;
CamelFolderInfo *fi = NULL;
gchar dir_sep = 0;
gboolean success;
@@ -1760,7 +1761,7 @@ imapx_store_create_folder_sync (CamelStore *store,
if (parent_name == NULL)
parent_name = "";
- ns = camel_imapx_store_summary_namespace_find_path (
+ ns = camel_imapx_store_summary_namespace_find_by_path (
imapx_store->summary, parent_name);
if (ns)
dir_sep = ns->sep;
@@ -1777,9 +1778,9 @@ imapx_store_create_folder_sync (CamelStore *store,
goto exit;
}
- parent_real = camel_imapx_store_summary_full_from_path (
+ parent_mailbox = camel_imapx_store_summary_mailbox_from_path (
imapx_store->summary, parent_name);
- if (parent_real == NULL) {
+ if (parent_mailbox == NULL) {
g_set_error (
error, CAMEL_FOLDER_ERROR,
CAMEL_FOLDER_ERROR_INVALID_STATE,
@@ -1801,13 +1802,13 @@ imapx_store_create_folder_sync (CamelStore *store,
camel_store_summary_info_unref (
(CamelStoreSummary *) imapx_store->summary, si);
- real_name = camel_imapx_store_summary_path_to_full (
+ child_mailbox = camel_imapx_store_summary_path_to_mailbox (
imapx_store->summary, folder_name, dir_sep);
- full_name = imapx_concat (imapx_store, parent_real, real_name);
- g_free (real_name);
+ mailbox = imapx_concat (imapx_store, parent_mailbox, child_mailbox);
+ g_free (child_mailbox);
success = camel_imapx_server_create_folder (
- imapx_server, full_name, cancellable, error);
+ imapx_server, mailbox, cancellable, error);
if (success) {
CamelStoreSummary *summary;
@@ -1816,8 +1817,8 @@ imapx_store_create_folder_sync (CamelStore *store,
summary = CAMEL_STORE_SUMMARY (imapx_store->summary);
- si = camel_imapx_store_summary_add_from_full (
- imapx_store->summary, full_name, dir_sep);
+ si = camel_imapx_store_summary_add_from_mailbox (
+ imapx_store->summary, mailbox, dir_sep);
camel_store_summary_save (summary);
path = camel_store_info_path (summary, (CamelStoreInfo *) si);
fi = imapx_build_folder_info (imapx_store, path);
@@ -1825,8 +1826,8 @@ imapx_store_create_folder_sync (CamelStore *store,
camel_store_folder_created (store, fi);
}
- g_free (full_name);
- g_free (parent_real);
+ g_free (mailbox);
+ g_free (parent_mailbox);
exit:
g_clear_object (&imapx_server);
diff --git a/docs/reference/camel/camel-sections.txt b/docs/reference/camel/camel-sections.txt
index e6075c9..28d6a60 100644
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@ -1034,13 +1034,13 @@ CamelIMAPXStoreNamespace
CamelIMAPXNamespaceList
CamelIMAPXStoreSummary
camel_imapx_store_summary_new
-camel_imapx_store_summary_namespace_find_path
-camel_imapx_store_summary_namespace_find_full
-camel_imapx_store_summary_full_to_path
-camel_imapx_store_summary_path_to_full
-camel_imapx_store_summary_full_name
-camel_imapx_store_summary_add_from_full
-camel_imapx_store_summary_full_from_path
+camel_imapx_store_summary_namespace_find_by_path
+camel_imapx_store_summary_namespace_find_by_mailbox
+camel_imapx_store_summary_mailbox_to_path
+camel_imapx_store_summary_path_to_mailbox
+camel_imapx_store_summary_mailbox
+camel_imapx_store_summary_add_from_mailbox
+camel_imapx_store_summary_mailbox_from_path
<SUBSECTION Standard>
CAMEL_IMAPX_STORE_SUMMARY
CAMEL_IS_IMAPX_STORE_SUMMARY
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]