Fix modest_tny_msg_header_get_all_recipients_list (in case from is empty)
[modest] / src / modest-progress-object.c
index 11d1c5c..a13fe99 100644 (file)
@@ -33,18 +33,47 @@ 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);
+}
+
+
 static void
 modest_progress_object_base_init (gpointer g_class)
 {
@@ -77,4 +106,3 @@ modest_progress_object_get_type (void)
        }
        return my_type;
 }
-