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.voicemail.impl.mail.store.imap;
18 
19 import com.android.voicemail.impl.mail.store.ImapStore;
20 import java.util.Locale;
21 
22 public final class ImapConstants {
ImapConstants()23   private ImapConstants() {}
24 
25   public static final String FETCH_FIELD_BODY_PEEK_BARE = "BODY.PEEK";
26   public static final String FETCH_FIELD_BODY_PEEK = FETCH_FIELD_BODY_PEEK_BARE + "[]";
27   public static final String FETCH_FIELD_BODY_PEEK_SANE =
28       String.format(Locale.US, "BODY.PEEK[]<0.%d>", ImapStore.FETCH_BODY_SANE_SUGGESTED_SIZE);
29   public static final String FETCH_FIELD_HEADERS =
30       "BODY.PEEK[HEADER.FIELDS (date subject from content-type to cc message-id)]";
31 
32   public static final String ALERT = "ALERT";
33   public static final String APPEND = "APPEND";
34   public static final String AUTHENTICATE = "AUTHENTICATE";
35   public static final String BAD = "BAD";
36   public static final String BADCHARSET = "BADCHARSET";
37   public static final String BODY = "BODY";
38   public static final String BODY_BRACKET_HEADER = "BODY[HEADER";
39   public static final String BODYSTRUCTURE = "BODYSTRUCTURE";
40   public static final String BYE = "BYE";
41   public static final String CAPABILITY = "CAPABILITY";
42   public static final String CHECK = "CHECK";
43   public static final String CLOSE = "CLOSE";
44   public static final String COPY = "COPY";
45   public static final String COPYUID = "COPYUID";
46   public static final String CREATE = "CREATE";
47   public static final String DELETE = "DELETE";
48   public static final String EXAMINE = "EXAMINE";
49   public static final String EXISTS = "EXISTS";
50   public static final String EXPUNGE = "EXPUNGE";
51   public static final String FETCH = "FETCH";
52   public static final String FLAG_ANSWERED = "\\ANSWERED";
53   public static final String FLAG_DELETED = "\\DELETED";
54   public static final String FLAG_FLAGGED = "\\FLAGGED";
55   public static final String FLAG_NO_SELECT = "\\NOSELECT";
56   public static final String FLAG_SEEN = "\\SEEN";
57   public static final String FLAGS = "FLAGS";
58   public static final String FLAGS_SILENT = "FLAGS.SILENT";
59   public static final String ID = "ID";
60   public static final String INBOX = "INBOX";
61   public static final String INTERNALDATE = "INTERNALDATE";
62   public static final String LIST = "LIST";
63   public static final String LOGIN = "LOGIN";
64   public static final String LOGOUT = "LOGOUT";
65   public static final String LSUB = "LSUB";
66   public static final String NAMESPACE = "NAMESPACE";
67   public static final String NO = "NO";
68   public static final String NOOP = "NOOP";
69   public static final String OK = "OK";
70   public static final String PARSE = "PARSE";
71   public static final String PERMANENTFLAGS = "PERMANENTFLAGS";
72   public static final String PREAUTH = "PREAUTH";
73   public static final String READ_ONLY = "READ-ONLY";
74   public static final String READ_WRITE = "READ-WRITE";
75   public static final String RENAME = "RENAME";
76   public static final String RFC822_SIZE = "RFC822.SIZE";
77   public static final String SEARCH = "SEARCH";
78   public static final String SELECT = "SELECT";
79   public static final String STARTTLS = "STARTTLS";
80   public static final String STATUS = "STATUS";
81   public static final String STORE = "STORE";
82   public static final String SUBSCRIBE = "SUBSCRIBE";
83   public static final String TEXT = "TEXT";
84   public static final String TRYCREATE = "TRYCREATE";
85   public static final String UID = "UID";
86   public static final String UID_COPY = "UID COPY";
87   public static final String UID_FETCH = "UID FETCH";
88   public static final String UID_SEARCH = "UID SEARCH";
89   public static final String UID_STORE = "UID STORE";
90   public static final String UIDNEXT = "UIDNEXT";
91   public static final String UIDPLUS = "UIDPLUS";
92   public static final String UIDVALIDITY = "UIDVALIDITY";
93   public static final String UNSEEN = "UNSEEN";
94   public static final String UNSUBSCRIBE = "UNSUBSCRIBE";
95   public static final String XOAUTH2 = "XOAUTH2";
96   public static final String APPENDUID = "APPENDUID";
97   public static final String NIL = "NIL";
98 
99   /** NO responses */
100   public static final String NO_COMMAND_NOT_ALLOWED = "command not allowed";
101 
102   public static final String NO_RESERVATION_FAILED = "reservation failed";
103   public static final String NO_APPLICATION_ERROR = "application error";
104   public static final String NO_INVALID_PARAMETER = "invalid parameter";
105   public static final String NO_INVALID_COMMAND = "invalid command";
106   public static final String NO_UNKNOWN_COMMAND = "unknown command";
107   // AUTHENTICATE
108   // The subscriber can not be located in the system.
109   public static final String NO_UNKNOWN_USER = "unknown user";
110   // The Client Type or Protocol Version is unknown.
111   public static final String NO_UNKNOWN_CLIENT = "unknown client";
112   // The password received from the client does not match the password defined in the subscriber's
113   // profile.
114   public static final String NO_INVALID_PASSWORD = "invalid password";
115   // The subscriber's mailbox has not yet been initialised via the TUI
116   public static final String NO_MAILBOX_NOT_INITIALIZED = "mailbox not initialized";
117   // The subscriber has not been provisioned for the VVM service.
118   public static final String NO_SERVICE_IS_NOT_PROVISIONED = "service is not provisioned";
119   // The subscriber is provisioned for the VVM service but the VVM service is currently not active
120   public static final String NO_SERVICE_IS_NOT_ACTIVATED = "service is not activated";
121   // The Voice Mail Blocked flag in the subscriber's profile is set to YES.
122   public static final String NO_USER_IS_BLOCKED = "user is blocked";
123 
124   /** extensions */
125   public static final String GETQUOTA = "GETQUOTA";
126 
127   public static final String GETQUOTAROOT = "GETQUOTAROOT";
128   public static final String QUOTAROOT = "QUOTAROOT";
129   public static final String QUOTA = "QUOTA";
130 
131   /** capabilities */
132   public static final String CAPABILITY_AUTH_DIGEST_MD5 = "AUTH=DIGEST-MD5";
133 
134   public static final String CAPABILITY_STARTTLS = "STARTTLS";
135 
136   /** authentication */
137   public static final String AUTH_DIGEST_MD5 = "DIGEST-MD5";
138 }
139