DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (5f5af71fa66b)

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* ***** BEGIN LICENSE BLOCK *****
 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
 *
 * The contents of this file are subject to the Mozilla Public License Version
 * 1.1 (the "License"); you may not use this file except in compliance with
 * the License. You may obtain a copy of the License at
 * http://www.mozilla.org/MPL/
 *
 * Software distributed under the License is distributed on an "AS IS" basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
 * for the specific language governing rights and limitations under the
 * License.
 *
 * The Original Code is mozilla.org code.
 *
 * The Initial Developer of the Original Code is
 * Netscape Communications Corporation.
 * Portions created by the Initial Developer are Copyright (C) 1998
 * the Initial Developer. All Rights Reserved.
 *
 * Contributor(s):
 *  Siddharth Agarwal <sid.bugzilla@gmail.com>
 *
 * Alternatively, the contents of this file may be used under the terms of
 * either of the GNU General Public License Version 2 or later (the "GPL"),
 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
 * in which case the provisions of the GPL or the LGPL are applicable instead
 * of those above. If you wish to allow use of your version of this file only
 * under the terms of either the GPL or the LGPL, and not to allow others to
 * use your version of this file under the terms of the MPL, indicate your
 * decision by deleting the provisions above and replace them with the notice
 * and other provisions required by the GPL or the LGPL. If you do not delete
 * the provisions above, a recipient may use your version of this file under
 * the terms of any one of the MPL, the GPL or the LGPL.
 *
 * ***** END LICENSE BLOCK ***** */

typedef unsigned long nsMsgMessageFlagType;

/// Flags about a single message.
[scriptable,uuid(1ea3acdb-7b9f-4e35-9513-76e0a0cc6baa)]
interface nsMsgMessageFlags
{
  /// This message has been read
  const nsMsgMessageFlagType Read            = 0x00000001;
  
  /// A reply to this message has been successfully sent
  const nsMsgMessageFlagType Replied         = 0x00000002;
  
  /// This message has been flagged
  const nsMsgMessageFlagType Marked          = 0x00000004;

  /**
   * This message has already gone, but the folder hasn't been compacted yet.
   * Since actually removing a message from a folder is a semi-expensive
   * operation, we tend to delay it; messages with this bit set will be removed
   * the next time folder compaction is done.  Once this bit is set, it never
   * gets un-set.
   */
  const nsMsgMessageFlagType Expunged        = 0x00000008;

  /**
   * The subject of this message has "Re:" on the front.  The folder summary
   * uniquifies all of the strings in it, and to help this, any string which
   * begins with "Re:" has that stripped first.  This bit is then set, so that
   * when presenting the message, we know to put it back (since the "Re:" is
   * not itself stored in the file.)
   */
  const nsMsgMessageFlagType HasRe           = 0x00000010;

  /// The children of this sub-thread are folded in the display
  const nsMsgMessageFlagType Elided          = 0x00000020;

  /// This news article or IMAP message is present in the disk cache
  const nsMsgMessageFlagType Offline         = 0x00000080;

  /// This thread is being watched
  const nsMsgMessageFlagType Watched         = 0x00000100;

  /// This message's sender has been authenticated when sending this message
  const nsMsgMessageFlagType SenderAuthed    = 0x00000200;

  /**
   * This message's body is only the first ten or so of the message, and we
   * need to add a link to let the user download the rest of it from the POP
   * server.
   */
  const nsMsgMessageFlagType Partial         = 0x00000400;

  /**
   * This message is queued for delivery.  This only ever gets set on messages
   * in the queue folder, but is used to protect against the case of othe
   * messages having made their way in there somehow -- if some other program
   * put a message in the queue, we don't want to later deliver it!
   */
  const nsMsgMessageFlagType Queued          = 0x00000800;

  /// This message has been forwarded
  const nsMsgMessageFlagType Forwarded       = 0x00001000;

  /**
   * These are used to remember the message priority in the mozilla status
   * flags, so we can regenerate a priority after a rule (or user) has changed
   * it. They are not returned in MSG_MessageLine.flags, just in mozilla-status,
   * so if you need more non-persistent flags, you could share these bits. But
   * it would be wrong.
   */
  const nsMsgMessageFlagType Priorities      = 0x0000E000;

  /// This message is new since the last time the folder was closed
  const nsMsgMessageFlagType New             = 0x00010000;

  /// This thread has been ignored
  const nsMsgMessageFlagType Ignored         = 0x00040000;

  /// This IMAP message has been marked deleted on the server
  const nsMsgMessageFlagType IMAPDeleted     = 0x00200000;

  /**
   * This message has requested to send a message delivery notification to its
   * sender
   */
  const nsMsgMessageFlagType MDNReportNeeded = 0x00400000;

  /**
   * A message delivery notification has been sent for this message. No more
   * reports should be sent.
   */
  const nsMsgMessageFlagType MDNReportSent   = 0x00800000;

  /// This message is a template
  const nsMsgMessageFlagType Template        = 0x01000000;

  /// This message has files attached to it
  const nsMsgMessageFlagType Attachment      = 0x10000000;

  /**
   * These are used to remember the message labels in the mozilla status2
   * flags. so we can regenerate a priority after a  rule (or user) has changed
   * it. They are not returned in nsMsgHdr.flags, just in mozilla-status2, so
   * if you need more non-persistent flags, you could share these bits. But it
   * would be wrong.
   */
  const nsMsgMessageFlagType Labels          = 0x0E000000;

  // We're trying to reserve the high byte of the flags for view flags, so,
  // don't add flags to the high byte if possible.

  /// The list of all message flags to not write to disk
  const nsMsgMessageFlagType RuntimeOnly     = Elided;
};

typedef unsigned long nsMsgProcessingFlagType;

/**
 * Definitions of processing flags. These flags are not saved to the database.
 * They are used to define states for message processing. Any changes
 * to these flags need to be supported in the key sets in nsMsgDBFolder
 */
[scriptable,uuid(1f7d642b-de2a-45f0-a27f-9c9ce0b741d8)]
interface nsMsgProcessingFlags
{
  /// This message needs junk classification
  const nsMsgProcessingFlagType ClassifyJunk   = 0x00000001;

  /// This message needs traits classification
  const nsMsgProcessingFlagType ClassifyTraits = 0x00000002;

  /// This message has completed any needed traits classification
  const nsMsgProcessingFlagType TraitsDone     = 0x00000004;

  /// This message has completed any needed postPlugin filtering
  const nsMsgProcessingFlagType FiltersDone    = 0x00000008;

  /// This message has a move scheduled by filters
  const nsMsgProcessingFlagType FilterToMove   = 0x00000010;

  /**
   * This message is new to the folder and has yet to be reported via the
   *  msgsClassified notification. This flag is required because the previously
   *  used mechanism relied on the database's list of new messages and its
   *  concept of 'new' is overloaded and has user-visible ramifications.  This
   *  led to messages potentially being considered multiple times.
   *
   * Unfortunately none of the Done processing flags above are suitable for our
   *  needs because they are not consistently applied and basically constitute
   *  memory leaks (which makes the not consistently applied thing a good
   *  thing.)
   *
   * I suspect we cannot reliably convert the Done flags above to our use case
   *  either because of the situation where the user quits the program after the
   *  messages are added but before the messages are processed.  Since the
   *  processing flags are suppression flags, assuming the 'new' status is
   *  persisted to the next time we are run, then this would represent a
   *  change in behaviour.  I would need to exactly understand the new semantics
   *  to know for sure though.
   */
  const nsMsgProcessingFlagType NotReportedClassified = 0x00000020;

  /// Number of processing flags
  const nsMsgProcessingFlagType NumberOfFlags  = 6;
};