1 /*
2  * Copyright (C) 2015 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.phone.common.mail.store.imap;
18 
19 import com.android.phone.common.mail.store.ImapStore;
20 
21 import java.util.Locale;
22 
23 public final class ImapConstants {
ImapConstants()24     private ImapConstants() {}
25 
26     public static final String FETCH_FIELD_BODY_PEEK_BARE = "BODY.PEEK";
27     public static final String FETCH_FIELD_BODY_PEEK = FETCH_FIELD_BODY_PEEK_BARE + "[]";
28     public static final String FETCH_FIELD_BODY_PEEK_SANE = String.format(
29             Locale.US, "BODY.PEEK[]<0.%d>", ImapStore.FETCH_BODY_SANE_SUGGESTED_SIZE);
30     public static final String FETCH_FIELD_HEADERS =
31             "BODY.PEEK[HEADER.FIELDS (date subject from content-type to cc message-id)]";
32 
33     public static final String ALERT = "ALERT";
34     public static final String APPEND = "APPEND";
35     public static final String AUTHENTICATE = "AUTHENTICATE";
36     public static final String BAD = "BAD";
37     public static final String BADCHARSET = "BADCHARSET";
38     public static final String BODY = "BODY";
39     public static final String BODY_BRACKET_HEADER = "BODY[HEADER";
40     public static final String BODYSTRUCTURE = "BODYSTRUCTURE";
41     public static final String BYE = "BYE";
42     public static final String CAPABILITY = "CAPABILITY";
43     public static final String CHECK = "CHECK";
44     public static final String CLOSE = "CLOSE";
45     public static final String COPY = "COPY";
46     public static final String COPYUID = "COPYUID";
47     public static final String CREATE = "CREATE";
48     public static final String DELETE = "DELETE";
49     public static final String EXAMINE = "EXAMINE";
50     public static final String EXISTS = "EXISTS";
51     public static final String EXPUNGE = "EXPUNGE";
52     public static final String FETCH = "FETCH";
53     public static final String FLAG_ANSWERED = "\\ANSWERED";
54     public static final String FLAG_DELETED = "\\DELETED";
55     public static final String FLAG_FLAGGED = "\\FLAGGED";
56     public static final String FLAG_NO_SELECT = "\\NOSELECT";
57     public static final String FLAG_SEEN = "\\SEEN";
58     public static final String FLAGS = "FLAGS";
59     public static final String FLAGS_SILENT = "FLAGS.SILENT";
60     public static final String ID = "ID";
61     public static final String INBOX = "INBOX";
62     public static final String INTERNALDATE = "INTERNALDATE";
63     public static final String LIST = "LIST";
64     public static final String LOGIN = "LOGIN";
65     public static final String LOGOUT = "LOGOUT";
66     public static final String LSUB = "LSUB";
67     public static final String NAMESPACE = "NAMESPACE";
68     public static final String NO = "NO";
69     public static final String NOOP = "NOOP";
70     public static final String OK = "OK";
71     public static final String PARSE = "PARSE";
72     public static final String PERMANENTFLAGS = "PERMANENTFLAGS";
73     public static final String PREAUTH = "PREAUTH";
74     public static final String READ_ONLY = "READ-ONLY";
75     public static final String READ_WRITE = "READ-WRITE";
76     public static final String RENAME = "RENAME";
77     public static final String RFC822_SIZE = "RFC822.SIZE";
78     public static final String SEARCH = "SEARCH";
79     public static final String SELECT = "SELECT";
80     public static final String STARTTLS = "STARTTLS";
81     public static final String STATUS = "STATUS";
82     public static final String STORE = "STORE";
83     public static final String SUBSCRIBE = "SUBSCRIBE";
84     public static final String TEXT = "TEXT";
85     public static final String TRYCREATE = "TRYCREATE";
86     public static final String UID = "UID";
87     public static final String UID_COPY = "UID COPY";
88     public static final String UID_FETCH = "UID FETCH";
89     public static final String UID_SEARCH = "UID SEARCH";
90     public static final String UID_STORE = "UID STORE";
91     public static final String UIDNEXT = "UIDNEXT";
92     public static final String UIDPLUS = "UIDPLUS";
93     public static final String UIDVALIDITY = "UIDVALIDITY";
94     public static final String UNSEEN = "UNSEEN";
95     public static final String UNSUBSCRIBE = "UNSUBSCRIBE";
96     public static final String XOAUTH2 = "XOAUTH2";
97     public static final String APPENDUID = "APPENDUID";
98     public static final String NIL = "NIL";
99 
100     /**
101      * extensions
102      */
103     public static final String GETQUOTA = "GETQUOTA";
104     public static final String GETQUOTAROOT = "GETQUOTAROOT";
105     public static final String QUOTAROOT = "QUOTAROOT";
106     public static final String QUOTA = "QUOTA";
107 
108     /** response codes within IMAP responses */
109     public static final String EXPIRED = "EXPIRED";
110     public static final String AUTHENTICATIONFAILED = "AUTHENTICATIONFAILED";
111     public static final String UNAVAILABLE = "UNAVAILABLE";
112 }