xpcom/ds/nsIEnumerator.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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/. */
     6 #include "nsISupports.idl"
     8 %{C++
     9 #define NS_ENUMERATOR_FALSE 1
    10 %}
    11 /*
    12  * DO NOT USE THIS INTERFACE.  IT IS HORRIBLY BROKEN, USES NS_COMFALSE
    13  * AND IS BASICALLY IMPOSSIBLE TO USE CORRECTLY THROUGH PROXIES OR
    14  * XPCONNECT.  IF YOU SEE NEW USES OF THIS INTERFACE IN CODE YOU ARE
    15  * REVIEWING, YOU SHOULD INSIST ON nsISimpleEnumerator.
    16  *
    17  * DON'T MAKE ME COME OVER THERE.
    18  */
    19 [scriptable, uuid(ad385286-cbc4-11d2-8cca-0060b0fc14a3)]
    20 interface nsIEnumerator : nsISupports {
    21   /** First will reset the list. will return NS_FAILED if no items
    22    */
    23   void first();
    25   /** Next will advance the list. will return failed if already at end
    26    */
    27   void next();
    29   /** CurrentItem will return the CurrentItem item it will fail if the 
    30    *  list is empty
    31    */
    32   nsISupports currentItem();
    34   /** return if the collection is at the end.  that is the beginning following 
    35    *  a call to Prev and it is the end of the list following a call to next
    36    */
    37   void isDone();
    38 };
    40 [uuid(75f158a0-cadd-11d2-8cca-0060b0fc14a3)]
    41 interface nsIBidirectionalEnumerator : nsIEnumerator {
    43   /** Last will reset the list to the end. will return NS_FAILED if no items
    44    */
    45   void last();
    47   /** Prev will decrement the list. will return failed if already at beginning
    48    */
    49   void prev();
    50 };

mercurial