Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 1 | /** |
| 2 | * Copyright (c) 2011, Google Inc. |
| 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.email.providers; |
| 18 | |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 19 | import android.provider.BaseColumns; |
| 20 | |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 21 | import java.lang.String; |
| 22 | |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 23 | |
| 24 | public class UIProvider { |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 25 | // The actual content provider should define its own authority |
Mindy Pereira | fdd984b | 2011-12-29 09:43:45 -0800 | [diff] [blame] | 26 | public static final String AUTHORITY = "com.android.email.providers"; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 27 | |
| 28 | public static final String ACCOUNT_LIST_TYPE = |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 29 | "vnd.android.cursor.dir/vnd.com.android.mail.account"; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 30 | public static final String ACCOUNT_TYPE = |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 31 | "vnd.android.cursor.item/vnd.com.android.mail.account"; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 32 | |
| 33 | public static final String[] ACCOUNTS_PROJECTION = { |
| 34 | BaseColumns._ID, |
| 35 | AccountColumns.NAME, |
| 36 | AccountColumns.PROVIDER_VERSION, |
| 37 | AccountColumns.URI, |
| 38 | AccountColumns.CAPABILITIES, |
| 39 | AccountColumns.FOLDER_LIST_URI, |
| 40 | AccountColumns.SEARCH_URI, |
| 41 | AccountColumns.ACCOUNT_FROM_ADDRESSES_URI, |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 42 | AccountColumns.SAVE_NEW_DRAFT_URI, |
Mindy Pereira | 3a565bf | 2011-12-21 11:26:21 -0800 | [diff] [blame] | 43 | AccountColumns.SEND_MESSAGE_URI |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 44 | }; |
| 45 | |
| 46 | public static final class AccountCapabilities { |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 47 | public static final int SYNCABLE_FOLDERS = 0x0001; |
| 48 | public static final int REPORT_SPAM = 0x0002; |
| 49 | public static final int ARCHIVE = 0x0004; |
| 50 | public static final int MUTE = 0x0008; |
| 51 | public static final int SERVER_SEARCH = 0x0010; |
| 52 | public static final int FOLDER_SERVER_SEARCH = 0x0020; |
| 53 | public static final int SANITIZED_HTML = 0x0040; |
| 54 | public static final int DRAFT_SYNCHRONIZATION = 0x0080; |
| 55 | public static final int MULTIPLE_FROM_ADDRESSES = 0x0100; |
| 56 | public static final int SMART_REPLY = 0x0200; |
| 57 | public static final int LOCAL_SEARCH = 0x0400; |
| 58 | public static final int THREADED_CONVERSATIONS = 0x0800; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 59 | } |
| 60 | |
| 61 | public static final class AccountColumns { |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 62 | /** |
| 63 | * This string column contains the human visible name for the account. |
| 64 | */ |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 65 | public static final String NAME = "name"; |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 66 | |
| 67 | /** |
| 68 | * This integer column returns the version of the UI provider schema from which this |
| 69 | * account provider will return results. |
| 70 | */ |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 71 | public static final String PROVIDER_VERSION = "providerVersion"; |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 72 | |
| 73 | /** |
| 74 | * This string column contains the uri to directly access the information for this account. |
| 75 | */ |
Mindy Pereira | 6349a04 | 2012-01-04 11:25:01 -0800 | [diff] [blame^] | 76 | public static final String URI = "accountUri"; |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 77 | |
| 78 | /** |
| 79 | * This integer column contains a bit field of the possible cabibilities that this account |
| 80 | * supports. |
| 81 | */ |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 82 | public static final String CAPABILITIES = "capabilities"; |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 83 | |
| 84 | /** |
Mindy Pereira | 750cc73 | 2011-12-21 13:32:29 -0800 | [diff] [blame] | 85 | * This string column contains the content provider uri to return the |
| 86 | * list of top level folders for this account. |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 87 | */ |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 88 | public static final String FOLDER_LIST_URI = "folderListUri"; |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 89 | |
| 90 | /** |
| 91 | * This string column contains the content provider uri that can be queried for search |
| 92 | * results. |
| 93 | */ |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 94 | public static final String SEARCH_URI = "searchUri"; |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 95 | |
| 96 | /** |
| 97 | * This string column contains the content provider uri that can be queried to access the |
| 98 | * from addresses for this account. |
| 99 | */ |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 100 | public static final String ACCOUNT_FROM_ADDRESSES_URI = "accountFromAddressesUri"; |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 101 | |
| 102 | /** |
| 103 | * This string column contains the content provider uri that can be used to save (insert) |
| 104 | * new draft messages for this account. |
| 105 | */ |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 106 | public static final String SAVE_NEW_DRAFT_URI = "saveNewDraftUri"; |
| 107 | |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 108 | /** |
| 109 | * This string column contains the content provider uri that can be used to send |
| 110 | * a message for this account. |
| 111 | * NOTE: This might be better to be an update operation on the messageUri. |
| 112 | */ |
| 113 | public static final String SEND_MESSAGE_URI = "sendMessageUri"; |
Mindy Pereira | 3a565bf | 2011-12-21 11:26:21 -0800 | [diff] [blame] | 114 | } |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 115 | |
Mindy Pereira | 3a565bf | 2011-12-21 11:26:21 -0800 | [diff] [blame] | 116 | // We define a "folder" as anything that contains a list of conversations. |
| 117 | public static final String FOLDER_LIST_TYPE = |
| 118 | "vnd.android.cursor.dir/vnd.com.android.mail.folder"; |
| 119 | public static final String FOLDER_TYPE = |
Mindy Pereira | 750cc73 | 2011-12-21 13:32:29 -0800 | [diff] [blame] | 120 | "vnd.android.cursor.item/vnd.com.android.mail.folder"; |
Mindy Pereira | 3a565bf | 2011-12-21 11:26:21 -0800 | [diff] [blame] | 121 | |
| 122 | public static final String[] FOLDERS_PROJECTION = { |
| 123 | BaseColumns._ID, |
Mindy Pereira | 6349a04 | 2012-01-04 11:25:01 -0800 | [diff] [blame^] | 124 | FolderColumns.URI, |
Mindy Pereira | 3a565bf | 2011-12-21 11:26:21 -0800 | [diff] [blame] | 125 | FolderColumns.NAME, |
Mindy Pereira | 750cc73 | 2011-12-21 13:32:29 -0800 | [diff] [blame] | 126 | FolderColumns.HAS_CHILDREN, |
Mindy Pereira | 0973b20 | 2011-12-21 15:48:12 -0800 | [diff] [blame] | 127 | FolderColumns.CAPABILITIES, |
| 128 | FolderColumns.SYNC_FREQUENCY, |
| 129 | FolderColumns.SYNC_WINDOW, |
Mindy Pereira | 750cc73 | 2011-12-21 13:32:29 -0800 | [diff] [blame] | 130 | FolderColumns.CONVERSATION_LIST_URI, |
| 131 | FolderColumns.CHILD_FOLDERS_LIST_URI |
Mindy Pereira | 3a565bf | 2011-12-21 11:26:21 -0800 | [diff] [blame] | 132 | }; |
| 133 | |
Mindy Pereira | 0973b20 | 2011-12-21 15:48:12 -0800 | [diff] [blame] | 134 | public static final class FolderCapabilities { |
| 135 | public static final int SYNCABLE = 0x0001; |
| 136 | public static final int PARENT = 0x0002; |
| 137 | public static final int CAN_HOLD_MAIL = 0x0004; |
| 138 | public static final int CAN_ACCEPT_MOVED_MESSAGES = 0x0008; |
| 139 | } |
| 140 | |
Mindy Pereira | 3a565bf | 2011-12-21 11:26:21 -0800 | [diff] [blame] | 141 | public static final class FolderColumns { |
Mindy Pereira | 6349a04 | 2012-01-04 11:25:01 -0800 | [diff] [blame^] | 142 | public static String URI = "folderUri"; |
Mindy Pereira | 3a565bf | 2011-12-21 11:26:21 -0800 | [diff] [blame] | 143 | /** |
| 144 | * This string column contains the human visible name for the folder. |
| 145 | */ |
| 146 | public static final String NAME = "name"; |
| 147 | /** |
Mindy Pereira | 0973b20 | 2011-12-21 15:48:12 -0800 | [diff] [blame] | 148 | * This int column represents the capabilities of the folder specified by |
| 149 | * FolderCapabilities flags. |
| 150 | */ |
| 151 | public static String CAPABILITIES = "capabilities"; |
| 152 | /** |
Mindy Pereira | 750cc73 | 2011-12-21 13:32:29 -0800 | [diff] [blame] | 153 | * This boolean column represents whether or not this folder has any |
| 154 | * child folders. |
| 155 | */ |
| 156 | public static String HAS_CHILDREN = "hasChildren"; |
| 157 | /** |
Mindy Pereira | 0973b20 | 2011-12-21 15:48:12 -0800 | [diff] [blame] | 158 | * This int column represents how often the folder should be synced. |
| 159 | */ |
| 160 | public static String SYNC_FREQUENCY = "syncFrequency"; |
| 161 | /** |
| 162 | * This int column represents how large the sync window is. |
| 163 | */ |
| 164 | public static String SYNC_WINDOW = "syncWindow"; |
| 165 | /** |
Mindy Pereira | 750cc73 | 2011-12-21 13:32:29 -0800 | [diff] [blame] | 166 | * This string column contains the content provider uri to return the |
| 167 | * list of conversations for this folder. |
Mindy Pereira | 3a565bf | 2011-12-21 11:26:21 -0800 | [diff] [blame] | 168 | */ |
| 169 | public static final String CONVERSATION_LIST_URI = "conversationListUri"; |
Mindy Pereira | 750cc73 | 2011-12-21 13:32:29 -0800 | [diff] [blame] | 170 | /** |
| 171 | * This string column contains the content provider uri to return the |
| 172 | * list of child folders of this folder. |
| 173 | */ |
| 174 | public static String CHILD_FOLDERS_LIST_URI = "childFoldersListUri"; |
Mindy Pereira | 3a565bf | 2011-12-21 11:26:21 -0800 | [diff] [blame] | 175 | |
| 176 | public FolderColumns() {}; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 177 | } |
| 178 | |
Mindy Pereira | a140607 | 2011-12-22 10:54:06 -0800 | [diff] [blame] | 179 | // We define a "folder" as anything that contains a list of conversations. |
| 180 | public static final String CONVERSATION_LIST_TYPE = |
| 181 | "vnd.android.cursor.dir/vnd.com.android.mail.conversation"; |
| 182 | public static final String CONVERSATION_TYPE = |
| 183 | "vnd.android.cursor.item/vnd.com.android.mail.conversation"; |
| 184 | |
| 185 | public static final String[] CONVERSATION_PROJECTION = { |
| 186 | BaseColumns._ID, |
Mindy Pereira | 6349a04 | 2012-01-04 11:25:01 -0800 | [diff] [blame^] | 187 | ConversationColumns.URI, |
Mindy Pereira | f9573c5 | 2011-12-22 14:02:49 -0800 | [diff] [blame] | 188 | ConversationColumns.MESSAGE_LIST_URI, |
Mindy Pereira | a140607 | 2011-12-22 10:54:06 -0800 | [diff] [blame] | 189 | ConversationColumns.SUBJECT, |
Mindy Pereira | f9573c5 | 2011-12-22 14:02:49 -0800 | [diff] [blame] | 190 | ConversationColumns.SNIPPET, |
| 191 | ConversationColumns.SENDER_INFO, |
Mindy Pereira | f30cc09 | 2011-12-29 14:02:40 -0800 | [diff] [blame] | 192 | ConversationColumns.DATE_RECEIVED_MS, |
| 193 | ConversationColumns.HAS_ATTACHMENTS |
Mindy Pereira | a140607 | 2011-12-22 10:54:06 -0800 | [diff] [blame] | 194 | }; |
| 195 | |
Mindy Pereira | fdd984b | 2011-12-29 09:43:45 -0800 | [diff] [blame] | 196 | // These column indexes only work when the caller uses the |
| 197 | // default CONVERSATION_PROJECTION defined above. |
Mindy Pereira | fa7ef6e | 2011-12-29 14:18:15 -0800 | [diff] [blame] | 198 | public static final int CONVERSATION_ID_COLUMN = 0; |
Mindy Pereira | 3263fa9 | 2012-01-04 10:15:32 -0800 | [diff] [blame] | 199 | public static final int CONVERSATION_URI_COLUMN = 1; |
| 200 | public static final int CONVERSATION_MESSAGE_LIST_URI_COLUMN = 2; |
| 201 | public static final int CONVERSATION_SUBJECT_COLUMN = 3; |
| 202 | public static final int CONVERSATION_SNIPPET_COLUMN = 4; |
| 203 | public static final int CONVERSATION_SENDER_INFO_COLUMN = 5; |
| 204 | public static final int CONVERSATION_DATE_RECEIVED_MS_COLUMN = 6; |
| 205 | public static final int CONVERSATION_HAS_ATTACHMENTS_COLUMN = 7; |
Mindy Pereira | fa7ef6e | 2011-12-29 14:18:15 -0800 | [diff] [blame] | 206 | |
Mindy Pereira | a140607 | 2011-12-22 10:54:06 -0800 | [diff] [blame] | 207 | public static final class ConversationColumns { |
Mindy Pereira | 6349a04 | 2012-01-04 11:25:01 -0800 | [diff] [blame^] | 208 | public static final String URI = "conversationUri"; |
Mindy Pereira | a140607 | 2011-12-22 10:54:06 -0800 | [diff] [blame] | 209 | /** |
Mindy Pereira | a140607 | 2011-12-22 10:54:06 -0800 | [diff] [blame] | 210 | * This string column contains the content provider uri to return the |
| 211 | * list of messages for this conversation. |
| 212 | */ |
| 213 | public static final String MESSAGE_LIST_URI = "messageListUri"; |
Mindy Pereira | 27a0cf0 | 2011-12-22 13:16:32 -0800 | [diff] [blame] | 214 | /** |
| 215 | * This string column contains the subject string for a conversation. |
| 216 | */ |
| 217 | public static final String SUBJECT = "subject"; |
| 218 | /** |
| 219 | * This string column contains the snippet string for a conversation. |
| 220 | */ |
| 221 | public static final String SNIPPET = "snippet"; |
| 222 | /** |
| 223 | * This string column contains the sender info string for a |
| 224 | * conversation. |
| 225 | */ |
| 226 | public static final String SENDER_INFO = "senderInfo"; |
| 227 | /** |
| 228 | * This long column contains the time in ms of the latest update to a |
| 229 | * conversation. |
| 230 | */ |
| 231 | public static final String DATE_RECEIVED_MS = "dateReceivedMs"; |
| 232 | |
Mindy Pereira | f30cc09 | 2011-12-29 14:02:40 -0800 | [diff] [blame] | 233 | /** |
| 234 | * This boolean column contains whether any messages in this conversation |
| 235 | * have attachments. |
| 236 | */ |
| 237 | public static final String HAS_ATTACHMENTS = "hasAttachments"; |
| 238 | |
Mindy Pereira | 27a0cf0 | 2011-12-22 13:16:32 -0800 | [diff] [blame] | 239 | public ConversationColumns() { |
| 240 | }; |
Mindy Pereira | a140607 | 2011-12-22 10:54:06 -0800 | [diff] [blame] | 241 | } |
| 242 | |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 243 | /** |
| 244 | * Returns a uri that, when queried, will return a cursor with a list of information for the |
| 245 | * list of configured accounts. |
| 246 | * @return |
| 247 | */ |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 248 | // TODO: create a static registry for the starting point for the UI provider. |
| 249 | // public static Uri getAccountsUri() { |
| 250 | // return Uri.parse(BASE_URI_STRING + "/"); |
| 251 | // } |
| 252 | |
| 253 | public static final class DraftType { |
| 254 | public static final String COMPOSE = "compose"; |
| 255 | public static final String REPLY = "reply"; |
| 256 | public static final String REPLY_ALL = "replyAll"; |
| 257 | public static final String FORWARD = "forward"; |
| 258 | |
| 259 | private DraftType() {} |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 260 | } |
| 261 | |
Mindy Pereira | a140607 | 2011-12-22 10:54:06 -0800 | [diff] [blame] | 262 | public static final String[] MESSAGE_PROJECTION = { |
| 263 | BaseColumns._ID, |
| 264 | MessageColumns.URI, |
Mindy Pereira | a140607 | 2011-12-22 10:54:06 -0800 | [diff] [blame] | 265 | MessageColumns.CONVERSATION_ID, |
| 266 | MessageColumns.SUBJECT, |
| 267 | MessageColumns.SNIPPET, |
| 268 | MessageColumns.FROM, |
| 269 | MessageColumns.TO, |
| 270 | MessageColumns.CC, |
| 271 | MessageColumns.BCC, |
| 272 | MessageColumns.REPLY_TO, |
| 273 | MessageColumns.DATE_RECEIVED_MS, |
| 274 | MessageColumns.BODY_HTML, |
| 275 | MessageColumns.BODY_TEXT, |
| 276 | MessageColumns.EMBEDS_EXTERNAL_RESOURCES, |
| 277 | MessageColumns.REF_MESSAGE_ID, |
| 278 | MessageColumns.DRAFT_TYPE, |
| 279 | MessageColumns.INCLUDE_QUOTED_TEXT, |
| 280 | MessageColumns.QUOTE_START_POS, |
| 281 | MessageColumns.CLIENT_CREATED, |
Mindy Pereira | f30cc09 | 2011-12-29 14:02:40 -0800 | [diff] [blame] | 282 | MessageColumns.CUSTOM_FROM_ADDRESS, |
| 283 | MessageColumns.HAS_ATTACHMENTS, |
| 284 | MessageColumns.ATTACHMENT_LIST_URI |
Mindy Pereira | a140607 | 2011-12-22 10:54:06 -0800 | [diff] [blame] | 285 | }; |
| 286 | |
Mindy Pereira | a140607 | 2011-12-22 10:54:06 -0800 | [diff] [blame] | 287 | public static final String MESSAGE_LIST_TYPE = |
| 288 | "vnd.android.cursor.dir/vnd.com.android.mail.message"; |
| 289 | public static final String MESSAGE_TYPE = |
| 290 | "vnd.android.cursor.item/vnd.com.android.mail.message"; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 291 | |
Mindy Pereira | 6349a04 | 2012-01-04 11:25:01 -0800 | [diff] [blame^] | 292 | public static final int MESSAGE_ID_COLUMN = 0; |
| 293 | public static final int MESSAGE_URI_COLUMN = 1; |
| 294 | public static final int MESSAGE_CONVERSATION_ID_COLUMN = 2; |
| 295 | public static final int MESSAGE_SUBJECT_COLUMN = 3; |
| 296 | public static final int MESSAGE_SNIPPET_COLUMN = 4; |
| 297 | |
Mindy Pereira | f30cc09 | 2011-12-29 14:02:40 -0800 | [diff] [blame] | 298 | public static final class MessageFlags { |
| 299 | public static final int SYNCABLE = 0x0001; |
| 300 | public static final int PARENT = 0x0002; |
| 301 | public static final int CAN_HOLD_MAIL = 0x0004; |
| 302 | public static final int CAN_ACCEPT_MOVED_MESSAGES = 0x0008; |
| 303 | } |
| 304 | |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 305 | public static final class MessageColumns { |
Mindy Pereira | 6349a04 | 2012-01-04 11:25:01 -0800 | [diff] [blame^] | 306 | public static final String URI = "messageUri"; |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 307 | public static final String CONVERSATION_ID = "conversationId"; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 308 | public static final String SUBJECT = "subject"; |
| 309 | public static final String SNIPPET = "snippet"; |
| 310 | public static final String FROM = "fromAddress"; |
| 311 | public static final String TO = "toAddresses"; |
| 312 | public static final String CC = "ccAddresses"; |
| 313 | public static final String BCC = "bccAddresses"; |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 314 | public static final String REPLY_TO = "replyToAddress"; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 315 | public static final String DATE_RECEIVED_MS = "dateReceivedMs"; |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 316 | public static final String BODY_HTML = "bodyHtml"; |
| 317 | public static final String BODY_TEXT = "bodyText"; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 318 | public static final String EMBEDS_EXTERNAL_RESOURCES = "bodyEmbedsExternalResources"; |
| 319 | public static final String REF_MESSAGE_ID = "refMessageId"; |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 320 | public static final String DRAFT_TYPE = "draftType"; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 321 | public static final String INCLUDE_QUOTED_TEXT = "includeQuotedText"; |
| 322 | public static final String QUOTE_START_POS = "quoteStartPos"; |
| 323 | public static final String CLIENT_CREATED = "clientCreated"; |
| 324 | public static final String CUSTOM_FROM_ADDRESS = "customFromAddress"; |
Mindy Pereira | f30cc09 | 2011-12-29 14:02:40 -0800 | [diff] [blame] | 325 | public static final String HAS_ATTACHMENTS = "hasAttachments"; |
| 326 | public static final String ATTACHMENT_LIST_URI = "attachmentListUri"; |
| 327 | public static final String MESSAGE_FLAGS = "messagesFlags"; |
Mindy Pereira | 6f92de6 | 2011-12-19 11:31:48 -0800 | [diff] [blame] | 328 | |
| 329 | private MessageColumns() {} |
| 330 | } |
Mindy Pereira | f30cc09 | 2011-12-29 14:02:40 -0800 | [diff] [blame] | 331 | |
| 332 | // We define a "folder" as anything that contains a list of conversations. |
| 333 | public static final String ATTACHMENT_LIST_TYPE = |
| 334 | "vnd.android.cursor.dir/vnd.com.android.mail.attachment"; |
| 335 | public static final String ATTACHMENT_TYPE = |
| 336 | "vnd.android.cursor.item/vnd.com.android.mail.attachment"; |
| 337 | |
| 338 | public static final String[] ATTACHMENT_PROJECTION = { |
| 339 | BaseColumns._ID, |
| 340 | AttachmentColumns.NAME, |
| 341 | AttachmentColumns.SIZE, |
| 342 | AttachmentColumns.ORIGIN, |
| 343 | AttachmentColumns.ORIGIN_EXTRAS, |
| 344 | AttachmentColumns.CONTENT_TYPE, |
| 345 | AttachmentColumns.SYNCED |
| 346 | }; |
| 347 | |
Mindy Pereira | 3263fa9 | 2012-01-04 10:15:32 -0800 | [diff] [blame] | 348 | public static final int ACCOUNT_NAME_COLUMN = 1; |
| 349 | |
Mindy Pereira | f30cc09 | 2011-12-29 14:02:40 -0800 | [diff] [blame] | 350 | public static final class AttachmentColumns { |
| 351 | public static final String NAME = "name"; |
| 352 | public static final String SIZE = "size"; |
| 353 | public static final String ORIGIN = "origin"; |
| 354 | public static final String ORIGIN_EXTRAS = "originExtras"; |
| 355 | public static final String CONTENT_TYPE = "contentType"; |
| 356 | public static final String SYNCED = "synced"; |
| 357 | } |
Paul Westbrook | 82ea6da | 2011-12-15 11:03:51 -0800 | [diff] [blame] | 358 | } |