* buglets fixed
[modest] / src / modest-editor-window.h
index d4f59ea..d5c273a 100644 (file)
@@ -8,7 +8,7 @@
 #include <gtk/gtkwindow.h>
 
 #include "modest-ui.h"
-
+#include "modest-tny-attachment.h"
 
 G_BEGIN_DECLS
 
@@ -30,34 +30,156 @@ struct _ModestEditorWindow {
 
 struct _ModestEditorWindowClass {
        GtkWindowClass parent_class;
-       /* insert signal callback declarations, eg. */
-       /* void (* my_event) (ModestEditorWindow* obj); */
 };
 
 /* member functions */
 GType        modest_editor_window_get_type    (void) G_GNUC_CONST;
 
 
+/**
+ * modest_editor_window_new:
+ * @ui: a ModestUI instance
+ *
+ * Creates a new editor window instance which is a subclass of GtkWindow and
+ * lives in the ModestUI context *ui
+ * It uses an interface function modest_ui_new_editor_window() to create the
+ * the actual window contents (see its documentation for the interface specification)
+ *
+ * Returns: a GtkWindow* to show and populate
+ */
 GtkWidget *modest_editor_window_new         (ModestUI *ui);
 
+/**
+ * modest_editor_window_get_data:
+ * @edit_win: a ModestEditorWindow instance
+ *
+ * Retrieves the generic data pointer from the ModestEditorWindow (which
+ * the UI interface code can use to store arbitrary (state-)data in the
+ * ModestEditorWindow widget.
+ *
+ * Returns: a gpointer to the ModestEditorWindow's data store
+ */
 gpointer modest_editor_window_get_data(ModestEditorWindow *edit_win);
 
+/**
+ * modest_editor_window_set_modified:
+ * @edit_win: a ModestEditorWindow instance
+ * @modified: the modified flag for this instance
+ *
+ * Set/reset the modified flag for the instance. This flag can be used to store
+ * information whether the contents of the editor window was modified by the
+ * user or not. If it was modified (see also modest_editor_window_get_modified())
+ * a dialog can be presented to ask the user for confirmation.
+ *
+ * Returns: gboolean the new state of the modified flag
+ */
+gboolean modest_editor_window_set_modified(ModestEditorWindow *edit_win, gboolean modified);
+
+/**
+ * modest_editor_window_get_modified:
+ * @edit_win: a ModestEditorWindow instance
+ *
+ * Gets the state of the modified-flag of this instance. This flag can be used to store
+ * information whether the contents of the editor window was modified by the
+ * user or not. If it was modified (see also modest_editor_window_set_modified())
+ * a dialog can be presented to ask the user for confirmation.
+ *
+ * Returns: gboolean the new state of the modified flag
+ */
 gboolean modest_editor_window_get_modified(ModestEditorWindow *edit_win);
 
-/* fill in other public functions, eg.: */
-/*     void       modest_editor_window_do_something (ModestEditorWindow *self, const gchar* param); */
-/*     gboolean   modest_editor_window_has_foo      (ModestEditorWindow *self, gint value); */
-
-gboolean modest_editor_window_set_to_header(ModestEditorWindow *edit_win, gchar *to);
-
-gboolean modest_editor_window_set_cc_header(ModestEditorWindow *edit_win, gchar *to);
-
-gboolean modest_editor_window_set_bcc_header(ModestEditorWindow *edit_win, gchar *to);
-
-gboolean modest_editor_window_set_subject_header(ModestEditorWindow *edit_win, gchar *to);
-
-gboolean modest_editor_window_set_body(ModestEditorWindow *edit_win, gchar *to);
-
+/**
+ * modest_editor_window_set_to_header:
+ * @edit_win: a ModestEditorWindow instance
+ * @to: The "To:" header string for this editor instance
+ *
+ * Sets the "To:" header to the string *to
+ *
+ * Returns: TRUE on success, FALSE otherwise
+ */
+gboolean modest_editor_window_set_to_header(ModestEditorWindow *edit_win, const gchar *to);
+
+/**
+ * modest_editor_window_set_cc_header:
+ * @edit_win: a ModestEditorWindow instance
+ * @cc: The "CC:" header string for this editor instance
+ *
+ * Sets the "CC:" header to the string *cc
+ *
+ * Returns: TRUE on success, FALSE otherwise
+ */
+gboolean modest_editor_window_set_cc_header(ModestEditorWindow *edit_win, const gchar *cc);
+
+/**
+ * modest_editor_window_set_bcc_header:
+ * @edit_win: a ModestEditorWindow instance
+ * @bcc: The "BCC:" header string for this editor instance
+ *
+ * Sets the "BCC:" header to the string *bcc
+ *
+ * Returns: TRUE on success, FALSE otherwise
+ */
+gboolean modest_editor_window_set_bcc_header(ModestEditorWindow *edit_win, const gchar *bcc);
+
+/**
+ * modest_editor_window_set_subject_header:
+ * @edit_win: a ModestEditorWindow instance
+ * @subject: The "Subject:" header string for this editor instance
+ *
+ * Sets the "Subject:" header to the string *subject
+ *
+ * Returns: TRUE on success, FALSE otherwise
+ */
+gboolean modest_editor_window_set_subject_header(ModestEditorWindow *edit_win, const gchar *subject);
+
+/**
+ * modest_editor_window_set_body:
+ * @edit_win: a ModestEditorWindow instance
+ * @body: The message body string for this editor instance
+ *
+ * Sets the message body to the string *body
+ *
+ * Returns: TRUE on success, FALSE otherwise
+ */
+gboolean modest_editor_window_set_body(ModestEditorWindow *edit_win, const gchar *body);
+
+/**
+ * modest_editor_window_attach_file:
+ * @edit_win: a ModestEditorWindow instance
+ * @filename: The name of the file to attach
+ *
+ * Attaches the file "filename" to the message contents
+ *
+ * Returns: TRUE on success, FALSE otherwise
+ */
+gboolean modest_editor_window_attach_file(ModestEditorWindow *edit_win, ModestTnyAttachment *attachment);
+
+/**
+ * modest_editor_window_set_attachments:
+ * @edit_win: a ModestEditorWindow instance
+ * @attachments: a list of attachments
+ *
+ * Frees the current attachments, then sets the list of attachments to *attachments
+ *
+ * Returns: The new GList* of attachments.
+ */
+GList * modest_editor_window_set_attachments(ModestEditorWindow *edit_win, const GList* attachments);
+
+/**
+ * modest_editor_window_get_attachments:
+ * @edit_win: a ModestEditorWindow instance
+ *
+ * Gets the GList* of attachments of this instance
+ *
+ * Returns: The GList* of attachments of this instance
+ */
+GList * modest_editor_window_get_attachments(ModestEditorWindow *edit_win);
+
+void modest_editor_window_set_identity(ModestEditorWindow *edit_win, const gchar *identity);
+const gchar * modest_editor_window_get_identity(ModestEditorWindow *edit_win);
+
+void modest_editor_window_set_transport(ModestEditorWindow *edit_win, const gchar *transport);
+const gchar * modest_editor_window_get_transport(ModestEditorWindow *edit_win);
 G_END_DECLS
 
 #endif /* __MODEST_EDITOR_WINDOW_H__ */