~hyuchia/pantheon-mail/fix-1562958

« back to all changes in this revision

Viewing changes to src/engine/imap/Commands.vala

  • Committer: Jim Nelson
  • Date: 2011-04-11 23:16:21 UTC
  • Revision ID: git-v1:e3cab0804b129c2d69e9ec8bed28d2369f68a1c0
Email client ho!

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* Copyright 2011 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
public class Geary.Imap.CapabilityCommand : Command {
 
8
    public const string NAME = "capability";
 
9
    
 
10
    public CapabilityCommand(ClientSession session) {
 
11
        base (new Tag.generated(session), NAME);
 
12
    }
 
13
}
 
14
 
 
15
public class Geary.Imap.NoopCommand : Command {
 
16
    public const string NAME = "noop";
 
17
    
 
18
    public NoopCommand(ClientSession session) {
 
19
        base (new Tag.generated(session), NAME);
 
20
    }
 
21
}
 
22
 
 
23
public class Geary.Imap.LoginCommand : Command {
 
24
    public const string NAME = "login";
 
25
    
 
26
    public LoginCommand(ClientSession session, string user, string pass) {
 
27
        base (new Tag.generated(session), NAME, { user, pass });
 
28
    }
 
29
    
 
30
    public override string to_string() {
 
31
        return "%s %s <user> <pass>".printf(tag.to_string(), name);
 
32
    }
 
33
}
 
34
 
 
35
public class Geary.Imap.LogoutCommand : Command {
 
36
    public const string NAME = "logout";
 
37
    
 
38
    public LogoutCommand(ClientSession session) {
 
39
        base (new Tag.generated(session), NAME);
 
40
    }
 
41
}
 
42
 
 
43
public class Geary.Imap.ListCommand : Command {
 
44
    public const string NAME = "list";
 
45
    
 
46
    public ListCommand(ClientSession session, string mailbox) {
 
47
        base (new Tag.generated(session), NAME, { "", mailbox });
 
48
    }
 
49
    
 
50
    public ListCommand.wildcarded(ClientSession session, string reference, string mailbox) {
 
51
        base (new Tag.generated(session), NAME, { reference, mailbox });
 
52
    }
 
53
}
 
54
 
 
55
public class Geary.Imap.ExamineCommand : Command {
 
56
    public const string NAME = "examine";
 
57
    
 
58
    public ExamineCommand(ClientSession session, string mailbox) {
 
59
        base (new Tag.generated(session), NAME, { mailbox });
 
60
    }
 
61
}
 
62