aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>1999-09-06 04:08:23 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-09-06 04:08:23 +0800
commit116b88eb5d75445872130fc253bfa97d6be08d77 (patch)
tree76ac26b49f1fef7a33708f2694e830444fb8a553
parent1ee21a1820a06e6512eb82e17f75894d252a7257 (diff)
downloadgsoc2013-evolution-116b88eb5d75445872130fc253bfa97d6be08d77.tar.gz
gsoc2013-evolution-116b88eb5d75445872130fc253bfa97d6be08d77.tar.zst
gsoc2013-evolution-116b88eb5d75445872130fc253bfa97d6be08d77.zip
Basic UID framework.
1999-09-05 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-folder.c (camel_folder_has_uid_capability): (camel_folder_get_message_uid): (camel_folder_get_message_uid_by_number): (camel_folder_get_message_by_uid): (camel_folder_get_uid_list): Basic UID framework. svn path=/trunk/; revision=1181
-rw-r--r--ChangeLog7
-rw-r--r--camel/camel-folder.c80
-rw-r--r--camel/camel-folder.h12
3 files changed, 98 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 04e6c0b89e..b805d6e720 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
1999-09-05 bertrand <Bertrand.Guiheneuf@aful.org>
+ * camel/camel-folder.c (camel_folder_has_uid_capability):
+ (camel_folder_get_message_uid):
+ (camel_folder_get_message_uid_by_number):
+ (camel_folder_get_message_by_uid):
+ (camel_folder_get_uid_list):
+ Basic UID framework.
+
* devel-docs/misc/ref_and_id_proposition.txt:
New revision. Some fixes.
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index f70fa6f342..a21ce9a236 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -56,9 +56,15 @@ static gint _append_message (CamelFolder *folder, CamelMimeMessage *message);
static const GList *_list_permanent_flags (CamelFolder *folder);
static void _copy_message_to (CamelFolder *folder, CamelMimeMessage *message, CamelFolder *dest_folder);
+static gchar *_get_message_uid (CamelFolder *folder, CamelMimeMessage *message);
+static gchar *_get_message_uid_by_number (CamelFolder *folder, gint message_number);
+static CamelMimeMessage *_get_message_by_uid (CamelFolder *folder, gchar *uid);
+static GList *_get_uid_list (CamelFolder *folder);
+
static void _finalize (GtkObject *object);
+
static void
camel_folder_class_init (CamelFolderClass *camel_folder_class)
{
@@ -90,6 +96,10 @@ camel_folder_class_init (CamelFolderClass *camel_folder_class)
camel_folder_class->append_message = _append_message;
camel_folder_class->list_permanent_flags = _list_permanent_flags;
camel_folder_class->copy_message_to;
+ camel_folder_class->get_message_uid = _get_message_uid;
+ camel_folder_class->get_message_uid_by_number = _get_message_uid_by_number;
+ camel_folder_class->get_message_by_uid = _get_message_by_uid;
+ camel_folder_class->get_uid_list = _get_uid_list;
/* virtual method overload */
gtk_object_class->finalize = _finalize;
@@ -992,3 +1002,73 @@ camel_folder_get_summary (CamelFolder *folder)
{
return folder->summary;
}
+
+
+
+
+/* UIDs stuff */
+
+gboolean
+camel_folder_has_uid_capability (CamelFolder *folder)
+{
+ return folder->has_uid_capability;
+}
+
+
+static gchar *
+_get_message_uid (CamelFolder *folder, CamelMimeMessage *message)
+{
+ return NULL;
+}
+
+gchar *
+camel_folder_get_message_uid (CamelFolder *folder, CamelMimeMessage *message)
+{
+ if (!folder->has_uid_capability) return NULL;
+ return CF_CLASS (folder)->get_message_uid (folder, message);
+}
+
+
+static gchar *
+_get_message_uid_by_number (CamelFolder *folder, gint message_number)
+{
+ return NULL;
+}
+
+gchar *
+camel_folder_get_message_uid_by_number (CamelFolder *folder, gint message_number)
+{
+ if (!folder->has_uid_capability) return NULL;
+ return CF_CLASS (folder)->get_message_uid_by_number (folder, message_number);
+}
+
+
+static CamelMimeMessage *
+_get_message_by_uid (CamelFolder *folder, gchar *uid)
+{
+ return NULL;
+}
+
+
+CamelMimeMessage *
+camel_folder_get_message_by_uid (CamelFolder *folder, gchar *uid)
+{
+ if (!folder->has_uid_capability) return NULL;
+ return CF_CLASS (folder)->get_message_by_uid (folder, uid);
+}
+
+static GList *
+_get_uid_list (CamelFolder *folder)
+{
+ return NULL;
+}
+
+GList *
+camel_folder_get_uid_list (CamelFolder *folder)
+{
+ if (!folder->has_uid_capability) return NULL;
+ return CF_CLASS (folder)->get_uid_list (folder);
+}
+
+
+/* **** */
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
index 3a9d99d3a8..443186803e 100644
--- a/camel/camel-folder.h
+++ b/camel/camel-folder.h
@@ -77,7 +77,6 @@ struct _CamelFolder
gboolean has_uid_capability;
-
GList *message_list;
};
@@ -114,6 +113,11 @@ typedef struct {
const GList * (*list_permanent_flags) (CamelFolder *folder);
void (*copy_message_to) (CamelFolder *folder, CamelMimeMessage *message, CamelFolder *dest_folder);
+ gchar * (*get_message_uid) (CamelFolder *folder, CamelMimeMessage *message);
+ gchar * (*get_message_uid_by_number) (CamelFolder *folder, gint message_number);
+ CamelMimeMessage * (*get_message_by_uid) (CamelFolder *folder, gchar *uid);
+ GList * (*get_uid_list) (CamelFolder *folder);
+
} CamelFolderClass;
@@ -149,6 +153,12 @@ gboolean camel_folder_has_summary_capability (CamelFolder *folder);
CamelFolderSummary *camel_folder_get_summary (CamelFolder *folder);
+gboolean camel_folder_has_uid_capability (CamelFolder *folder);
+gchar * camel_folder_get_message_uid (CamelFolder *folder, CamelMimeMessage *message);
+gchar * camel_folder_get_message_uid_by_number (CamelFolder *folder, gint message_number);
+CamelMimeMessage *camel_folder_get_message_by_uid (CamelFolder *folder, gchar *uid);
+GList *camel_folder_get_uid_list (CamelFolder *folder);
+
#ifdef __cplusplus
}
#endif /* __cplusplus */