michael@0: /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ michael@0: /* This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #include "nsISupports.idl" michael@0: michael@0: %{C++ michael@0: #define NS_ENUMERATOR_FALSE 1 michael@0: %} michael@0: /* michael@0: * DO NOT USE THIS INTERFACE. IT IS HORRIBLY BROKEN, USES NS_COMFALSE michael@0: * AND IS BASICALLY IMPOSSIBLE TO USE CORRECTLY THROUGH PROXIES OR michael@0: * XPCONNECT. IF YOU SEE NEW USES OF THIS INTERFACE IN CODE YOU ARE michael@0: * REVIEWING, YOU SHOULD INSIST ON nsISimpleEnumerator. michael@0: * michael@0: * DON'T MAKE ME COME OVER THERE. michael@0: */ michael@0: [scriptable, uuid(ad385286-cbc4-11d2-8cca-0060b0fc14a3)] michael@0: interface nsIEnumerator : nsISupports { michael@0: /** First will reset the list. will return NS_FAILED if no items michael@0: */ michael@0: void first(); michael@0: michael@0: /** Next will advance the list. will return failed if already at end michael@0: */ michael@0: void next(); michael@0: michael@0: /** CurrentItem will return the CurrentItem item it will fail if the michael@0: * list is empty michael@0: */ michael@0: nsISupports currentItem(); michael@0: michael@0: /** return if the collection is at the end. that is the beginning following michael@0: * a call to Prev and it is the end of the list following a call to next michael@0: */ michael@0: void isDone(); michael@0: }; michael@0: michael@0: [uuid(75f158a0-cadd-11d2-8cca-0060b0fc14a3)] michael@0: interface nsIBidirectionalEnumerator : nsIEnumerator { michael@0: michael@0: /** Last will reset the list to the end. will return NS_FAILED if no items michael@0: */ michael@0: void last(); michael@0: michael@0: /** Prev will decrement the list. will return failed if already at beginning michael@0: */ michael@0: void prev(); michael@0: };