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
|
/* -*- Mode: C++; tab-width: 2; 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 "nsISupports.idl"
#include "nsIAtom.idl"
interface nsIMsgFolder;
interface nsIMsgDBHdr;
typedef unsigned long folderListenerNotifyFlagValue;
[scriptable, uuid(f60ee1a2-6d81-422c-958f-d408b1b2daa7)]
interface nsIFolderListener : nsISupports {
const folderListenerNotifyFlagValue added = 0x1;
void OnItemAdded(in nsIMsgFolder aParentItem,
in nsISupports aItem);
const folderListenerNotifyFlagValue removed = 0x2;
void OnItemRemoved(in nsIMsgFolder aParentItem,
in nsISupports aItem);
const folderListenerNotifyFlagValue propertyChanged = 0x4;
void OnItemPropertyChanged(in nsIMsgFolder aItem,
in nsIAtom aProperty,
in string aOldValue,
in string aNewValue);
const folderListenerNotifyFlagValue intPropertyChanged = 0x8;
// While this property handles long long (64bit wide) values,
// the Javascript engine will only pass values up to 2^53 to the consumers.
void OnItemIntPropertyChanged(in nsIMsgFolder aItem,
in nsIAtom aProperty,
in long long aOldValue,
in long long aNewValue);
const folderListenerNotifyFlagValue boolPropertyChanged = 0x10;
void OnItemBoolPropertyChanged(in nsIMsgFolder aItem,
in nsIAtom aProperty,
in boolean aOldValue,
in boolean aNewValue);
const folderListenerNotifyFlagValue unicharPropertyChanged = 0x20;
void OnItemUnicharPropertyChanged(in nsIMsgFolder aItem,
in nsIAtom aProperty,
in wstring aOldValue,
in wstring aNewValue);
const folderListenerNotifyFlagValue propertyFlagChanged = 0x40;
void OnItemPropertyFlagChanged(in nsIMsgDBHdr aItem,
in nsIAtom aProperty,
in unsigned long aOldFlag,
in unsigned long aNewFlag);
const folderListenerNotifyFlagValue event = 0x80;
void OnItemEvent(in nsIMsgFolder aItem, in nsIAtom aEvent);
const folderListenerNotifyFlagValue all = 0xFFFFFFFF;
// void OnFolderLoaded(in nsIMsgFolder aFolder);
// void OnDeleteOrMoveMessagesCompleted(in nsIMsgFolder aFolder);
};
|