## EAccount

EAccount

## Synopsis

    enum                e_account_item_t;
    enum                e_account_access_t;
                        EAccount;
                        EAccountIdentity;
    enum                EAccountReceiptPolicy;
                        EAccountService;
    EAccount *          e_account_new                       (void);
    EAccount *          e_account_new_from_xml              (const gchar *xml);
    gboolean            e_account_set_from_xml              (EAccount *account,
                                                             const gchar *xml);
    void                e_account_import                    (EAccount *dest,
                                                             EAccount *src);
    gchar *             e_account_to_xml                    (EAccount *account);
    gchar *             e_account_uid_from_xml              (const gchar *xml);
    const gchar *       e_account_get_string                (EAccount *account,
                                                             e_account_item_t type);
    gint                e_account_get_int                   (EAccount *account,
                                                             e_account_item_t type);
    gboolean            e_account_get_bool                  (EAccount *account,
                                                             e_account_item_t type);
    void                e_account_set_string                (EAccount *account,
                                                             e_account_item_t type,
                                                             const gchar *v_string);
    void                e_account_set_int                   (EAccount *account,
                                                             e_account_item_t type,
                                                             gint v_int);
    void                e_account_set_bool                  (EAccount *account,
                                                             e_account_item_t type,
                                                             gboolean v_bool);
    gboolean            e_account_writable                  (EAccount *account,
                                                             e_account_item_t type);
    gboolean            e_account_writable_option           (EAccount *account,
                                                             const gchar *protocol,
                                                             const gchar *option);

## Object Hierarchy

      GObject
       +----EAccount

## Signals

      "changed"                                        : Run Last

## Description

## Details

### enum e_account_item_t

    typedef enum _e_account_item_t {
    	E_ACCOUNT_NAME,

    	E_ACCOUNT_ID_NAME,
    	E_ACCOUNT_ID_ADDRESS,
    	E_ACCOUNT_ID_REPLY_TO,
    	E_ACCOUNT_ID_ORGANIZATION,
    	E_ACCOUNT_ID_SIGNATURE,

    	E_ACCOUNT_SOURCE_URL, /* what about separating out host/user/path settings??  sigh */
    	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_RECEIPT_POLICY,

    	E_ACCOUNT_PGP_KEY,
    	E_ACCOUNT_PGP_HASH_ALGORITHM,
    	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_HASH_ALGORITHM,
    	E_ACCOUNT_SMIME_SIGN_DEFAULT,
    	E_ACCOUNT_SMIME_ENCRYPT_TO_SELF,
    	E_ACCOUNT_SMIME_ENCRYPT_DEFAULT,

    	E_ACCOUNT_PROXY_PARENT_UID,

    	E_ACCOUNT_ITEM_LAST
    } e_account_item_t;

### enum e_account_access_t

    typedef enum _e_account_access_t {
    	E_ACCOUNT_ACCESS_WRITE = 1<<0
    } e_account_access_t;

### EAccount

    typedef struct _EAccount EAccount;

### EAccountIdentity

    typedef struct {
    	gchar *name;
    	gchar *address;
    	gchar *reply_to;
    	gchar *organization;

    	gchar *sig_uid;
    } EAccountIdentity;

### enum EAccountReceiptPolicy

    typedef enum _EAccountReceiptPolicy {
    	E_ACCOUNT_RECEIPT_NEVER,
    	E_ACCOUNT_RECEIPT_ASK,
    	E_ACCOUNT_RECEIPT_ALWAYS
    } EAccountReceiptPolicy;

### EAccountService

    typedef struct {
    	gchar *url;
    	gboolean keep_on_server;
    	gboolean auto_check;
    	gint auto_check_time;
    	gboolean save_passwd;
    	gboolean get_password_canceled;
    } EAccountService;

### e_account_new ()

    EAccount *          e_account_new                       (void);

Returns : | a blank new account which can be filled in and added to an EAccountList.

### e_account_new_from_xml ()

    EAccount *          e_account_new_from_xml              (const gchar *xml);

`xml` : | an XML account description
Returns : | a new EAccount based on the data in `xml`, or `NULL` if `xml` could not be parsed as valid account data.

### e_account_set_from_xml ()

    gboolean            e_account_set_from_xml              (EAccount *account,
                                                             const gchar *xml);

Changes `account` to match `xml`.

`account` : | an EAccount
`xml` : | an XML account description.
Returns : | `TRUE` if `account` was changed, `FALSE` if `account` already matched `xml` or `xml` could not be parsed

### e_account_import ()

    void                e_account_import                    (EAccount *dest,
                                                             EAccount *src);

Import the settings from `src` to `dest`.

`dest` : | destination account object
`src` : | source account object

### e_account_to_xml ()

    gchar *             e_account_to_xml                    (EAccount *account);

`account` : | an EAccount
Returns : | an XML representation of `account`, which the caller must free.

### e_account_uid_from_xml ()

    gchar *             e_account_uid_from_xml              (const gchar *xml);

`xml` : | an XML account description
Returns : | the permanent UID of the account described by `xml` (or `NULL` if `xml` could not be parsed or did not contain a uid). The caller must free this string.

### e_account_get_string ()

    const gchar *       e_account_get_string                (EAccount *account,
                                                             e_account_item_t type);

`account` : |
`type` : |
Returns : |

### e_account_get_int ()

    gint                e_account_get_int                   (EAccount *account,
                                                             e_account_item_t type);

`account` : |
`type` : |
Returns : |

### e_account_get_bool ()

    gboolean            e_account_get_bool                  (EAccount *account,
                                                             e_account_item_t type);

`account` : |
`type` : |
Returns : |

### e_account_set_string ()

    void                e_account_set_string                (EAccount *account,
                                                             e_account_item_t type,
                                                             const gchar *v_string);

`account` : |
`type` : |
`v_string` : |

### e_account_set_int ()

    void                e_account_set_int                   (EAccount *account,
                                                             e_account_item_t type,
                                                             gint v_int);

`account` : |
`type` : |
`v_int` : |

### e_account_set_bool ()

    void                e_account_set_bool                  (EAccount *account,
                                                             e_account_item_t type,
                                                             gboolean v_bool);

`account` : |
`type` : |
`v_bool` : |

### e_account_writable ()

    gboolean            e_account_writable                  (EAccount *account,
                                                             e_account_item_t type);

`account` : |
`type` : |
Returns : |

### e_account_writable_option ()

    gboolean            e_account_writable_option           (EAccount *account,
                                                             const gchar *protocol,
                                                             const gchar *option);

`account` : |
`protocol` : |
`option` : |
Returns : |

## Signal Details

### The `"changed"` signal

    void                user_function                      (EAccount *eaccount,
                                                            gint      arg1,
                                                            gpointer  user_data)      : Run Last

`eaccount` : | the object which received the signal.
`arg1` : |
`user_data` : | user data set when the signal handler was connected.