2007-06-14 Murray Cumming <murrayc@murrayc.com>
[modest] / src / widgets / modest-header-view.h
index 76a7672..ac213ff 100644 (file)
 #define __MODEST_HEADER_VIEW_H__
 
 #include <tny-folder.h>
+#include <tny-folder-change.h>
 #include <tny-gtk-account-list-model.h>
 #include <tny-msg.h>
 #include <tny-header.h>
 #include <tny-gtk-header-list-model.h>
+#include "modest-mail-operation.h"
 
 G_BEGIN_DECLS
 
@@ -115,12 +117,10 @@ struct _ModestHeaderViewClass {
                                  TnyHeader *header,
                                  gpointer user_data);
 
-       /* msg == NULL implies that the operation is finished, ie.
-        * the progress indictation can be hidden */
-       void (*status_update) (ModestHeaderView* self,
-                              const gchar* msg,
-                              gint num, gint total,
-                              gpointer user_data);
+       void (*msg_count_changed) (ModestHeaderView* self,
+                                  TnyFolder *folder,
+                                  TnyFolderChange *change,
+                                  gpointer user_data);
 };
 
 /**
@@ -154,7 +154,9 @@ GtkWidget*   modest_header_view_new        (TnyFolder *folder,
  * set the folder for this ModestHeaderView
  */
 void         modest_header_view_set_folder (ModestHeaderView *self,
-                                           TnyFolder *folder);
+                                           TnyFolder *folder,
+                                           RefreshAsyncUserCallback callback,
+                                           gpointer user_data);
 
 /**
  * modest_header_view_get_folder:
@@ -170,7 +172,7 @@ TnyFolder *modest_header_view_get_folder (ModestHeaderView *self);
 /**
  * modest_header_view_set_columns:
  * @self: a ModestHeaderView instance
- * @columns: a list of ModestHeaderViewColumn
+ * @columns: a list of gint ModestHeaderViewColumn column IDs, using GINT_TO_POINTER() and GPOINTER_TO_INT().
  * @type: #TnyFolderType type
  * 
  * set the columns for this ModestHeaderView.
@@ -316,6 +318,15 @@ modest_header_view_sort_by_column_id (ModestHeaderView *self,
                                      guint sort_colid,
                                      GtkSortType sort_type);
 
+/**
+ * modest_header_view_clear:
+ * @self: a #ModestHeaderView
+ *
+ * Clear the contents of a header view. It internally calls the
+ * set_folder function with last three arguments as NULL
+ **/
+void
+modest_header_view_clear (ModestHeaderView *self);
 
 G_END_DECLS