From acd6bafa58cf5fdea4814e51aac175a99894a373 Mon Sep 17 00:00:00 2001 From: bertrand Date: Fri, 17 Sep 1999 20:34:22 +0000 Subject: added notify io_channel. new func. run the next operation. 1999-09-17 bertrand * 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 --- camel/camel-op-queue.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) (limited to 'camel/camel-op-queue.c') 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; +} -- cgit v1.2.3