1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* ***** BEGIN LICENSE BLOCK *****
3 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
4 *
5 * The contents of this file are subject to the Mozilla Public License Version
6 * 1.1 (the "License"); you may not use this file except in compliance with
7 * the License. You may obtain a copy of the License at
8 * http://www.mozilla.org/MPL/
9 *
10 * Software distributed under the License is distributed on an "AS IS" basis,
11 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12 * for the specific language governing rights and limitations under the
13 * License.
14 *
15 * The Original Code is mozilla.org code.
16 *
17 * The Initial Developer of the Original Code is
18 * Netscape Communications Corporation.
19 * Portions created by the Initial Developer are Copyright (C) 1999
20 * the Initial Developer. All Rights Reserved.
21 *
22 * Contributor(s):
23 *
24 * Alternatively, the contents of this file may be used under the terms of
25 * either of the GNU General Public License Version 2 or later (the "GPL"),
26 * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27 * in which case the provisions of the GPL or the LGPL are applicable instead
28 * of those above. If you wish to allow use of your version of this file only
29 * under the terms of either the GPL or the LGPL, and not to allow others to
30 * use your version of this file under the terms of the MPL, indicate your
31 * decision by deleting the provisions above and replace them with the notice
32 * and other provisions required by the GPL or the LGPL. If you do not delete
33 * the provisions above, a recipient may use your version of this file under
34 * the terms of any one of the MPL, the GPL or the LGPL.
35 *
36 * ***** END LICENSE BLOCK ***** */
37
38 #include "nsISupports.idl"
39 #include "MailNewsTypes2.idl"
40
41 [scriptable, uuid(83254767-a395-4bc6-be46-78687c5f1bba)]
42 interface nsIDBFolderInfo : nsISupports {
43 attribute long Flags;
44 long OrFlags(in long flags);
45 long AndFlags(in long flags);
46 void SetHighWater(in nsMsgKey highwater, in boolean force);
47 attribute nsMsgKey HighWater;
48 attribute nsMsgKey ExpiredMark;
49 attribute unsigned long FolderSize;
50 attribute unsigned long FolderDate;
51 void ChangeNumUnreadMessages(in long delta);
52 void ChangeNumMessages(in long delta);
53
54 // NumUnreadMessages and NumMessages will never return negative numbers. 0 means 'no msgs'.
55 attribute long NumUnreadMessages;
56 attribute long NumMessages;
57
58 attribute long expungedBytes;
59 attribute long ImapUidValidity;
60 attribute unsigned long Version;
61 attribute long ImapTotalPendingMessages;
62 attribute long ImapUnreadPendingMessages;
63 attribute wchar IMAPHierarchySeparator;
64
65 attribute nsMsgViewTypeValue viewType;
66 attribute nsMsgViewFlagsTypeValue viewFlags;
67 attribute nsMsgViewSortTypeValue sortType;
68 attribute nsMsgViewSortOrderValue sortOrder;
69
70 void ChangeExpungedBytes(in long delta);
71
72 /**
73 * Gets a string property from the folder.
74 *
75 * @param propertyName The name of the property for the value to retrieve.
76 */
77 ACString getCharProperty(in string propertyName);
78
79 /**
80 * Sets a string property from the folder.
81 *
82 * @param propertyName The name of the property for which to set a value
83 * @param propertyValue The new value of the property.
84 */
85 void setCharProperty(in string aPropertyName, in ACString aPropertyValue);
86 void setUint32Property(in string propertyName, in unsigned long propertyValue);
87 unsigned long getUint32Property(in string propertyName, in unsigned long defaultValue);
88 boolean getBooleanProperty(in string propertyName, in boolean defaultValue);
89 void setBooleanProperty(in string propertyName, in boolean aPropertyValue);
90 nsIDBFolderInfo GetTransferInfo();
91 void initFromTransferInfo(in nsIDBFolderInfo transferInfo);
92
93 /**
94 * Gets/Sets the current character set for the folder. If there is no
95 * specific character set for the folder, it will return an empty string.
96 */
97 attribute ACString characterSet;
98
99 /**
100 * Returns the effective character set on the folder. If there is no specific
101 * set defined for the folder, it will return the default character set.
102 */
103 readonly attribute ACString effectiveCharacterSet;
104
105 attribute boolean characterSetOverride;
106
107 attribute AString locale;
108 attribute AString mailboxName;
109
110
111 AString getProperty(in string propertyName);
112 void setProperty(in string propertyName, in AString propertyStr);
113
114 attribute string knownArtsSet;
115 attribute ACString folderName;
116 };