[evolution-data-server] I#271 - Maildir: Allow not to have colons in data filenames



commit 8512cb9c7eceb6771f23c1c10be78b450cc4595c
Author: Milan Crha <mcrha redhat com>
Date:   Mon Dec 7 19:32:42 2020 +0100

    I#271 - Maildir: Allow not to have colons in data filenames
    
    Locate the corresponding Maildir .source file in ~/.config/evolution/sources/
    and change in it:
    
      [Maildir Backend]
      MaildirAltFlagSep=false
    
    to
    
      [Maildir Backend]
      MaildirAltFlagSep=true
    
    to use an alternative flag separator in the file name.
    
    Closes https://gitlab.gnome.org/GNOME/evolution-data-server/-/issues/271

 src/camel/camel-local-settings.c                  | 78 +++++++++++++++++++++
 src/camel/camel-local-settings.h                  |  5 ++
 src/camel/providers/local/camel-maildir-folder.c  |  7 +-
 src/camel/providers/local/camel-maildir-store.c   | 32 ++++++++-
 src/camel/providers/local/camel-maildir-store.h   |  1 +
 src/camel/providers/local/camel-maildir-summary.c | 83 ++++++++++++++++++-----
 src/camel/providers/local/camel-maildir-summary.h | 28 +++++---
 7 files changed, 202 insertions(+), 32 deletions(-)
---
diff --git a/src/camel/camel-local-settings.c b/src/camel/camel-local-settings.c
index 2114a09f6..f79177bea 100644
--- a/src/camel/camel-local-settings.c
+++ b/src/camel/camel-local-settings.c
@@ -24,12 +24,14 @@ struct _CamelLocalSettingsPrivate {
        gchar *path;
        gboolean filter_all;
        gboolean filter_junk;
+       gboolean maildir_alt_flag_sep;
 };
 
 enum {
        PROP_0,
        PROP_FILTER_ALL,
        PROP_FILTER_JUNK,
+       PROP_MAILDIR_ALT_FLAG_SEP,
        PROP_PATH
 };
 
@@ -57,6 +59,12 @@ local_settings_set_property (GObject *object,
                                g_value_get_boolean (value));
                        return;
 
+               case PROP_MAILDIR_ALT_FLAG_SEP:
+                       camel_local_settings_set_maildir_alt_flag_sep (
+                               CAMEL_LOCAL_SETTINGS (object),
+                               g_value_get_boolean (value));
+                       return;
+
                case PROP_PATH:
                        camel_local_settings_set_path (
                                CAMEL_LOCAL_SETTINGS (object),
@@ -88,6 +96,13 @@ local_settings_get_property (GObject *object,
                                CAMEL_LOCAL_SETTINGS (object)));
                        return;
 
+               case PROP_MAILDIR_ALT_FLAG_SEP:
+                       g_value_set_boolean (
+                               value,
+                               camel_local_settings_get_maildir_alt_flag_sep (
+                               CAMEL_LOCAL_SETTINGS (object)));
+                       return;
+
                case PROP_PATH:
                        g_value_take_string (
                                value,
@@ -162,6 +177,19 @@ camel_local_settings_class_init (CamelLocalSettingsClass *class)
                        G_PARAM_CONSTRUCT |
                        G_PARAM_EXPLICIT_NOTIFY |
                        G_PARAM_STATIC_STRINGS));
+
+       g_object_class_install_property (
+               object_class,
+               PROP_MAILDIR_ALT_FLAG_SEP,
+               g_param_spec_boolean (
+                       "maildir-alt-flag-sep",
+                       "Maildir Alt Flag Sep",
+                       "Whether to use alternative flag separator in Maildir file name",
+                       FALSE,
+                       G_PARAM_READWRITE |
+                       G_PARAM_CONSTRUCT |
+                       G_PARAM_EXPLICIT_NOTIFY |
+                       G_PARAM_STATIC_STRINGS));
 }
 
 static void
@@ -350,3 +378,53 @@ camel_local_settings_set_filter_junk (CamelLocalSettings *settings,
 
        g_object_notify (G_OBJECT (settings), "filter-junk");
 }
+
+/**
+ * camel_local_settings_get_maildir_alt_flag_sep:
+ * @settings: a #CamelLocalSettings
+ *
+ * Returns, whether the Maildir provider should use alternative
+ * flag separator in the file name. When %TRUE, uses an exclamation
+ * mark (!), when %FALSE, uses the colon (:). The default
+ * is %FALSE, to be consistent with the Maildir specification.
+ * The flag separator is flipped on the Windows build.
+ *
+ * Returns: whether the Maildir provider should use an alternative flag separator
+ *
+ * Since: 3.40
+ **/
+gboolean
+camel_local_settings_get_maildir_alt_flag_sep (CamelLocalSettings *settings)
+{
+       g_return_val_if_fail (CAMEL_IS_LOCAL_SETTINGS (settings), FALSE);
+
+       return settings->priv->maildir_alt_flag_sep;
+}
+
+/**
+ * camel_local_settings_set_maildir_alt_flag_sep:
+ * @settings: a #CamelLocalSettings
+ * @maildir_alt_flag_sep: value to set
+ *
+ * Sets whether Maildir should use alternative flag separator.
+ * See camel_local_settings_get_maildir_alt_flag_sep() for more
+ * information on what it means.
+ *
+ * Note: Change to this setting takes effect only for newly created
+ *     Maildir stores.
+ *
+ * Since: 3.40
+ **/
+void
+camel_local_settings_set_maildir_alt_flag_sep (CamelLocalSettings *settings,
+                                              gboolean maildir_alt_flag_sep)
+{
+       g_return_if_fail (CAMEL_IS_LOCAL_SETTINGS (settings));
+
+       if ((settings->priv->maildir_alt_flag_sep ? 1 : 0) == (maildir_alt_flag_sep ? 1 : 0))
+               return;
+
+       settings->priv->maildir_alt_flag_sep = maildir_alt_flag_sep;
+
+       g_object_notify (G_OBJECT (settings), "maildir-alt-flag-sep");
+}
diff --git a/src/camel/camel-local-settings.h b/src/camel/camel-local-settings.h
index 04c705e41..1c7f536a8 100644
--- a/src/camel/camel-local-settings.h
+++ b/src/camel/camel-local-settings.h
@@ -86,6 +86,11 @@ gboolean     camel_local_settings_get_filter_junk
 void           camel_local_settings_set_filter_junk
                                                (CamelLocalSettings *settings,
                                                 gboolean filter_junk);
+gboolean       camel_local_settings_get_maildir_alt_flag_sep
+                                               (CamelLocalSettings *settings);
+void           camel_local_settings_set_maildir_alt_flag_sep
+                                               (CamelLocalSettings *settings,
+                                                gboolean maildir_alt_flag_sep);
 
 G_END_DECLS
 
diff --git a/src/camel/providers/local/camel-maildir-folder.c 
b/src/camel/providers/local/camel-maildir-folder.c
index 89007a025..79fa41389 100644
--- a/src/camel/providers/local/camel-maildir-folder.c
+++ b/src/camel/providers/local/camel-maildir-folder.c
@@ -98,7 +98,7 @@ maildir_folder_get_filename (CamelFolder *folder,
        CamelLocalFolder *lf = (CamelLocalFolder *) folder;
        CamelMaildirMessageInfo *mdi;
        CamelMessageInfo *info;
-       gchar *res;
+       gchar *res, filename_flag_sep;
 
        /* get the message summary info */
        if ((info = camel_folder_summary_get (camel_folder_get_folder_summary (folder), uid)) == NULL) {
@@ -108,6 +108,7 @@ maildir_folder_get_filename (CamelFolder *folder,
                return NULL;
        }
 
+       filename_flag_sep = camel_maildir_summary_get_filename_flag_sep (CAMEL_MAILDIR_SUMMARY 
(camel_folder_get_folder_summary (folder)));
        mdi = CAMEL_MAILDIR_MESSAGE_INFO (info);
 
        /* If filename is NULL, it means folder_summary_check is not yet executed.
@@ -130,7 +131,7 @@ maildir_folder_get_filename (CamelFolder *folder,
                                gint uid_len = strlen (info_uid);
 
                                while (filename = g_dir_read_name (dir), filename) {
-                                       if (g_str_has_prefix (filename, info_uid) && (filename[uid_len] == 
'\0' || filename[uid_len] == CAMEL_MAILDIR_FLAG_SEP)) {
+                                       if (g_str_has_prefix (filename, info_uid) && (filename[uid_len] == 
'\0' || filename[uid_len] == filename_flag_sep)) {
                                                camel_maildir_message_info_take_filename (mdi, g_strdup 
(filename));
                                                break;
                                        }
@@ -431,7 +432,7 @@ maildir_folder_create_summary (CamelLocalFolder *lf,
                                CamelIndex *index)
 {
        return (CamelLocalSummary *) camel_maildir_summary_new (
-               CAMEL_FOLDER (lf), folder, index);
+               CAMEL_FOLDER (lf), folder, index, 0);
 }
 
 static void
diff --git a/src/camel/providers/local/camel-maildir-store.c b/src/camel/providers/local/camel-maildir-store.c
index 19d817f68..34e6a3427 100644
--- a/src/camel/providers/local/camel-maildir-store.c
+++ b/src/camel/providers/local/camel-maildir-store.c
@@ -50,6 +50,7 @@
        } G_STMT_END
 
 struct _CamelMaildirStorePrivate {
+       gchar filename_flag_sep;
        gboolean already_migrated;
        gboolean can_escape_dots;
 };
@@ -448,6 +449,7 @@ fill_fi (CamelStore *store,
                CamelLocalSettings *local_settings;
                CamelSettings *settings;
                CamelService *service;
+               CamelMaildirStore *maildir_store;
                gchar *folderpath, *dir_name;
                CamelFolderSummary *s;
                gchar *root;
@@ -461,8 +463,10 @@ fill_fi (CamelStore *store,
 
                g_object_unref (settings);
 
+               maildir_store = CAMEL_MAILDIR_STORE (store);
+
                /* This should be fast enough not to have to test for INFO_FAST */
-               dir_name = maildir_full_name_to_dir_name (CAMEL_MAILDIR_STORE (store)->priv->can_escape_dots, 
fi->full_name);
+               dir_name = maildir_full_name_to_dir_name (maildir_store->priv->can_escape_dots, 
fi->full_name);
 
                if (!strcmp (dir_name, "."))
                        folderpath = g_strdup (root);
@@ -471,7 +475,7 @@ fill_fi (CamelStore *store,
 
                g_free (root);
 
-               s = (CamelFolderSummary *) camel_maildir_summary_new (NULL, folderpath, NULL);
+               s = (CamelFolderSummary *) camel_maildir_summary_new (NULL, folderpath, NULL, 
camel_maildir_store_get_filename_flag_sep (maildir_store));
                if (camel_folder_summary_header_load (s, store, fi->full_name, NULL)) {
                        fi->unread = camel_folder_summary_get_unread_count (s);
                        fi->total = camel_folder_summary_get_saved_count (s);
@@ -1368,3 +1372,27 @@ done:
        camel_folder_info_free (topfi);
        g_free (meta_path);
 }
+
+gchar
+camel_maildir_store_get_filename_flag_sep (CamelMaildirStore *maildir_store)
+{
+       g_return_val_if_fail (CAMEL_IS_MAILDIR_STORE (maildir_store), CAMEL_MAILDIR_FILENAME_FLAG_SEP);
+
+       /* Populate the value on the first access. It's too early in the constructed(),
+          the settings might not be read there yet. */
+       if (!maildir_store->priv->filename_flag_sep) {
+               CamelSettings *settings;
+
+               settings = camel_service_ref_settings (CAMEL_SERVICE (maildir_store));
+
+               if (camel_local_settings_get_maildir_alt_flag_sep (CAMEL_LOCAL_SETTINGS (settings))) {
+                       maildir_store->priv->filename_flag_sep = CAMEL_MAILDIR_FILENAME_FLAG_SEP_ALT;
+               } else {
+                       maildir_store->priv->filename_flag_sep = CAMEL_MAILDIR_FILENAME_FLAG_SEP;
+               }
+
+               g_clear_object (&settings);
+       }
+
+       return maildir_store->priv->filename_flag_sep;
+}
diff --git a/src/camel/providers/local/camel-maildir-store.h b/src/camel/providers/local/camel-maildir-store.h
index dbae0dad5..8c386edb7 100644
--- a/src/camel/providers/local/camel-maildir-store.h
+++ b/src/camel/providers/local/camel-maildir-store.h
@@ -60,6 +60,7 @@ struct _CamelMaildirStoreClass {
 };
 
 GType camel_maildir_store_get_type (void);
+gchar camel_maildir_store_get_filename_flag_sep (CamelMaildirStore *maildir_store);
 
 G_END_DECLS
 
diff --git a/src/camel/providers/local/camel-maildir-summary.c 
b/src/camel/providers/local/camel-maildir-summary.c
index 973e5a791..a7749eb11 100644
--- a/src/camel/providers/local/camel-maildir-summary.c
+++ b/src/camel/providers/local/camel-maildir-summary.c
@@ -37,6 +37,7 @@
 #include <glib/gi18n-lib.h>
 
 #include "camel-maildir-message-info.h"
+#include "camel-maildir-store.h"
 #include "camel-maildir-summary.h"
 
 #define d(x) /*(printf("%s(%d): ", __FILE__, __LINE__),(x))*/
@@ -79,6 +80,7 @@ typedef struct _CamelMaildirMessageContentInfo CamelMaildirMessageContentInfo;
 struct _CamelMaildirSummaryPrivate {
        gchar *current_file;
        gchar *hostname;
+       gchar filename_flag_sep;
 
        GHashTable *load_map;
        GMutex summary_lock;
@@ -167,21 +169,41 @@ camel_maildir_summary_init (CamelMaildirSummary *maildir_summary)
 CamelMaildirSummary *
 camel_maildir_summary_new (struct _CamelFolder *folder,
                           const gchar *maildirdir,
-                          CamelIndex *index)
+                          CamelIndex *index,
+                          gchar filename_flag_sep)
 {
        CamelMaildirSummary *o;
 
        o = g_object_new (CAMEL_TYPE_MAILDIR_SUMMARY, "folder", folder, NULL);
+
+       o->priv->filename_flag_sep = filename_flag_sep;
+
        if (folder) {
                CamelStore *parent_store;
 
                parent_store = camel_folder_get_parent_store (folder);
                camel_db_set_collate (camel_store_get_db (parent_store), "dreceived", NULL, NULL);
+
+               if (!filename_flag_sep)
+                       o->priv->filename_flag_sep = camel_maildir_store_get_filename_flag_sep 
(CAMEL_MAILDIR_STORE (parent_store));
        }
+
+       if (!o->priv->filename_flag_sep)
+               o->priv->filename_flag_sep = CAMEL_MAILDIR_FILENAME_FLAG_SEP;
+
        camel_local_summary_construct ((CamelLocalSummary *) o, maildirdir, index);
        return o;
 }
 
+/* Flag separator used for this summary in the filename. */
+gchar
+camel_maildir_summary_get_filename_flag_sep (CamelMaildirSummary *maildir_summary)
+{
+       g_return_val_if_fail (CAMEL_IS_MAILDIR_SUMMARY (maildir_summary), CAMEL_MAILDIR_FILENAME_FLAG_SEP);
+
+       return maildir_summary->priv->filename_flag_sep;
+}
+
 /* the 'standard' maildir flags.  should be defined in sorted order. */
 static struct {
        gchar flag;
@@ -197,16 +219,19 @@ static struct {
 
 /* convert the uid + flags into a unique:info maildir format */
 gchar *
-camel_maildir_summary_uid_and_flags_to_name (const gchar *uid,
+camel_maildir_summary_uid_and_flags_to_name (CamelMaildirSummary *maildir_summary,
+                                            const gchar *uid,
                                             guint32 flags)
 {
-       gchar *p, *buf;
+       gchar *p, *buf, filename_flag_sep;
        gint i;
 
        g_return_val_if_fail (uid != NULL, NULL);
 
-       buf = g_alloca (strlen (uid) + strlen (CAMEL_MAILDIR_FLAG_SEP_S "2,") + G_N_ELEMENTS (flagbits) + 1);
-       p = buf + sprintf (buf, "%s" CAMEL_MAILDIR_FLAG_SEP_S "2,", uid);
+       filename_flag_sep = maildir_summary ? maildir_summary->priv->filename_flag_sep : 
CAMEL_MAILDIR_FILENAME_FLAG_SEP;
+
+       buf = g_alloca (strlen (uid) + 1 /* flag_sep */ + 2 /* "2," */ + G_N_ELEMENTS (flagbits) + 1);
+       p = buf + sprintf (buf, "%s%c2,", uid, filename_flag_sep);
        for (i = 0; i < G_N_ELEMENTS (flagbits); i++) {
                if ((flags & flagbits[i].flagbit) != 0)
                        *p++ = flagbits[i].flag;
@@ -220,11 +245,20 @@ camel_maildir_summary_uid_and_flags_to_name (const gchar *uid,
 gchar *
 camel_maildir_summary_info_to_name (const CamelMessageInfo *info)
 {
+       CamelFolderSummary *summary;
+       gchar *res;
+
        g_return_val_if_fail (CAMEL_IS_MESSAGE_INFO (info), NULL);
 
-       return camel_maildir_summary_uid_and_flags_to_name (
+       summary = camel_message_info_ref_summary (info);
+
+       res = camel_maildir_summary_uid_and_flags_to_name (CAMEL_MAILDIR_SUMMARY (summary),
                camel_message_info_get_uid (info),
                camel_message_info_get_flags (info));
+
+       g_clear_object (&summary);
+
+       return res;
 }
 
 /* returns whether the @info changed */
@@ -232,11 +266,21 @@ gboolean
 camel_maildir_summary_name_to_info (CamelMessageInfo *info,
                                    const gchar *name)
 {
-       gchar *p, c;
+       CamelFolderSummary *summary;
+       gchar *p, c, pattern[4];
        guint32 set = 0;        /* what we set */
        gint i;
 
-       p = strstr (name, CAMEL_MAILDIR_FLAG_SEP_S "2,");
+       summary = camel_message_info_ref_summary (info);
+
+       pattern[0] = camel_maildir_summary_get_filename_flag_sep (CAMEL_MAILDIR_SUMMARY (summary));
+       pattern[1] = '2';
+       pattern[2] = ',';
+       pattern[3] = '\0';
+
+       g_clear_object (&summary);
+
+       p = strstr (name, pattern);
 
        if (p) {
                guint32 flags;
@@ -388,7 +432,7 @@ maildir_summary_next_uid_string (CamelFolderSummary *s)
        if (mds->priv->current_file) {
                gchar *cln;
 
-               cln = strchr (mds->priv->current_file, CAMEL_MAILDIR_FLAG_SEP);
+               cln = strchr (mds->priv->current_file, mds->priv->filename_flag_sep);
                if (cln)
                        return g_strndup (mds->priv->current_file, cln - mds->priv->current_file);
                else
@@ -461,7 +505,7 @@ maildir_summary_load (CamelLocalSummary *cls,
                        continue;
 
                /* map the filename -> uid */
-               uid = strchr (d->d_name, CAMEL_MAILDIR_FLAG_SEP);
+               uid = strchr (d->d_name, mds->priv->filename_flag_sep);
                if (uid) {
                        gint len = uid - d->d_name;
                        uid = camel_mempool_alloc (pool, len + 1);
@@ -561,6 +605,7 @@ maildir_summary_check (CamelLocalSummary *cls,
        struct dirent *d;
        gchar *p;
        CamelFolderSummary *s = (CamelFolderSummary *) cls;
+       CamelMaildirSummary *mds;
        GHashTable *left;
        gint i, count, total;
        gint forceindex;
@@ -569,7 +614,9 @@ maildir_summary_check (CamelLocalSummary *cls,
        struct _remove_data rd = { cls, changes, NULL };
        GPtrArray *known_uids;
 
-       g_mutex_lock (&((CamelMaildirSummary *) cls)->priv->summary_lock);
+       mds = CAMEL_MAILDIR_SUMMARY (s);
+
+       g_mutex_lock (&mds->priv->summary_lock);
 
        new = g_strdup_printf ("%s/new", cls->folder_path);
        cur = g_strdup_printf ("%s/cur", cls->folder_path);
@@ -591,7 +638,7 @@ maildir_summary_check (CamelLocalSummary *cls,
                g_free (cur);
                g_free (new);
                camel_operation_pop_message (cancellable);
-               g_mutex_unlock (&((CamelMaildirSummary *) cls)->priv->summary_lock);
+               g_mutex_unlock (&mds->priv->summary_lock);
                return -1;
        }
 
@@ -636,7 +683,7 @@ maildir_summary_check (CamelLocalSummary *cls,
                        continue;
 
                /* map the filename -> uid */
-               uid = strchr (d->d_name, CAMEL_MAILDIR_FLAG_SEP);
+               uid = strchr (d->d_name, mds->priv->filename_flag_sep);
                if (uid)
                        uid = g_strndup (d->d_name, uid - d->d_name);
                else
@@ -665,7 +712,7 @@ maildir_summary_check (CamelLocalSummary *cls,
                        info = camel_folder_summary_peek_loaded ((CamelFolderSummary *) cls, uid);
                        mdi = info ? CAMEL_MAILDIR_MESSAGE_INFO (info) : NULL;
 
-                       expected_filename = camel_maildir_summary_uid_and_flags_to_name (uid, stored_flags);
+                       expected_filename = camel_maildir_summary_uid_and_flags_to_name (mds, uid, 
stored_flags);
                        if ((mdi && !camel_maildir_message_info_get_filename (mdi)) ||
                            !expected_filename ||
                            strcmp (expected_filename, d->d_name) != 0) {
@@ -735,7 +782,7 @@ maildir_summary_check (CamelLocalSummary *cls,
                        } else {
                                gchar *nm;
                                newname = g_strdup (name);
-                               nm =strrchr (newname, CAMEL_MAILDIR_FLAG_SEP);
+                               nm = strrchr (newname, mds->priv->filename_flag_sep);
                                if (nm)
                                        *nm = '\0';
                                destname = newname;
@@ -743,7 +790,7 @@ maildir_summary_check (CamelLocalSummary *cls,
 
                        /* copy this to the destination folder, use 'standard' semantics for maildir info 
field */
                        src = g_strdup_printf ("%s/%s", new, name);
-                       destfilename = g_strdup_printf ("%s" CAMEL_MAILDIR_FLAG_SEP_S "2,", destname);
+                       destfilename = g_strdup_printf ("%s%c2,", destname, mds->priv->filename_flag_sep);
                        dest = g_strdup_printf ("%s/%s", cur, destfilename);
 
                        /* FIXME: This should probably use link/unlink */
@@ -774,7 +821,7 @@ maildir_summary_check (CamelLocalSummary *cls,
        g_free (cur);
 
        camel_folder_summary_free_array (known_uids);
-       g_mutex_unlock (&((CamelMaildirSummary *) cls)->priv->summary_lock);
+       g_mutex_unlock (&mds->priv->summary_lock);
 
        return 0;
 }
@@ -830,7 +877,7 @@ maildir_summary_sync (CamelLocalSummary *cls,
                        if (mdi) {
                                mdi_filename = camel_maildir_message_info_get_filename (mdi);
                        } else {
-                               tmp = camel_maildir_summary_uid_and_flags_to_name (uid, flags);
+                               tmp = camel_maildir_summary_uid_and_flags_to_name (CAMEL_MAILDIR_SUMMARY 
(cls), uid, flags);
                                mdi_filename = tmp;
                        }
 
diff --git a/src/camel/providers/local/camel-maildir-summary.h 
b/src/camel/providers/local/camel-maildir-summary.h
index 0afb99e9d..eb25f2e14 100644
--- a/src/camel/providers/local/camel-maildir-summary.h
+++ b/src/camel/providers/local/camel-maildir-summary.h
@@ -42,11 +42,11 @@
        ((obj), CAMEL_TYPE_MAILDIR_SUMMARY, CamelMaildirSummaryClass))
 
 #ifdef G_OS_WIN32
-#define CAMEL_MAILDIR_FLAG_SEP '!'
-#define CAMEL_MAILDIR_FLAG_SEP_S "!"
+#define CAMEL_MAILDIR_FILENAME_FLAG_SEP '!'
+#define CAMEL_MAILDIR_FILENAME_FLAG_SEP_ALT ':'
 #else
-#define CAMEL_MAILDIR_FLAG_SEP ':'
-#define CAMEL_MAILDIR_FLAG_SEP_S ":"
+#define CAMEL_MAILDIR_FILENAME_FLAG_SEP ':'
+#define CAMEL_MAILDIR_FILENAME_FLAG_SEP_ALT '!'
 #endif
 
 G_BEGIN_DECLS
@@ -67,13 +67,23 @@ struct _CamelMaildirSummaryClass {
        gpointer reserved[20];
 };
 
-GType   camel_maildir_summary_get_type (void);
-CamelMaildirSummary    *camel_maildir_summary_new      (struct _CamelFolder *folder, const gchar 
*maildirdir, CamelIndex *index);
+GType          camel_maildir_summary_get_type          (void);
+CamelMaildirSummary *
+               camel_maildir_summary_new               (struct _CamelFolder *folder,
+                                                        const gchar *maildirdir,
+                                                        CamelIndex *index,
+                                                        gchar filename_flag_sep);
+gchar          camel_maildir_summary_get_filename_flag_sep
+                                                       (CamelMaildirSummary *maildir_summary);
 
 /* convert some info->flags to/from the messageinfo */
-gchar *camel_maildir_summary_info_to_name (const CamelMessageInfo *info);
-gchar *camel_maildir_summary_uid_and_flags_to_name (const gchar *uid, guint32 flags);
-gboolean camel_maildir_summary_name_to_info (CamelMessageInfo *info, const gchar *name);
+gchar *                camel_maildir_summary_info_to_name      (const CamelMessageInfo *info);
+gchar *                camel_maildir_summary_uid_and_flags_to_name
+                                                       (CamelMaildirSummary *maildir_summary,
+                                                        const gchar *uid,
+                                                        guint32 flags);
+gboolean       camel_maildir_summary_name_to_info      (CamelMessageInfo *info,
+                                                        const gchar *name);
 
 G_END_DECLS
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]