X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-mail-operation-queue.h;h=9f0cd253831a3a5d65177f84270996a59c7b8427;hp=302c378489404701e4b419ff877b3cebe3625824;hb=aae23d8d941e2023b6158db1795bfbe4e3e54673;hpb=cc36ea20ffc9bc9dbd884f511db9bae55f4d97ca diff --git a/src/modest-mail-operation-queue.h b/src/modest-mail-operation-queue.h index 302c378..9f0cd25 100644 --- a/src/modest-mail-operation-queue.h +++ b/src/modest-mail-operation-queue.h @@ -64,8 +64,11 @@ struct _ModestMailOperationQueueClass { void (*queue_changed) (ModestMailOperationQueue *self, ModestMailOperation *mail_op, ModestMailOperationQueueNotification type); + + void (*queue_empty) (ModestMailOperationQueue *self); }; + /* member functions */ GType modest_mail_operation_queue_get_type (void) G_GNUC_CONST; @@ -114,11 +117,55 @@ void modest_mail_operation_queue_cancel (ModestMailOperationQueue *op_que /** * modest_mail_operation_queue_cancel_all: * @op_queue: a #ModestMailOperationQueue - * + * * Cancels all the unfinished #ModestMailOperation of the queue **/ void modest_mail_operation_queue_cancel_all (ModestMailOperationQueue *op_queue); +/** + * modest_mail_operation_queue_get_by_source: + * @op_queue: a #ModestMailOperationQueue + * @source: the source of the operations + * + * Returns a list with the #ModestMailOperation that have the given + * source. Each #ModestMailOperation is getting a new reference so you + * MUST unref it when done + **/ +GSList* modest_mail_operation_queue_get_by_source (ModestMailOperationQueue *op_queue, GObject *source); + + +/** + * modest_mail_operation_queue_queue_to_string: + * @op_queue: a #ModestMailOperationQueue + * + * Returns a string representation of the operation queue (for debugging) + * + * Returns: a newly allocated string, or NULL in case of error + **/ +gchar* modest_mail_operation_queue_to_string (ModestMailOperationQueue *self); + +/** + * modest_mail_operation_queue_set_running_shutdown: + * @self: a #ModestMailOperationQueue + * + * Mark the queue as running the final sync. + * + */ +void +modest_mail_operation_queue_set_running_shutdown (ModestMailOperationQueue *self); + +/** + * modest_mail_operation_queue_running_shutdown: + * @self: a #ModestMailOperationQueue + * + * Is the last operation queued a shutdown operation? + * + * Returns: a #gboolean, %TRUE if the last queued operation is + * a shutdown, %FALSE otherwise + */ +gboolean +modest_mail_operation_queue_running_shutdown (ModestMailOperationQueue *self); + G_END_DECLS #endif /* __MODEST_MAIL_OPERATION_QUEUE_H__ */