* let the dbus-invoked msgs use the same uids as other messages,
[modest] / src / widgets / modest-msg-view-window.h
index b029a51..d2c9f0b 100644 (file)
@@ -51,8 +51,11 @@ typedef struct {
        
 typedef struct {
        ModestWindowClass parent_class;
-       /* insert signal callback declarations, eg. */
-       /* void (* my_event) (ModestEditMsgWindow* obj); */
+
+       void (*msg_changed) (ModestMsgViewWindow *self,
+                            GtkTreeModel *model,
+                            GtkTreeRowReference *row_reference, 
+                            gpointer user_data);
 } ModestMsgViewWindowClass;
 
 /**
@@ -75,7 +78,9 @@ GType        modest_msg_view_window_get_type    (void) G_GNUC_CONST;
  *
  * Returns: a new #ModestMsgViewWindow, or NULL in case of error
  */
-ModestWindow*   modest_msg_view_window_new         (TnyMsg *msg, const gchar *account);
+ModestWindow*   modest_msg_view_window_new         (TnyMsg *msg, 
+                                                   const gchar *account,
+                                                   const gchar *msg_uid);
 
 /**
  * modest_msg_view_window_new_with_header_model:
@@ -93,6 +98,7 @@ ModestWindow*   modest_msg_view_window_new         (TnyMsg *msg, const gchar *ac
  */
 ModestWindow*   modest_msg_view_window_new_with_header_model (TnyMsg *msg, 
                                                              const gchar *account, 
+                                                             const gchar *msg_uid,
                                                              GtkTreeModel *model, 
                                                              GtkTreeRowReference *row_reference);
 
@@ -113,7 +119,8 @@ modest_msg_view_window_get_header (ModestMsgViewWindow *self);
  * modest_msg_view_window_get_message:
  * @window: an #ModestMsgViewWindow instance
  * 
- * get the message in this msg view
+ * get a new reference to the message in this msg view. The caller
+ * must free this new reference
  * 
  * Returns: a new #TnyMsg instance, or NULL in case of error
  */
@@ -184,6 +191,14 @@ void            modest_msg_view_window_view_attachment (ModestMsgViewWindow *win
                                                        TnyMimePart *mime_part);
 
 /**
+ * modest_msg_view_window_get_attachments:
+ * @window: a #ModestMsgViewWindow
+ *
+ * Get selected attachments from #ModetMsgView private object.  
+ */
+GList *         modest_msg_view_window_get_attachments (ModestMsgViewWindow *win);
+
+/**
  * modest_msg_view_window_save_attachments:
  * @window: a #ModestMsgViewWindow
  * @mime_parts: a #GList of #TnyMimePart
@@ -197,13 +212,69 @@ void            modest_msg_view_window_save_attachments (ModestMsgViewWindow *wi
 /**
  * modest_msg_view_window_remove_attachments:
  * @window: a #ModestMsgViewWindow
- * @mime_parts: a #GList of #TnyMimePart
+ * @get_all: a #gboolean. If %TRUE, purges all attachmnents, if %FALSE,
+ * purges only selected ones.
  *
- * Removes the attachments in @mime_parts, or currently selected attachments
- * if @mime_parts is %NULL, from local storage.
+ * Removes selected attachments.
  */
 void            modest_msg_view_window_remove_attachments (ModestMsgViewWindow *window,
-                                                          GList *mime_parts);
+                                                          gboolean get_all);
+
+
+/**
+ * modest_msg_view_window_toolbar_on_transfer_mode:
+ * @window: a #ModestMsgViewWindow
+ *
+ * Check if toolbar is in transfer mode, which determines whether a
+ * transfer operation is being processed.
+ */
+gboolean  modest_msg_view_window_toolbar_on_transfer_mode     (ModestMsgViewWindow *self);
+
+
+/**
+ * modest_msg_view_window_last_message_selected:
+ * @window: a #ModestMsgViewWindow
+ *
+ * Check message currently viewed is the last message into folder . 
+*/
+gboolean modest_msg_view_window_last_message_selected (ModestMsgViewWindow *window); 
+
+
+/**
+ * modest_msg_view_window_first_message_selected:
+ * @window: a #ModestMsgViewWindow
+ *
+ * Check message currently viewed is the last message into folder . 
+*/
+gboolean modest_msg_view_window_first_message_selected (ModestMsgViewWindow *window);
+
+/**
+ * modest_msg_view_window_has_headers_model:
+ * @window: a #ModestMsgViewWindow
+ *
+ * Check if window has been created with a full headers model. 
+*/
+gboolean modest_msg_view_window_has_headers_model (ModestMsgViewWindow *window);
+
+/**
+ * modest_msg_view_window_get_folder_type:
+ * @window: a #ModestMsgViewWindow
+ *
+ * Gets folder type of message currently viewed . 
+*/
+TnyFolderType
+modest_msg_view_window_get_folder_type (ModestMsgViewWindow *window);
+
+/**
+ * modest_msg_view_window_transfer_mode_enabled:
+ * @window: a #ModestMsgViewWindow
+ *
+ * Determines if some transfer operation is in progress.
+ *
+ * Returns: TRUE if transfer mode is enabled, FASE otherwise.
+*/
+gboolean 
+modest_msg_view_window_transfer_mode_enabled (ModestMsgViewWindow *self);
 
 G_END_DECLS