Back to index

lightning-sunbird  0.9+nobinonly
nsMsgMessageFlags.h
Go to the documentation of this file.
00001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
00002 /* ***** BEGIN LICENSE BLOCK *****
00003  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
00004  *
00005  * The contents of this file are subject to the Mozilla Public License Version
00006  * 1.1 (the "License"); you may not use this file except in compliance with
00007  * the License. You may obtain a copy of the License at
00008  * http://www.mozilla.org/MPL/
00009  *
00010  * Software distributed under the License is distributed on an "AS IS" basis,
00011  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
00012  * for the specific language governing rights and limitations under the
00013  * License.
00014  *
00015  * The Original Code is mozilla.org code.
00016  *
00017  * The Initial Developer of the Original Code is
00018  * Netscape Communications Corporation.
00019  * Portions created by the Initial Developer are Copyright (C) 1998
00020  * the Initial Developer. All Rights Reserved.
00021  *
00022  * Contributor(s):
00023  *
00024  * Alternatively, the contents of this file may be used under the terms of
00025  * either of the GNU General Public License Version 2 or later (the "GPL"),
00026  * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
00027  * in which case the provisions of the GPL or the LGPL are applicable instead
00028  * of those above. If you wish to allow use of your version of this file only
00029  * under the terms of either the GPL or the LGPL, and not to allow others to
00030  * use your version of this file under the terms of the MPL, indicate your
00031  * decision by deleting the provisions above and replace them with the notice
00032  * and other provisions required by the GPL or the LGPL. If you do not delete
00033  * the provisions above, a recipient may use your version of this file under
00034  * the terms of any one of the MPL, the GPL or the LGPL.
00035  *
00036  * ***** END LICENSE BLOCK ***** */
00037 
00038 #ifndef _msgMessageFlags_h_
00039 #define _msgMessageFlags_h_
00040 
00041 #include "prtypes.h"
00042 
00043 typedef PRInt32 MsgFlags;
00044 
00045 /* Flags about a single message.  These values are used in the MSG_MessageLine
00046    struct and in a folder's mozilla-status line. The summary file database
00047    will use the same set of flags, and some additional flags.
00048    We also have the mozilla-status-2 line...
00049 */
00050 
00051 #define MSG_FLAG_READ     0x0001    /* has been read */
00052 #define MSG_FLAG_REPLIED  0x0002    /* a reply has been successfully sent */
00053 #define MSG_FLAG_MARKED   0x0004    /* the user-provided mark */
00054 #define MSG_FLAG_EXPUNGED 0x0008    /* already gone (when folder not
00055                                        compacted.)  Since actually
00056                                        removing a message from a
00057                                        folder is a semi-expensive
00058                                        operation, we tend to delay it;
00059                                        messages with this bit set will
00060                                        be removed the next time folder
00061                                        compaction is done.  Once this
00062                                        bit is set, it never gets
00063                                        un-set.  */
00064 #define MSG_FLAG_HAS_RE   0x0010    /* whether subject has "Re:" on
00065                                        the front.  The folder summary
00066                                        uniquifies all of the strings
00067                                        in it, and to help this, any
00068                                        string which begins with "Re:"
00069                                        has that stripped first.  This
00070                                        bit is then set, so that when
00071                                        presenting the message, we know
00072                                        to put it back (since the "Re:"
00073                                        is not itself stored in the
00074                                        file.)  */
00075 #define MSG_FLAG_ELIDED   0x0020    /* Whether the children of this
00076                                        sub-thread are folded in the
00077                                        display.  */
00078 #define MSG_FLAG_OFFLINE  0x0080   /* db has offline news or imap article
00079                                                                               */
00080 #define MSG_FLAG_WATCHED  0x0100    /* If set, then this thread is watched (in
00081                                                                   3.0, this was MSG_FLAG_UPDATING).*/
00082 #define MSG_FLAG_SENDER_AUTHED    0x0200    /* If set, then this message's sender
00083                                        has been authenticated when sending this msg. */
00084 #define MSG_FLAG_PARTIAL  0x0400    /* If set, then this message's body is
00085                                        only the first ten lines or so of the
00086                                        message, and we need to add a link to
00087                                        let the user download the rest of it
00088                                        from the POP server. */
00089 #define MSG_FLAG_QUEUED   0x0800    /* If set, this message is queued for
00090                                        delivery.  This only ever gets set on
00091                                        messages in the queue folder, but is
00092                                        used to protect against the case of
00093                                        other messages having made their way
00094                                        in there somehow -- if some other
00095                                        program put a message in the queue, we
00096                                        don't want to later deliver it! */
00097 #define MSG_FLAG_FORWARDED  0x1000  /* this message has been forwarded */
00098 #define MSG_FLAG_PRIORITIES 0xE000 /* These are used to remember the message
00099                                       priority in the mozilla status flags
00100                                       so we can regenerate a priority after a 
00101                                       rule (or user) has changed it. They are
00102                                       not returned in MSG_MessageLine.flags, 
00103                                       just in mozilla-status, so if you need
00104                                       more non-persistent flags, you could 
00105                                       share these bits. But it would be wrong.
00106                                    .  */
00107 
00108 #define MSG_FLAG_NEW        0x10000       /* This msg is new since the last time
00109                                                                   the folder was closed.
00110                                                                   */
00111 #define MSG_FLAG_IGNORED    0x40000 /* the thread is ignored */
00112 
00113 #define MSG_FLAG_IMAP_DELETED      0x200000 /* message is marked deleted on the server */
00114 
00115 #define MSG_FLAG_MDN_REPORT_NEEDED 0x400000 /* This msg required to send an MDN 
00116                                                                               * to the sender of the message
00117                                                                               */
00118 #define MSG_FLAG_MDN_REPORT_SENT   0x800000 /* An MDN report message has been
00119                                                                               * sent for this message. No more
00120                                                                               * MDN report should be sent to the
00121                                                                               * sender
00122                                                                               */
00123 #define MSG_FLAG_TEMPLATE       0x1000000 /* this message is a template */
00124 #define MSG_FLAG_ATTACHMENT        0x10000000    /* this message has files attached to it */
00125 
00126 #define MSG_FLAG_LABELS 0xE000000  /* These are used to remember the message
00127                                       labels in the mozilla status2 flags
00128                                       so we can regenerate a priority after a 
00129                                       rule (or user) has changed it. They are
00130                                       not returned in nsMsgHdr.flags, 
00131                                       just in mozilla-status2, so if you need
00132                                       more non-persistent flags, you could 
00133                                       share these bits. But it would be wrong.
00134                                    .  */
00135 // we're trying to reserve the high byte of the flags for view flags,
00136 // so, don't add flags to the high byte if possible.
00137 
00138 /* The list of all message flags to not write to disk. */
00139 #define MSG_FLAG_RUNTIME_ONLY   (MSG_FLAG_ELIDED)
00140 
00141 #endif