Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | /* nsISupportsIterators.idl --- IDL defining general purpose iterators */ |
michael@0 | 7 | |
michael@0 | 8 | |
michael@0 | 9 | #include "nsISupports.idl" |
michael@0 | 10 | |
michael@0 | 11 | |
michael@0 | 12 | /* |
michael@0 | 13 | ... |
michael@0 | 14 | */ |
michael@0 | 15 | |
michael@0 | 16 | |
michael@0 | 17 | /** |
michael@0 | 18 | * ... |
michael@0 | 19 | */ |
michael@0 | 20 | [scriptable, uuid(7330650e-1dd2-11b2-a0c2-9ff86ee97bed)] |
michael@0 | 21 | interface nsIOutputIterator : nsISupports |
michael@0 | 22 | { |
michael@0 | 23 | /** |
michael@0 | 24 | * Put |anElementToPut| into the underlying container or sequence at the position currently pointed to by this iterator. |
michael@0 | 25 | * The iterator and the underlying container or sequence cooperate to |Release()| |
michael@0 | 26 | * the replaced element, if any and if necessary, and to |AddRef()| the new element. |
michael@0 | 27 | * |
michael@0 | 28 | * The result is undefined if this iterator currently points outside the |
michael@0 | 29 | * useful range of the underlying container or sequence. |
michael@0 | 30 | * |
michael@0 | 31 | * @param anElementToPut the element to place into the underlying container or sequence |
michael@0 | 32 | */ |
michael@0 | 33 | void putElement( in nsISupports anElementToPut ); |
michael@0 | 34 | |
michael@0 | 35 | /** |
michael@0 | 36 | * Advance this iterator to the next position in the underlying container or sequence. |
michael@0 | 37 | */ |
michael@0 | 38 | void stepForward(); |
michael@0 | 39 | }; |
michael@0 | 40 | |
michael@0 | 41 | /** |
michael@0 | 42 | * ... |
michael@0 | 43 | */ |
michael@0 | 44 | [scriptable, uuid(85585e12-1dd2-11b2-a930-f6929058269a)] |
michael@0 | 45 | interface nsIInputIterator : nsISupports |
michael@0 | 46 | { |
michael@0 | 47 | /** |
michael@0 | 48 | * Retrieve (and |AddRef()|) the element this iterator currently points to. |
michael@0 | 49 | * |
michael@0 | 50 | * The result is undefined if this iterator currently points outside the |
michael@0 | 51 | * useful range of the underlying container or sequence. |
michael@0 | 52 | * |
michael@0 | 53 | * @result a new reference to the element this iterator currently points to (if any) |
michael@0 | 54 | */ |
michael@0 | 55 | nsISupports getElement(); |
michael@0 | 56 | |
michael@0 | 57 | /** |
michael@0 | 58 | * Advance this iterator to the next position in the underlying container or sequence. |
michael@0 | 59 | */ |
michael@0 | 60 | void stepForward(); |
michael@0 | 61 | |
michael@0 | 62 | /** |
michael@0 | 63 | * Test if |anotherIterator| points to the same position in the underlying container or sequence. |
michael@0 | 64 | * |
michael@0 | 65 | * The result is undefined if |anotherIterator| was not created by or for the same underlying container or sequence. |
michael@0 | 66 | * |
michael@0 | 67 | * @param anotherIterator another iterator to compare against, created by or for the same underlying container or sequence |
michael@0 | 68 | * @result true if |anotherIterator| points to the same position in the underlying container or sequence |
michael@0 | 69 | */ |
michael@0 | 70 | boolean isEqualTo( in nsISupports anotherIterator ); |
michael@0 | 71 | |
michael@0 | 72 | /** |
michael@0 | 73 | * Create a new iterator pointing to the same position in the underlying container or sequence to which this iterator currently points. |
michael@0 | 74 | * The returned iterator is suitable for use in a subsequent call to |isEqualTo()| against this iterator. |
michael@0 | 75 | * |
michael@0 | 76 | * @result a new iterator pointing at the same position in the same underlying container or sequence as this iterator |
michael@0 | 77 | */ |
michael@0 | 78 | nsISupports clone(); |
michael@0 | 79 | }; |
michael@0 | 80 | |
michael@0 | 81 | /** |
michael@0 | 82 | * ... |
michael@0 | 83 | */ |
michael@0 | 84 | [scriptable, uuid(8da01646-1dd2-11b2-98a7-c7009045be7e)] |
michael@0 | 85 | interface nsIForwardIterator : nsISupports |
michael@0 | 86 | { |
michael@0 | 87 | /** |
michael@0 | 88 | * Retrieve (and |AddRef()|) the element this iterator currently points to. |
michael@0 | 89 | * |
michael@0 | 90 | * The result is undefined if this iterator currently points outside the |
michael@0 | 91 | * useful range of the underlying container or sequence. |
michael@0 | 92 | * |
michael@0 | 93 | * @result a new reference to the element this iterator currently points to (if any) |
michael@0 | 94 | */ |
michael@0 | 95 | nsISupports getElement(); |
michael@0 | 96 | |
michael@0 | 97 | /** |
michael@0 | 98 | * Put |anElementToPut| into the underlying container or sequence at the position currently pointed to by this iterator. |
michael@0 | 99 | * The iterator and the underlying container or sequence cooperate to |Release()| |
michael@0 | 100 | * the replaced element, if any and if necessary, and to |AddRef()| the new element. |
michael@0 | 101 | * |
michael@0 | 102 | * The result is undefined if this iterator currently points outside the |
michael@0 | 103 | * useful range of the underlying container or sequence. |
michael@0 | 104 | * |
michael@0 | 105 | * @param anElementToPut the element to place into the underlying container or sequence |
michael@0 | 106 | */ |
michael@0 | 107 | void putElement( in nsISupports anElementToPut ); |
michael@0 | 108 | |
michael@0 | 109 | /** |
michael@0 | 110 | * Advance this iterator to the next position in the underlying container or sequence. |
michael@0 | 111 | */ |
michael@0 | 112 | void stepForward(); |
michael@0 | 113 | |
michael@0 | 114 | /** |
michael@0 | 115 | * Test if |anotherIterator| points to the same position in the underlying container or sequence. |
michael@0 | 116 | * |
michael@0 | 117 | * The result is undefined if |anotherIterator| was not created by or for the same underlying container or sequence. |
michael@0 | 118 | * |
michael@0 | 119 | * @param anotherIterator another iterator to compare against, created by or for the same underlying container or sequence |
michael@0 | 120 | * @result true if |anotherIterator| points to the same position in the underlying container or sequence |
michael@0 | 121 | */ |
michael@0 | 122 | boolean isEqualTo( in nsISupports anotherIterator ); |
michael@0 | 123 | |
michael@0 | 124 | /** |
michael@0 | 125 | * Create a new iterator pointing to the same position in the underlying container or sequence to which this iterator currently points. |
michael@0 | 126 | * The returned iterator is suitable for use in a subsequent call to |isEqualTo()| against this iterator. |
michael@0 | 127 | * |
michael@0 | 128 | * @result a new iterator pointing at the same position in the same underlying container or sequence as this iterator |
michael@0 | 129 | */ |
michael@0 | 130 | nsISupports clone(); |
michael@0 | 131 | }; |
michael@0 | 132 | |
michael@0 | 133 | /** |
michael@0 | 134 | * ... |
michael@0 | 135 | */ |
michael@0 | 136 | [scriptable, uuid(948defaa-1dd1-11b2-89f6-8ce81f5ebda9)] |
michael@0 | 137 | interface nsIBidirectionalIterator : nsISupports |
michael@0 | 138 | { |
michael@0 | 139 | /** |
michael@0 | 140 | * Retrieve (and |AddRef()|) the element this iterator currently points to. |
michael@0 | 141 | * |
michael@0 | 142 | * The result is undefined if this iterator currently points outside the |
michael@0 | 143 | * useful range of the underlying container or sequence. |
michael@0 | 144 | * |
michael@0 | 145 | * @result a new reference to the element this iterator currently points to (if any) |
michael@0 | 146 | */ |
michael@0 | 147 | nsISupports getElement(); |
michael@0 | 148 | |
michael@0 | 149 | /** |
michael@0 | 150 | * Put |anElementToPut| into the underlying container or sequence at the position currently pointed to by this iterator. |
michael@0 | 151 | * The iterator and the underlying container or sequence cooperate to |Release()| |
michael@0 | 152 | * the replaced element, if any and if necessary, and to |AddRef()| the new element. |
michael@0 | 153 | * |
michael@0 | 154 | * The result is undefined if this iterator currently points outside the |
michael@0 | 155 | * useful range of the underlying container or sequence. |
michael@0 | 156 | * |
michael@0 | 157 | * @param anElementToPut the element to place into the underlying container or sequence |
michael@0 | 158 | */ |
michael@0 | 159 | void putElement( in nsISupports anElementToPut ); |
michael@0 | 160 | |
michael@0 | 161 | /** |
michael@0 | 162 | * Advance this iterator to the next position in the underlying container or sequence. |
michael@0 | 163 | */ |
michael@0 | 164 | void stepForward(); |
michael@0 | 165 | |
michael@0 | 166 | /** |
michael@0 | 167 | * Move this iterator to the previous position in the underlying container or sequence. |
michael@0 | 168 | */ |
michael@0 | 169 | void stepBackward(); |
michael@0 | 170 | |
michael@0 | 171 | /** |
michael@0 | 172 | * Test if |anotherIterator| points to the same position in the underlying container or sequence. |
michael@0 | 173 | * |
michael@0 | 174 | * The result is undefined if |anotherIterator| was not created by or for the same underlying container or sequence. |
michael@0 | 175 | * |
michael@0 | 176 | * @param anotherIterator another iterator to compare against, created by or for the same underlying container or sequence |
michael@0 | 177 | * @result true if |anotherIterator| points to the same position in the underlying container or sequence |
michael@0 | 178 | */ |
michael@0 | 179 | boolean isEqualTo( in nsISupports anotherIterator ); |
michael@0 | 180 | |
michael@0 | 181 | /** |
michael@0 | 182 | * Create a new iterator pointing to the same position in the underlying container or sequence to which this iterator currently points. |
michael@0 | 183 | * The returned iterator is suitable for use in a subsequent call to |isEqualTo()| against this iterator. |
michael@0 | 184 | * |
michael@0 | 185 | * @result a new iterator pointing at the same position in the same underlying container or sequence as this iterator |
michael@0 | 186 | */ |
michael@0 | 187 | nsISupports clone(); |
michael@0 | 188 | }; |
michael@0 | 189 | |
michael@0 | 190 | /** |
michael@0 | 191 | * ... |
michael@0 | 192 | */ |
michael@0 | 193 | [scriptable, uuid(9bd6fdb0-1dd1-11b2-9101-d15375968230)] |
michael@0 | 194 | interface nsIRandomAccessIterator : nsISupports |
michael@0 | 195 | { |
michael@0 | 196 | /** |
michael@0 | 197 | * Retrieve (and |AddRef()|) the element this iterator currently points to. |
michael@0 | 198 | * |
michael@0 | 199 | * The result is undefined if this iterator currently points outside the |
michael@0 | 200 | * useful range of the underlying container or sequence. |
michael@0 | 201 | * |
michael@0 | 202 | * @result a new reference to the element this iterator currently points to (if any) |
michael@0 | 203 | */ |
michael@0 | 204 | nsISupports getElement(); |
michael@0 | 205 | |
michael@0 | 206 | /** |
michael@0 | 207 | * Retrieve (and |AddRef()|) an element at some offset from where this iterator currently points. |
michael@0 | 208 | * The offset may be negative. |getElementAt(0)| is equivalent to |getElement()|. |
michael@0 | 209 | * |
michael@0 | 210 | * The result is undefined if this iterator currently points outside the |
michael@0 | 211 | * useful range of the underlying container or sequence. |
michael@0 | 212 | * |
michael@0 | 213 | * @param anOffset a |0|-based offset from the position to which this iterator currently points |
michael@0 | 214 | * @result a new reference to the indicated element (if any) |
michael@0 | 215 | */ |
michael@0 | 216 | nsISupports getElementAt( in int32_t anOffset ); |
michael@0 | 217 | |
michael@0 | 218 | /** |
michael@0 | 219 | * Put |anElementToPut| into the underlying container or sequence at the position currently pointed to by this iterator. |
michael@0 | 220 | * The iterator and the underlying container or sequence cooperate to |Release()| |
michael@0 | 221 | * the replaced element, if any and if necessary, and to |AddRef()| the new element. |
michael@0 | 222 | * |
michael@0 | 223 | * The result is undefined if this iterator currently points outside the |
michael@0 | 224 | * useful range of the underlying container or sequence. |
michael@0 | 225 | * |
michael@0 | 226 | * @param anElementToPut the element to place into the underlying container or sequence |
michael@0 | 227 | */ |
michael@0 | 228 | void putElement( in nsISupports anElementToPut ); |
michael@0 | 229 | |
michael@0 | 230 | /** |
michael@0 | 231 | * Put |anElementToPut| into the underlying container or sequence at the position |anOffset| away from that currently pointed to by this iterator. |
michael@0 | 232 | * The iterator and the underlying container or sequence cooperate to |Release()| |
michael@0 | 233 | * the replaced element, if any and if necessary, and to |AddRef()| the new element. |
michael@0 | 234 | * |putElementAt(0, obj)| is equivalent to |putElement(obj)|. |
michael@0 | 235 | * |
michael@0 | 236 | * The result is undefined if this iterator currently points outside the |
michael@0 | 237 | * useful range of the underlying container or sequence. |
michael@0 | 238 | * |
michael@0 | 239 | * @param anOffset a |0|-based offset from the position to which this iterator currently points |
michael@0 | 240 | * @param anElementToPut the element to place into the underlying container or sequence |
michael@0 | 241 | */ |
michael@0 | 242 | void putElementAt( in int32_t anOffset, in nsISupports anElementToPut ); |
michael@0 | 243 | |
michael@0 | 244 | /** |
michael@0 | 245 | * Advance this iterator to the next position in the underlying container or sequence. |
michael@0 | 246 | */ |
michael@0 | 247 | void stepForward(); |
michael@0 | 248 | |
michael@0 | 249 | /** |
michael@0 | 250 | * Move this iterator by |anOffset| positions in the underlying container or sequence. |
michael@0 | 251 | * |anOffset| may be negative. |stepForwardBy(1)| is equivalent to |stepForward()|. |
michael@0 | 252 | * |stepForwardBy(0)| is a no-op. |
michael@0 | 253 | * |
michael@0 | 254 | * @param anOffset a |0|-based offset from the position to which this iterator currently points |
michael@0 | 255 | */ |
michael@0 | 256 | void stepForwardBy( in int32_t anOffset ); |
michael@0 | 257 | |
michael@0 | 258 | /** |
michael@0 | 259 | * Move this iterator to the previous position in the underlying container or sequence. |
michael@0 | 260 | */ |
michael@0 | 261 | void stepBackward(); |
michael@0 | 262 | |
michael@0 | 263 | /** |
michael@0 | 264 | * Move this iterator backwards by |anOffset| positions in the underlying container or sequence. |
michael@0 | 265 | * |anOffset| may be negative. |stepBackwardBy(1)| is equivalent to |stepBackward()|. |
michael@0 | 266 | * |stepBackwardBy(n)| is equivalent to |stepForwardBy(-n)|. |stepBackwardBy(0)| is a no-op. |
michael@0 | 267 | * |
michael@0 | 268 | * @param anOffset a |0|-based offset from the position to which this iterator currently points |
michael@0 | 269 | */ |
michael@0 | 270 | void stepBackwardBy( in int32_t anOffset ); |
michael@0 | 271 | |
michael@0 | 272 | /** |
michael@0 | 273 | * Test if |anotherIterator| points to the same position in the underlying container or sequence. |
michael@0 | 274 | * |
michael@0 | 275 | * The result is undefined if |anotherIterator| was not created by or for the same underlying container or sequence. |
michael@0 | 276 | * |
michael@0 | 277 | * @param anotherIterator another iterator to compare against, created by or for the same underlying container or sequence |
michael@0 | 278 | * @result true if |anotherIterator| points to the same position in the underlying container or sequence |
michael@0 | 279 | */ |
michael@0 | 280 | boolean isEqualTo( in nsISupports anotherIterator ); |
michael@0 | 281 | |
michael@0 | 282 | /** |
michael@0 | 283 | * Create a new iterator pointing to the same position in the underlying container or sequence to which this iterator currently points. |
michael@0 | 284 | * The returned iterator is suitable for use in a subsequent call to |isEqualTo()| against this iterator. |
michael@0 | 285 | * |
michael@0 | 286 | * @result a new iterator pointing at the same position in the same underlying container or sequence as this iterator |
michael@0 | 287 | */ |
michael@0 | 288 | nsISupports clone(); |
michael@0 | 289 | }; |
michael@0 | 290 | |
michael@0 | 291 | %{C++ |
michael@0 | 292 | %} |