[PATCH] resubmission for the add-tny_camel_send_queue_new_with_folders() patch



Hello,
 
   This patch allow to create a sendqueue with user-supplied outbox and sentbox

Regards,

--
Martin
Index: libtinymail-camel/tny-camel-send-queue.c
===================================================================
--- libtinymail-camel/tny-camel-send-queue.c	(révision 3788)
+++ libtinymail-camel/tny-camel-send-queue.c	(copie de travail)
@@ -1297,6 +1297,30 @@
 	return TNY_SEND_QUEUE (self);
 }
 
+/**
+ * tny_camel_send_queue_new_with_folders:
+ * @trans_account: A #TnyCamelTransportAccount instance
+ *
+ * Create a new #TnySendQueue instance implemented for Camel,
+ * Using custom-supplied outbox and sentbox
+ *
+ * Return value: A new #TnySendQueue instance implemented for Camel
+ **/
+TnySendQueue*
+tny_camel_send_queue_new_with_folders (TnyCamelTransportAccount *trans_account, TnyFolder *outbox, TnyFolder *sentbox)
+{
+	TnyCamelSendQueue *self = g_object_new (TNY_TYPE_CAMEL_SEND_QUEUE, NULL);
+	TnyCamelSendQueuePriv *priv = TNY_CAMEL_SEND_QUEUE_GET_PRIVATE (self);
+
+	g_assert (TNY_IS_CAMEL_TRANSPORT_ACCOUNT (trans_account));
+	priv->outbox_cache  = g_object_ref(outbox);
+	priv->sentbox_cache = g_object_ref(sentbox);
+	tny_camel_send_queue_set_transport_account (self, trans_account);
+
+	return TNY_SEND_QUEUE (self);
+}
+
+
 static void
 on_setonline_happened (TnyCamelAccount *account, gboolean online, gpointer user_data)
 {
Index: libtinymail-camel/tny-camel-send-queue.h
===================================================================
--- libtinymail-camel/tny-camel-send-queue.h	(révision 3788)
+++ libtinymail-camel/tny-camel-send-queue.h	(copie de travail)
@@ -60,6 +60,8 @@
 
 TnySendQueue* tny_camel_send_queue_new (TnyCamelTransportAccount *trans_account);
 
+TnySendQueue* tny_camel_send_queue_new_with_folders (TnyCamelTransportAccount *trans_account, TnyFolder *outbox, TnyFolder *sentbox);
+
 void tny_camel_send_queue_flush (TnyCamelSendQueue *self);
 
 TnyCamelTransportAccount* tny_camel_send_queue_get_transport_account (TnyCamelSendQueue *self);
Index: ChangeLog
===================================================================
--- ChangeLog	(révision 3788)
+++ ChangeLog	(copie de travail)
@@ -1,3 +1,9 @@
+2008-10-26  Rob Taylor  <rob taylor codethink co uk>
+	    & Martin Bonnin  <martinbonnin gmail com>
+
+	* Re-submission for the add-tny_camel_send_queue_new_with_folders() patch:
+	It allows to create a Camel SendQueue with user-supplied outbox and sendbox
+
 2008-10-24  Rob Taylor  <rob taylor codethink co uk>
 	    & Martin Bonnin  <martinbonnin gmail com>
 


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