1
/* Copyright 2012 Yorba Foundation
3
* This software is licensed under the GNU Lesser General Public License
4
* (version 2.1 or later). See the COPYING file in this distribution.
8
* AccountSettings is a complement to AccountInformation. AccountInformation stores these settings
9
* as well as defaults and provides validation and persistence functionality. Settings is simply
10
* the values loaded from a backing store, perhaps chosen from defaults, and validated, then filtered
11
* down to a set of working settings for the Account to use. Changes made to AccountInformation
12
* are not reflected here; a new AccountSettings object must be created.
15
public class Geary.AccountSettings {
16
public RFC822.MailboxAddress email { get; private set; }
17
public string real_name { get; private set; }
18
public Geary.Credentials imap_credentials { get; private set; }
19
public Geary.Credentials smtp_credentials { get; private set; }
20
public Geary.ServiceProvider service_provider { get; private set; }
21
public bool imap_server_pipeline { get; private set; }
22
public Endpoint imap_endpoint { get; private set; }
23
public Endpoint smtp_endpoint { get; private set; }
25
internal File settings_dir { get; private set; }
27
internal AccountSettings(AccountInformation info) throws EngineError {
28
email = new RFC822.MailboxAddress(info.real_name, info.email);
29
real_name = info.real_name;
30
imap_credentials = info.imap_credentials;
31
smtp_credentials = info.smtp_credentials;
32
service_provider = info.service_provider;
33
imap_server_pipeline = info.imap_server_pipeline;
34
imap_endpoint = info.get_imap_endpoint();
35
smtp_endpoint = info.get_smtp_endpoint();
37
settings_dir = info.settings_dir;