VirtualBox

source: vbox/trunk/src/libs/xpcom18a4/xpcom/ds/nsISupportsArray.idl@ 53433

Last change on this file since 53433 was 1, checked in by vboxsync, 55 years ago

import

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.4 KB
Line 
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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) 1998
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
39#include "nsISupports.idl"
40#include "nsICollection.idl"
41
42/*
43 * This entire interface is deprecated and should not be used.
44 * See nsIArray and nsIMutableArray for the new implementations.
45 *
46 * 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
47 * 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
48 */
49
50native nsISupportsArrayEnumFunc(nsISupportsArrayEnumFunc);
51
52%{C++
53
54class nsIBidirectionalEnumerator;
55
56#define NS_SUPPORTSARRAY_CID \
57{ /* bda17d50-0d6b-11d3-9331-00104ba0fd40 */ \
58 0xbda17d50, \
59 0x0d6b, \
60 0x11d3, \
61 {0x93, 0x31, 0x00, 0x10, 0x4b, 0xa0, 0xfd, 0x40} \
62}
63#define NS_SUPPORTSARRAY_CONTRACTID "@mozilla.org/supports-array;1"
64#define NS_SUPPORTSARRAY_CLASSNAME "Supports Array"
65
66// Enumerator callback function. Return PR_FALSE to stop
67typedef PRBool (*nsISupportsArrayEnumFunc)(nsISupports* aElement, void *aData);
68
69%}
70
71[scriptable, uuid(791eafa0-b9e6-11d1-8031-006008159b5a)]
72interface nsISupportsArray : nsICollection {
73
74 [notxpcom] boolean Equals([const] in nsISupportsArray other);
75
76 [notxpcom] nsISupports ElementAt(in unsigned long aIndex);
77
78 [notxpcom] long IndexOf([const] in nsISupports aPossibleElement);
79 [notxpcom] long IndexOfStartingAt([const] in nsISupports aPossibleElement,
80 in unsigned long aStartIndex);
81 [notxpcom] long LastIndexOf([const] in nsISupports aPossibleElement);
82
83 // xpcom-compatible versions
84 long GetIndexOf(in nsISupports aPossibleElement);
85 long GetIndexOfStartingAt(in nsISupports aPossibleElement,
86 in unsigned long aStartIndex);
87 long GetLastIndexOf(in nsISupports aPossibleElement);
88
89 [notxpcom] boolean InsertElementAt(in nsISupports aElement,
90 in unsigned long aIndex);
91 [notxpcom] boolean ReplaceElementAt(in nsISupports aElement,
92 in unsigned long aIndex);
93
94 [notxpcom] boolean RemoveElementAt(in unsigned long aIndex);
95 [notxpcom] boolean RemoveLastElement([const] in nsISupports aElement);
96
97 // xpcom-compatible versions
98 void DeleteLastElement(in nsISupports aElement);
99 void DeleteElementAt(in unsigned long aIndex);
100
101 [notxpcom] boolean AppendElements(in nsISupportsArray aElements);
102
103 void Compact();
104
105 [notxpcom, noscript]
106 boolean EnumerateForwards(in nsISupportsArrayEnumFunc aFunc,
107 in voidPtr aData);
108 [notxpcom, noscript]
109 boolean EnumerateBackwards(in nsISupportsArrayEnumFunc aFunc,
110 in voidPtr aData);
111
112 nsISupportsArray clone();
113
114 [notxpcom] boolean MoveElement(in long aFrom,
115 in long aTo);
116
117 [notxpcom] boolean InsertElementsAt(in nsISupportsArray aOther,
118 in unsigned long aIndex);
119
120 [notxpcom] boolean RemoveElementsAt(in unsigned long aIndex,
121 in unsigned long aCount);
122
123 [notxpcom] boolean SizeTo(in long aSize);
124
125};
126
127%{C++
128
129// Construct and return a default implementation of nsISupportsArray:
130extern NS_COM nsresult
131NS_NewISupportsArray(nsISupportsArray** aInstancePtrResult);
132
133// Construct and return a default implementation of an enumerator for nsISupportsArrays:
134extern NS_COM nsresult
135NS_NewISupportsArrayEnumerator(nsISupportsArray* array,
136 nsIBidirectionalEnumerator* *aInstancePtrResult);
137
138
139%}
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette