editor/txmgr/idl/nsITransactionList.idl

Wed, 31 Dec 2014 07:16:47 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 07:16:47 +0100
branch
TOR_BUG_9701
changeset 3
141e0f1194b1
permissions
-rw-r--r--

Revert simplistic fix pending revisit of Mozilla integration attempt.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     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 interface nsITransaction;
    10 /*
    11  * The nsITransactionList interface.
    12  * <P>
    13  * The implementation for this interface is provided by the Transaction Manager.
    14  * This interface provides a mechanism for accessing the transactions on the
    15  * Undo or Redo stacks as well as any auto-aggregated children that a
    16  * transaction may have.
    17  */
    18 [scriptable, uuid(d007ceff-c978-486a-b697-384ca01997be)]
    20 interface nsITransactionList : nsISupports
    21 {
    22   /**
    23    * The number of transactions contained in this list.
    24    */
    25   readonly attribute long numItems;
    27   /**
    28    * itemIsBatch() returns true if the item at aIndex is a batch. Note that
    29    * currently there is no requirement for a TransactionManager implementation
    30    * to associate a toplevel nsITransaction with a batch so it is possible for
    31    * itemIsBatch() to return true and getItem() to return null. However, you
    32    * can still access the transactions contained in the batch with a call to
    33    * getChildListForItem().
    34    * @param aIndex The index of the item in the list.
    35    */
    36   boolean itemIsBatch(in long aIndex);
    38   /**
    39    * getItem() returns the transaction at the given index in the list. Note that
    40    * a null can be returned here if the item is a batch. The transaction
    41    * returned is AddRef'd so it is up to the caller to Release the transaction
    42    * when it is done.
    43    * @param aIndex The index of the item in the list.
    44    */
    45   nsITransaction getItem(in long aIndex);
    47   /**
    48    * getData() returns the data (of type nsISupports array) associated with
    49    * the transaction list.
    50    */
    51   void getData(in long aIndex, [optional] out unsigned long aLength,
    52                [array, size_is(aLength), retval] out nsISupports aData);
    54   /**
    55    * getNumChildrenForItem() returns the number of child (auto-aggreated)
    56    * transactions the item at aIndex has.
    57    * @param aIndex The index of the item in the list.
    58    */
    59   long getNumChildrenForItem(in long aIndex);
    61   /**
    62    * getChildListForItem() returns the list of children associated with the
    63    * item at aIndex. Implementations may return null if there are no children,
    64    * or an empty list. The list returned is AddRef'd so it is up to the caller
    65    * to Release the transaction when it is done.
    66    * @param aIndex The index of the item in the list.
    67    */
    68   nsITransactionList getChildListForItem(in long aIndex);
    69 };

mercurial