From bc6046b8f1bb7c50cae563c08cb9d55c956ff38b Mon Sep 17 00:00:00 2001 From: Not Zed Date: Thu, 18 Mar 2004 04:55:10 +0000 Subject: added interface to find out if various fields or server options are 2004-03-18 Not Zed * e-account.c (e_account_writable, e_account_writable_option): added interface to find out if various fields or server options are writable. to work around gconf limitations. svn path=/trunk/; revision=25109 --- e-util/e-account.h | 67 ++++++++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 58 insertions(+), 9 deletions(-) (limited to 'e-util/e-account.h') diff --git a/e-util/e-account.h b/e-util/e-account.h index e50c773991..2066e9fcfa 100644 --- a/e-util/e-account.h +++ b/e-util/e-account.h @@ -28,6 +28,51 @@ #define E_IS_ACCOUNT(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), E_TYPE_ACCOUNT)) #define E_IS_ACCOUNT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), E_TYPE_ACCOUNT)) +typedef enum _e_account_item_t { + E_ACCOUNT_ID_NAME, + E_ACCOUNT_ID_ADDRESS, + E_ACCOUNT_ID_REPLY_TO, + E_ACCOUNT_ID_ORGANIZATION, + E_ACCOUNT_ID_DEF_SIGNATURE, /* why aren't these two options the same? */ + E_ACCOUNT_ID_AUTO_SIGNATURE, + + E_ACCOUNT_SOURCE_URL, + E_ACCOUNT_SOURCE_KEEP_ON_SERVER, + E_ACCOUNT_SOURCE_AUTO_CHECK, + E_ACCOUNT_SOURCE_AUTO_CHECK_TIME, + E_ACCOUNT_SOURCE_SAVE_PASSWD, + + E_ACCOUNT_TRANSPORT_URL, + E_ACCOUNT_TRANSPORT_SAVE_PASSWD, + + E_ACCOUNT_DRAFTS_FOLDER_URI, + E_ACCOUNT_SENT_FOLDER_URI, + + E_ACCOUNT_CC_ALWAYS, + E_ACCOUNT_CC_ADDRS, + + E_ACCOUNT_BCC_ALWAYS, + E_ACCOUNT_BCC_ADDRS, + + E_ACCOUNT_PGP_KEY, + E_ACCOUNT_PGP_ENCRYPT_TO_SELF, + E_ACCOUNT_PGP_ALWAYS_SIGN, + E_ACCOUNT_PGP_NO_IMIP_SIGN, + E_ACCOUNT_PGP_ALWAYS_TRUST, + + E_ACCOUNT_SMIME_SIGN_KEY, + E_ACCOUNT_SMIME_ENCRYPT_KEY, + E_ACCOUNT_SMIME_SIGN_DEFAULT, + E_ACCOUNT_SMIME_ENCRYPT_TO_SELF, + E_ACCOUNT_SMIME_ENCRYPE_DEFAULT, + + E_ACCOUNT_ITEM_LAST +} e_account_item_t; + +typedef enum _e_account_access_t { + E_ACCOUNT_ACCESS_WRITE = 1<<0, +} e_account_access_t; + typedef struct { char *name; char *address; @@ -46,7 +91,6 @@ typedef struct { gboolean save_passwd; } EAccountService; - typedef struct { GObject parent_object; @@ -90,17 +134,22 @@ GType e_account_get_type (void); EAccount *e_account_new (void); EAccount *e_account_new_from_xml (const char *xml); - -gboolean e_account_set_from_xml (EAccount *account, - const char *xml); - -void e_account_import (EAccount *dest, - EAccount *src); - +gboolean e_account_set_from_xml (EAccount *account, const char *xml); +void e_account_import (EAccount *dest, EAccount *src); char *e_account_to_xml (EAccount *account); +char *e_account_uid_from_xml (const char *xml); +#if 0 +const char *e_account_get_string(EAccount *, e_account_item_t type); +int e_account_get_int(EAccount *, e_account_item_t type); +gboolean e_account_get_bool(EAccount *, e_account_item_t type); -char *e_account_uid_from_xml (const char *xml); +void e_account_set_string(EAccount *, e_account_item_t type, const char *); +void e_account_set_int(EAccount *, e_account_item_t type, const char *); +void e_account_set_bool(EAccount *, e_account_item_t type, const char *); +#endif +gboolean e_account_writable(EAccount *ea, e_account_item_t type); +gboolean e_account_writable_option(EAccount *ea, const char *protocol, const char *option); #endif /* __E_ACCOUNT__ */ -- cgit v1.2.3