GError *err,
gpointer user_data);
+static void _on_queue_start (TnySendQueue *self,
+ gpointer user_data);
+
static void modest_tny_send_queue_add_async (TnyCamelSendQueue *self,
TnyMsg *msg,
TnySendQueueAddCallback callback,
TnyStatusCallback status_callback,
gpointer user_data);
+
static TnyFolder* modest_tny_send_queue_get_outbox (TnySendQueue *self);
static TnyFolder* modest_tny_send_queue_get_sentbox (TnySendQueue *self);
g_signal_connect (G_OBJECT(self), "error-happened",
G_CALLBACK(_on_msg_error_happened),
NULL);
+ g_signal_connect (G_OBJECT (self), "queue-start",
+ G_CALLBACK (_on_queue_start),
+ NULL);
/* Set outbox and sentbox */
priv = MODEST_TNY_SEND_QUEUE_GET_PRIVATE (self);
}
static void
+_on_queue_start (TnySendQueue *self,
+ gpointer data)
+{
+ ModestMailOperation *mail_op;
+
+ mail_op = modest_mail_operation_new (NULL);
+ modest_mail_operation_queue_add (modest_runtime_get_mail_operation_queue (),
+ mail_op);
+ modest_mail_operation_run_queue (mail_op, MODEST_TNY_SEND_QUEUE (self));
+ g_object_unref (mail_op);
+}
+
+static void
fill_list_of_caches (gpointer key, gpointer value, gpointer userdata)
{
GSList **send_queues = (GSList **) userdata;