* began work on quoting html messages. I use an ugly hack to get the text from the...
[modest] / src / modest-account-mgr.h
index f050635..fc3e46f 100644 (file)
@@ -93,17 +93,16 @@ gboolean        modest_account_mgr_remove_account         (ModestAccountMgr *sel
 /**
  * modest_account_mgr_add_server_account:
  * @self: a ModestAccountMgr instance
+ * @name: name (id) of the account
  * @hostname: the hostname
  * @username: the username
  * @password: the password
- * @proto:    the prototype
- * @err: a GError ptr, or NULL to ignore.
+ * @proto:    the protocol (imap, smtp, ...) used for this account
  * 
- * add a server account to the configuration
+ * add a server account to the configuration.
  * the server account with @name should not already exist
- *
- * Returns: TRUE if  succeeded, FALSE otherwise,
- * @err gives details in case of error
+ * 
+ * Returns: TRUE if succeeded, FALSE otherwise,
  */
 gboolean modest_account_mgr_add_server_account    (ModestAccountMgr *self,
                                                   const gchar *name,
@@ -127,7 +126,47 @@ gboolean modest_account_mgr_add_server_account    (ModestAccountMgr *self,
 gboolean        modest_account_mgr_remove_server_account    (ModestAccountMgr *self,
                                                             const gchar *name,
                                                             GError **err);
+                                                                /**
+ * modest_account_mgr_remove_identity:
+ * @self: a ModestAccountMgr instance
+ * @name: the name for the identity
+ * @err: a GError ptr, or NULL to ignore.
+ * 
+ * remove aidentity from the configuration
+ * the identity with @name should exist
+ *
+ * Returns: TRUE if the removal succeeded, FALSE otherwise,
+ * @err gives details in case of error
+ */
+gboolean        modest_account_mgr_remove_identity (ModestAccountMgr *self,
+                                                            const gchar *name,
+                                                            GError **err);
+
+/**
+ * modest_account_mgr_add_identity:
+ * @self: a ModestAccountMgr instance
+ * @name: the name (id) for the identity
+ * @email: the user's email address
+ * @replyto: default replyto address
+ * @signature: the signature for this identity
+ * @use_signature: whether to use this signature instead of the default one
+ * @id_via: the transport to send emails for this identity via
+ * @use_id_via: whether to use this via insteda of the default one
+ * 
+ * add a user identity to the configuration
+ * 
+ * Returns: TRUE if  succeeded, FALSE otherwise,
+ */
 
+gboolean
+modest_account_mgr_add_identity (ModestAccountMgr *self,
+                      const gchar *name,
+                                         const gchar *email,
+                                         const gchar *replyto,
+                                         const gchar *signature,
+                      const gboolean use_signature,
+                      const gchar *id_via,
+                      const gboolean use_id_via);
 
 /**
  * modest_account_mgr_account_names:
@@ -175,6 +214,10 @@ GSList*  modest_account_mgr_server_account_names   (ModestAccountMgr *self,
 gboolean       modest_account_mgr_account_exists         (ModestAccountMgr *self,
                                                           const gchar *name,
                                                           GError **err);
+gboolean       modest_account_mgr_server_account_exists          (ModestAccountMgr *self,
+                                                                  const gchar *name,
+                                                                  GError **err);
+
 
 /* account specific functions */
 
@@ -195,6 +238,15 @@ gboolean   modest_account_mgr_account_exists         (ModestAccountMgr *self,
 gchar*         modest_account_mgr_get_account_string     (ModestAccountMgr *self,
                                                           const gchar *name,
                                                           const gchar *key, GError **err);
+
+gchar*         modest_account_mgr_get_server_account_string     (ModestAccountMgr *self,
+                                                          const gchar *name,
+                                                          const gchar *key, GError **err);
+gchar*         modest_account_mgr_get_identity_string     (ModestAccountMgr *self,
+                                                          const gchar *name,
+                                                          const gchar *key, GError **err);
+
+
 /**
  * modest_account_mgr_get_account_int:
  * @self: self a ModestAccountMgr instance
@@ -211,6 +263,9 @@ gchar*              modest_account_mgr_get_account_string     (ModestAccountMgr *self
 gint           modest_account_mgr_get_account_int        (ModestAccountMgr *self,
                                                           const gchar *name,
                                                           const gchar *key, GError **err);
+gint           modest_account_mgr_get_server_account_int        (ModestAccountMgr *self,
+                                                          const gchar *name,
+                                                          const gchar *key, GError **err);
 
 
 /**
@@ -230,6 +285,9 @@ gboolean    modest_account_mgr_get_account_bool       (ModestAccountMgr *self,
                                                           const gchar *name,
                                                           const gchar *key, GError **err);
 
+gboolean       modest_account_mgr_get_server_account_bool       (ModestAccountMgr *self,
+                                                                 const gchar *name,
+                                                                 const gchar *key, GError **err);
 
 /**
  * modest_account_mgr_set_account_string:
@@ -248,6 +306,13 @@ gboolean   modest_account_mgr_set_account_string     (ModestAccountMgr *self,
                                                           const gchar *name,
                                                           const gchar *key, const gchar* val,
                                                           GError **err);
+
+gboolean       modest_account_mgr_set_server_account_string     (ModestAccountMgr *self,
+                                                          const gchar *name,
+                                                          const gchar *key, const gchar* val,
+                                                          GError **err);
+
+
 /**
  * modest_account_mgr_set_account_int:
  * @self: self a ModestAccountMgr instance
@@ -265,6 +330,12 @@ gboolean   modest_account_mgr_set_account_int        (ModestAccountMgr *self,
                                                           const gchar *name,
                                                           const gchar *key, gint val,
                                                           GError **err);
+gboolean       modest_account_mgr_set_server_account_int        (ModestAccountMgr *self,
+                                                                 const gchar *name,
+                                                                 const gchar *key, gint val,
+                                                                 GError **err);
+
+
 
 /**
  * modest_account_mgr_set_account_bool:
@@ -283,7 +354,12 @@ gboolean   modest_account_mgr_set_account_bool       (ModestAccountMgr *self,
                                                           const gchar *name,
                                                           const gchar *key, gboolean val,
                                                           GError **err);
+gboolean       modest_account_mgr_set_server_account_bool       (ModestAccountMgr *self,
+                                                                 const gchar *name,
+                                                                 const gchar *key, gboolean val,
+                                                                 GError **err);
+
+
 G_END_DECLS
 
 #endif /* __MODEST_ACCOUNT_MGR_H__ */
-