Home | History | Annotate | Download | only in mail
      1 /*
      2  * Copyright (C) 2008 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.emailcommon.mail;
     18 
     19 /**
     20  * Flags that can be applied to Messages.
     21  */
     22 public enum Flag {
     23 
     24     // If adding new flags: ALL FLAGS MUST BE UPPER CASE.
     25 
     26     DELETED,
     27     SEEN,
     28     ANSWERED,
     29     FLAGGED,
     30     DRAFT,
     31     RECENT,
     32 
     33     /*
     34      * The following flags are for internal library use only.
     35      * TODO Eventually we should creates a Flags class that extends ArrayList that allows
     36      * these flags and Strings to represent user defined flags. At that point the below
     37      * flags should become user defined flags.
     38      */
     39     /**
     40      * Delete and remove from the LocalStore immediately.
     41      */
     42     X_DESTROYED,
     43 
     44     /**
     45      * Sending of an unsent message failed. It will be retried. Used to show status.
     46      */
     47     X_SEND_FAILED,
     48 
     49     /**
     50      * Sending of an unsent message is in progress.
     51      */
     52     X_SEND_IN_PROGRESS,
     53 
     54     /**
     55      * Indicates that a message is fully downloaded from the server and can be viewed normally.
     56      * This does not include attachments, which are never downloaded fully.
     57      */
     58     X_DOWNLOADED_FULL,
     59 
     60     /**
     61      * Indicates that a message is partially downloaded from the server and can be viewed but
     62      * more content is available on the server.
     63      * This does not include attachments, which are never downloaded fully.
     64      */
     65     X_DOWNLOADED_PARTIAL,
     66 
     67     /**
     68      * General purpose flag that can be used by any remote store.  The flag will be
     69      * saved and restored by the LocalStore.
     70      */
     71     X_STORE_1,
     72 
     73     /**
     74      * General purpose flag that can be used by any remote store.  The flag will be
     75      * saved and restored by the LocalStore.
     76      */
     77     X_STORE_2,
     78 
     79 }
     80