~ubuntu-branches/ubuntu/saucy/geary/saucy-updates

« back to all changes in this revision

Viewing changes to src/engine/api/geary-account-settings.vala

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-03-14 13:48:23 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20130314134823-gyk5av1g508zyj8a
Tags: 0.3.0~pr1-0ubuntu1
New upstream version (FFE lp: #1154316), supports multiple account as
well as full conversation views with inline replies

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright 2012 Yorba Foundation
2
 
 *
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. 
5
 
 */
6
 
 
7
 
/**
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.
13
 
 */
14
 
 
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; }
24
 
    
25
 
    internal File settings_dir { get; private set; }
26
 
    
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();
36
 
        
37
 
        settings_dir = info.settings_dir;
38
 
    }
39
 
}
40