summaryrefslogtreecommitdiffstats
path: root/comm/mailnews/search/public/nsMsgFilterCore.idl
blob: 42adc5e730b2f35164fc45e71d69a894432f3b1e (plain)
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
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#include "nsMsgSearchCore.idl"

typedef long nsMsgFilterTypeType;

[scriptable,uuid(b963a9c6-3a75-4d91-9f79-7186418d4d2d)]
interface nsMsgFilterType : nsISupports {
    /* these longs are all actually of type nsMsgFilterTypeType */
  const long None             = 0x00;
  const long InboxRule        = 0x01;
  const long InboxJavaScript  = 0x02;
  const long Inbox            = InboxRule | InboxJavaScript;
  const long NewsRule         = 0x04;
  const long NewsJavaScript   = 0x08;
  const long News             = NewsRule | NewsJavaScript;
  const long Incoming         = Inbox | News;
  const long Manual           = 0x10;
  const long PostPlugin       = 0x20; // After bayes filtering
  const long PostOutgoing     = 0x40; // After sending
  const long Archive          = 0x80; // Before archiving
  const long Periodic         = 0x100;// On a repeating timer
  const long All              = Incoming | Manual;
};

typedef long nsMsgFilterMotionValue;

typedef long nsMsgFilterIndex;

typedef long nsMsgRuleActionType;

[scriptable, uuid(7726FE79-AFA3-4a39-8292-733AEE288737)]
interface nsMsgFilterAction : nsISupports {

    // Custom Action.
    const long Custom=-1;
    /* if you change these, you need to update filter.properties,
       look for filterActionX */
    /* these longs are all actually of type nsMsgFilterActionType */
    const long None=0;        /* uninitialized state */
    const long MoveToFolder=1;
    const long ChangePriority=2;
    const long Delete=3;
    const long MarkRead=4;
    const long KillThread=5;
    const long WatchThread=6;
    const long MarkFlagged=7;
    const long Reply=9;
    const long Forward=10;
    const long StopExecution=11;
    const long DeleteFromPop3Server=12;
    const long LeaveOnPop3Server=13;
    const long JunkScore=14;
    const long FetchBodyFromPop3Server=15;
    const long CopyToFolder=16;
    const long AddTag=17;
    const long KillSubthread=18;
    const long MarkUnread=19;
};