aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog14
-rw-r--r--camel/camel-folder-pt-proxy.c6
-rw-r--r--camel/camel-folder.c27
-rw-r--r--camel/camel-folder.h12
4 files changed, 40 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index 1892ed07f7..f7b01718bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,17 @@
1999-12-18 bertrand <Bertrand.Guiheneuf@aful.org>
- * camel/camel-folder.c (_delete): use
- exception mechanism.
+ * camel/camel-folder-pt-proxy.c (_append_message):
+ updated to take the change on append into account.
+
+ * camel/camel-folder.h:
+ updated class def concerning append.
+ * camel/camel-folder.c
+ (camel_folder_append_message): documented.
+ (camel_folder_append_message): don't return the
+ message number. Use specific methods instead.
+ (_append_message): idem.
+
+ (_delete): use exception mechanism.
(camel_folder_delete): idem.
(_delete_messages): idem.
(camel_folder_delete_messages): idem.
diff --git a/camel/camel-folder-pt-proxy.c b/camel/camel-folder-pt-proxy.c
index 8119b60755..623bf616af 100644
--- a/camel/camel-folder-pt-proxy.c
+++ b/camel/camel-folder-pt-proxy.c
@@ -93,7 +93,7 @@ static GList *_list_subfolders (CamelFolder *folder, CamelException *ex);
static GList *_expunge (CamelFolder *folder, CamelException *ex);
static CamelMimeMessage *_get_message_by_number (CamelFolder *folder, gint number, CamelException *ex);
static gint _get_message_count (CamelFolder *folder, CamelException *ex);
-static gint _append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
+static void _append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex);
static const GList *_list_permanent_flags (CamelFolder *folder, CamelException *ex);
static void _copy_message_to (CamelFolder *folder, CamelMimeMessage *message, CamelFolder *dest_folder, CamelException *ex);
@@ -724,13 +724,13 @@ _get_message_count (CamelFolder *folder, CamelException *ex)
-static gint
+static void
_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex)
{
CamelFolderPtProxy *proxy_folder;
proxy_folder = CAMEL_FOLDER_PT_PROXY (folder);
- return CF_CLASS (proxy_folder->real_folder)->
+ CF_CLASS (proxy_folder->real_folder)->
append_message (proxy_folder->real_folder, message, ex);
}
diff --git a/camel/camel-folder.c b/camel/camel-folder.c
index 93c222241f..a6e46cd0e3 100644
--- a/camel/camel-folder.c
+++ b/camel/camel-folder.c
@@ -102,7 +102,7 @@ static gboolean _delete_messages (CamelFolder *folder,
CamelException *ex);
static GList * _expunge (CamelFolder *folder,
CamelException *ex);
-static gint _append_message (CamelFolder *folder,
+static void _append_message (CamelFolder *folder,
CamelMimeMessage *message,
CamelException *ex);
static void _copy_message_to (CamelFolder *folder,
@@ -1411,34 +1411,45 @@ camel_folder_get_message_count (CamelFolder *folder, CamelException *ex)
}
-static gint
+static void
_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex)
{
if (!folder) {
camel_exception_set (ex,
CAMEL_EXCEPTION_FOLDER_NULL,
"folder object is NULL");
- return -1;
+ return;
}
CAMEL_LOG_WARNING ("Calling CamelFolder::append_message directly. "
"Should be overloaded\n");
- return -1;
+ return;
}
-gint
-camel_folder_append_message (CamelFolder *folder, CamelMimeMessage *message, CamelException *ex)
+/**
+ * camel_folder_append_message: add a message to a folder
+ * @folder: folder object to add the message to
+ * @message: message object
+ * @ex: exception object
+ *
+ * Add a message to a folder.
+ *
+ **/
+void
+camel_folder_append_message (CamelFolder *folder,
+ CamelMimeMessage *message,
+ CamelException *ex)
{
if (!folder) {
camel_exception_set (ex,
CAMEL_EXCEPTION_FOLDER_NULL,
"folder object is NULL");
- return -1;
+ return;
}
- return CF_CLASS (folder)->append_message (folder, message, ex);
+ CF_CLASS (folder)->append_message (folder, message, ex);
}
diff --git a/camel/camel-folder.h b/camel/camel-folder.h
index 77eb212888..7fd2d71cb5 100644
--- a/camel/camel-folder.h
+++ b/camel/camel-folder.h
@@ -175,10 +175,10 @@ typedef struct {
gint (*get_message_count) (CamelFolder *folder,
CamelException *ex);
- gint (*append_message) (CamelFolder *folder,
- CamelMimeMessage *message,
- CamelException *ex);
-
+ void (*append_message) (CamelFolder *folder,
+ CamelMimeMessage *message,
+ CamelException *ex);
+
const GList * (*list_permanent_flags) (CamelFolder *folder,
CamelException *ex);
@@ -260,8 +260,8 @@ CamelFolderOpenMode camel_folder_get_mode (CamelFolder *folder, CamelException *
/* message manipulation */
-gint camel_folder_append_message (CamelFolder *folder,
- CamelMimeMessage *message, CamelException *ex);
+void camel_folder_append_message (CamelFolder *folder,
+ CamelMimeMessage *message, CamelException *ex);
void camel_folder_copy_message_to (CamelFolder *folder,
CamelMimeMessage *message,
CamelFolder *dest_folder,