aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-op-queue.c
diff options
context:
space:
mode:
authorbertrand <Bertrand.Guiheneuf@aful.org>1999-09-18 04:34:22 +0800
committerBertrand Guiheneuf <bertrand@src.gnome.org>1999-09-18 04:34:22 +0800
commitacd6bafa58cf5fdea4814e51aac175a99894a373 (patch)
treebc215f1df9b512eee2823969a2b796650574eafd /camel/camel-op-queue.c
parent63039bb99edd9f8c7aea9ef4ce8700d713b01354 (diff)
downloadgsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.tar
gsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.tar.gz
gsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.tar.bz2
gsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.tar.lz
gsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.tar.xz
gsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.tar.zst
gsoc2013-evolution-acd6bafa58cf5fdea4814e51aac175a99894a373.zip
added notify io_channel. new func. run the next operation.
1999-09-17 bertrand <Bertrand.Guiheneuf@aful.org> * camel/camel-folder-pt-proxy.c (_init_with_store): added notify io_channel. * (camel_op_queue_run_next_op): new func. run the next operation. svn path=/trunk/; revision=1236
Diffstat (limited to 'camel/camel-op-queue.c')
-rw-r--r--camel/camel-op-queue.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/camel/camel-op-queue.c b/camel/camel-op-queue.c
index 5549a40de1..c58ade9958 100644
--- a/camel/camel-op-queue.c
+++ b/camel/camel-op-queue.c
@@ -83,7 +83,28 @@ camel_op_queue_pop_op (CamelOpQueue *queue)
op = queue->ops_tail;
queue->ops_tail = queue->ops_tail->prev;
- return op;
+ return (CamelOp *)op->data;
}
+/**
+ * camel_op_queue_run_next_op: run the next pending operation
+ * @queue: queue object
+ *
+ * Run the next pending operation in the queue.
+ *
+ * Return value: TRUE if an operation was launched FALSE if there was no operation pending in the queue.
+ **/
+gboolean
+camel_op_queue_run_next_op (CamelOpQueue *queue)
+{
+ CamelOp *op;
+
+ op = camel_op_queue_pop_op (queue);
+ if (!op) return FALSE;
+
+ /* run the operation */
+ op->op_func (op->param);
+
+ return FALSE;
+}