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

« back to all changes in this revision

Viewing changes to src/engine/api/geary-credentials.vala

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2013-04-10 10:57:25 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20130410105725-f532n2cfre2sq6mf
Tags: 0.3.1-0ubuntu1
* New upstream bugfix version:
  - Reduced CPU and memory footprint
  - Account dialog bugs fixed
  - Stability improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * in the background and asking the user to reauthenticate each time is deemed inconvenient.
19
19
 */
20
20
 
21
 
public class Geary.Credentials : BaseObject {
 
21
public class Geary.Credentials : BaseObject, Geary.Equalable {
22
22
    public string? user { get; set; }
23
23
    public string? pass { get; set; }
24
24
    
42
42
    public string to_string() {
43
43
        return user;
44
44
    }
 
45
    
 
46
    public bool equals(Equalable other) {
 
47
        Geary.Credentials? c = other as Geary.Credentials;
 
48
        if (c == null)
 
49
            return false;
 
50
        
 
51
        if (this == c)
 
52
            return true;
 
53
        
 
54
        return user == c.user && pass == c.pass;
 
55
    }
45
56
}
46
57