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
|
/* -*- Mode: IDL; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* 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"
[scriptable, uuid(290412eb-5824-4087-8984-05450c9397be)]
interface nsIImapFlagAndUidState : nsISupports
{
readonly attribute long numberOfMessages;
readonly attribute long numberOfRecentMessages;
/**
* If a full update, the total number of deleted messages
* in the folder; if a partial update, the number of deleted
* messages in the partial update
**/
readonly attribute long numberOfDeletedMessages;
/**
* If this is true, instead of fetching 1:* (FLAGS), and putting all
* UIDs and flags in the array, we only fetched the uids and flags
* that changed since the last time we were selected on this folder.
* This means we have a sparse array, and should not assume missing
* UIDs have been deleted.
**/
readonly attribute boolean partialUIDFetch;
/**
* Set of flags the server supports storing per message. See nsImapCore.h
* for the set of flags.
*/
readonly attribute unsigned short supportedUserFlags;
/**
* OR's the passed in flags with the previous flags because we want to
* accumulate the FLAGS and PERMANENTFLAGS response.
*
* @param aFlags - flags to OR with current flags.
*/
void orSupportedUserFlags(in unsigned short aFlags);
void getUidOfMessage(in long zeroBasedIndex, out unsigned long result);
void getMessageFlags(in long zeroBasedIndex, out unsigned short result);
void setMessageFlags(in long zeroBasedIndex, in unsigned short flags);
void expungeByIndex(in unsigned long zeroBasedIndex);
void addUidFlagPair(in unsigned long uid, in unsigned short flags, in unsigned long zeroBasedIndex);
void addUidCustomFlagPair(in unsigned long uid, in string customFlag);
string getCustomFlags(in unsigned long uid); // returns space-separated keywords
void reset();
void clearCustomFlags(in unsigned long uid);
/**
* Adds custom attributes to a hash table for the purpose of storing them
* them.
* @param aUid UID of the associated msg
* @param aCustomAttributeName Name of the custom attribute value
* @param aCustomAttributeValue Value of the attribute,
*/
void setCustomAttribute(in unsigned long aUid,
in ACString aCustomAttributeName,
in ACString aCustomAttributeValue);
/**
* Gets the custom attributes from the hash table where they were stored earlier
* them.
* @param aUid UID of the associated msg
* @param aCustomAttributeName Name of the custom attribute value
* @param aCustomAttributeValue Value of the attribute,
*/
ACString getCustomAttribute(in unsigned long aUid,
in ACString aCustomAttributeName);
};
|