EAccount
3
LIBEDATASERVER Library

# EAccount

## Synopsis

                EAccountIdentity;
                EAccountService;
    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);
    char*       e_account_to_xml                (EAccount *account);
    char*       e_account_uid_from_xml          (const char *xml);

## Description

## Details

### EAccountIdentity

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

    	char *sig_uid;
    } EAccountIdentity;

### EAccountService

    typedef struct {
    	char *url;
    	gboolean keep_on_server;
    	gboolean auto_check;
    	int auto_check_time;
    	gboolean save_passwd;
    } 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 char *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 char *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 ()

    char*       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 ()

    char*       e_account_uid_from_xml          (const char *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.