xpcom/ds/nsISupportsArray.idl

branch
TOR_BUG_3246
changeset 7
129ffea94266
equal deleted inserted replaced
-1:000000000000 0:0d068dd9c131
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /* This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
5
6
7 #include "nsICollection.idl"
8
9 /*
10 * This entire interface is deprecated and should not be used.
11 * See nsIArray and nsIMutableArray for the new implementations.
12 *
13 * http://groups.google.com/groups?q=nsisupportsarray+group:netscape.public.mozilla.xpcom&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=3D779491.3050506%40netscape.com&rnum=2
14 * http://groups.google.com/groups?q=nsisupportsarray+group:netscape.public.mozilla.xpcom&hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=al8412%245ab2%40ripley.netscape.com&rnum=8
15 */
16
17 %{C++
18
19 class nsIBidirectionalEnumerator;
20 class nsISupportsArray;
21
22 #define NS_SUPPORTSARRAY_CID \
23 { /* bda17d50-0d6b-11d3-9331-00104ba0fd40 */ \
24 0xbda17d50, \
25 0x0d6b, \
26 0x11d3, \
27 {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \
28 }
29 #define NS_SUPPORTSARRAY_CONTRACTID "@mozilla.org/supports-array;1"
30
31 %}
32
33 [scriptable, uuid(241addc8-3608-4e73-8083-2fd6fa09eba2)]
34 interface nsISupportsArray : nsICollection {
35
36 [notxpcom] boolean Equals([const] in nsISupportsArray other);
37
38 [notxpcom] long IndexOf([const] in nsISupports aPossibleElement);
39 [notxpcom] long IndexOfStartingAt([const] in nsISupports aPossibleElement,
40 in unsigned long aStartIndex);
41 [notxpcom] long LastIndexOf([const] in nsISupports aPossibleElement);
42
43 // xpcom-compatible versions
44 long GetIndexOf(in nsISupports aPossibleElement);
45 long GetIndexOfStartingAt(in nsISupports aPossibleElement,
46 in unsigned long aStartIndex);
47 long GetLastIndexOf(in nsISupports aPossibleElement);
48
49 [notxpcom] boolean InsertElementAt(in nsISupports aElement,
50 in unsigned long aIndex);
51 [notxpcom] boolean ReplaceElementAt(in nsISupports aElement,
52 in unsigned long aIndex);
53
54 [notxpcom] boolean RemoveElementAt(in unsigned long aIndex);
55 [notxpcom] boolean RemoveLastElement([const] in nsISupports aElement);
56
57 // xpcom-compatible versions
58 void DeleteLastElement(in nsISupports aElement);
59 void DeleteElementAt(in unsigned long aIndex);
60
61 [notxpcom] boolean AppendElements(in nsISupportsArray aElements);
62
63 void Compact();
64
65
66 nsISupportsArray clone();
67
68 [notxpcom] boolean MoveElement(in long aFrom,
69 in long aTo);
70
71 [notxpcom] boolean InsertElementsAt(in nsISupportsArray aOther,
72 in unsigned long aIndex);
73
74 [notxpcom] boolean RemoveElementsAt(in unsigned long aIndex,
75 in unsigned long aCount);
76
77 [notxpcom] boolean SizeTo(in long aSize);
78
79 };
80
81 %{C++
82
83 // Construct and return a default implementation of nsISupportsArray:
84 extern nsresult
85 NS_NewISupportsArray(nsISupportsArray** aInstancePtrResult);
86
87 %}

mercurial