X-Git-Url: http://git.maemo.org/git/?p=modest;a=blobdiff_plain;f=src%2Fmodest-progress-object.c;h=a13fe9947c10820960540116e1c050ed234f54c1;hp=6de34517c2e0f088aac2aca66ace7927daa5e54e;hb=4d39841513a3a7f7aa9d38ab97cb9fcc9171e80b;hpb=cd1ae71abedf78491c1f34d1fb1a772064d87b8e diff --git a/src/modest-progress-object.c b/src/modest-progress-object.c index 6de3451..a13fe99 100644 --- a/src/modest-progress-object.c +++ b/src/modest-progress-object.c @@ -33,33 +33,43 @@ static void modest_progress_object_base_init (gpointer g_class); void modest_progress_object_add_operation (ModestProgressObject *self, - ModestMailOperation *mail_op) + ModestMailOperation *mail_op) { + g_return_if_fail (MODEST_IS_PROGRESS_OBJECT(self)); + return MODEST_PROGRESS_OBJECT_GET_IFACE (self)->add_operation_func (self, mail_op); } void modest_progress_object_remove_operation (ModestProgressObject *self, - ModestMailOperation *mail_op) + ModestMailOperation *mail_op) { + g_return_if_fail (MODEST_IS_PROGRESS_OBJECT(self)); + return MODEST_PROGRESS_OBJECT_GET_IFACE (self)->remove_operation_func (self, mail_op); } void modest_progress_object_cancel_current_operation (ModestProgressObject *self) { + g_return_if_fail (MODEST_IS_PROGRESS_OBJECT(self)); + return MODEST_PROGRESS_OBJECT_GET_IFACE (self)->cancel_current_operation_func (self); } void modest_progress_object_cancel_all_operations (ModestProgressObject *self) { + g_return_if_fail (MODEST_IS_PROGRESS_OBJECT(self)); + return MODEST_PROGRESS_OBJECT_GET_IFACE (self)->cancel_all_operations_func (self); } guint modest_progress_object_num_pending_operations (ModestProgressObject *self) { + g_return_val_if_fail (MODEST_IS_PROGRESS_OBJECT(self), 0); + return MODEST_PROGRESS_OBJECT_GET_IFACE (self)->num_pending_operations_func (self); }