Fix modest_tny_msg_header_get_all_recipients_list (in case from is empty)
[modest] / src / modest-address-book.h
index 75a1a9a..cdd231c 100644 (file)
 #ifndef __MODEST_ADDRESS_BOOK_H__
 #define __MODEST_ADDRESS_BOOK_H__
 
+#include <gtk/gtkwindow.h>
 #include <glib.h>
+#include <widgets/modest-recpt-editor.h>
+
+/**
+ * modest_address_book_init:
+ *
+ * initializes the addressbook
+ */
+void
+modest_address_book_init (void);
 
 /**
  * modest_address_book_add_address:
@@ -47,12 +57,46 @@ modest_address_book_add_address (const gchar *address);
  * modest_address_book_select_addresses:
  * 
  * Shows a dialog to select some addresses from the 
- * address book.
+ * address book. It adds them to the recipient editor
+ *
+ */
+void
+modest_address_book_select_addresses (ModestRecptEditor *editor,
+                                     GtkWindow *parent_window);
+
+/**
+ * modest_address_book_check_names:
+ * @editor: a #ModestRecptEditor
+ * @update_addressbook: if TRUE, add valid addresses to the addressbook, recent list
+ * 
+ * Performs verification of addresses in a recipient editor.
+ *
+ * Returns: %TRUE if all recipients are valid or there are
+ * no recipients, %FALSE otherwise.
+ */
+gboolean
+modest_address_book_check_names (ModestRecptEditor *editor, gboolean update_addressbook);
+
+/**
+ * modest_address_book_has_address:
+ * @address: a string
+ *
+ * Checks if an address is already stored in addressbook.
  *
- * Returns: a string with the addresses
+ * Returns: %TRUE is @address is in addressbook. %FALSE otherwise.
  */
-gchar *
-modest_address_book_select_addresses (void);
+gboolean
+modest_address_book_has_address (const gchar *address);
 
+/**
+ * modest_address_book_get_my_name:
+ * @:
+ *
+ * Returns user name from user's own vcard
+ *
+ * Returns: the user full name
+ **/
+const gchar *
+modest_address_book_get_my_name ();
 
 #endif /* __MODEST_ADDRESS_BOOK_H__ */