parser/xml/public/nsISAXMutableAttributes.idl

Fri, 16 Jan 2015 18:13:44 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Fri, 16 Jan 2015 18:13:44 +0100
branch
TOR_BUG_9701
changeset 14
925c144e1f1f
permissions
-rw-r--r--

Integrate suggestion from review to improve consistency with existing code.

     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"
     7 #include "nsISAXAttributes.idl"
     9 /**
    10  * This interface extends the nsISAXAttributes interface with
    11  * manipulators so that the list can be modified or reused.
    12  */
    13 [scriptable, uuid(8b1de83d-cebb-49fa-8245-c0fe319eb7b6)]
    14 interface nsISAXMutableAttributes : nsISAXAttributes {
    16   /**
    17    * Add an attribute to the end of the list.
    18    *
    19    * For the sake of speed, this method does no checking
    20    * to see if the attribute is already in the list: that is
    21    * the responsibility of the application.
    22    *
    23    * @param uri The Namespace URI, or the empty string if
    24    *        none is available or Namespace processing is not
    25    *        being performed.
    26    * @param localName The local name, or the empty string if
    27    *        Namespace processing is not being performed.
    28    * @param qName The qualified (prefixed) name, or the empty string
    29    *        if qualified names are not available.
    30    * @param type The attribute type as a string.
    31    * @param value The attribute value.
    32    */
    33   void addAttribute(in AString uri,
    34                     in AString localName,
    35                     in AString qName,
    36                     in AString type,
    37                     in AString value);
    39   /**
    40    * Clear the attribute list for reuse.
    41    */
    42   void clear();
    44   /**
    45    * Remove an attribute from the list.
    46    *
    47    * @param index The index of the attribute (zero-based).
    48    */
    49   void removeAttribute(in unsigned long index);
    51   /**
    52    * Set the attributes list. This method will clear any attributes in
    53    * the list before adding the attributes from the argument.
    54    *
    55    * @param attributes The attributes object to replace populate the
    56    *                   list with.
    57    */
    58   void setAttributes(in nsISAXAttributes attributes);
    60   /**
    61    * Set an attribute in the list.
    62    *
    63    * For the sake of speed, this method does no checking for name
    64    * conflicts or well-formedness: such checks are the responsibility
    65    * of the application.
    66    *
    67    * @param index The index of the attribute (zero-based).
    68    * @param uri The Namespace URI, or the empty string if
    69    *        none is available or Namespace processing is not
    70    *        being performed.
    71    * @param localName The local name, or the empty string if
    72    *        Namespace processing is not being performed.
    73    * @param qName The qualified name, or the empty string
    74    *        if qualified names are not available.
    75    * @param type The attribute type as a string.
    76    * @param value The attribute value.
    77    */
    78   void setAttribute(in unsigned long index,
    79                     in AString uri,
    80                     in AString localName,
    81                     in AString qName,
    82                     in AString type,
    83                     in AString value);
    85   /**
    86    * Set the local name of a specific attribute.
    87    *
    88    * @param index The index of the attribute (zero-based).
    89    * @param localName The attribute's local name, or the empty
    90    *        string for none.
    91    */
    92   void setLocalName(in unsigned long index, in AString localName);
    94   /**
    95    * Set the qualified name of a specific attribute.
    96    *
    97    * @param index The index of the attribute (zero-based).
    98    * @param qName The attribute's qualified name, or the empty
    99    *        string for none.
   100    */
   101   void setQName(in unsigned long index, in AString qName);
   103   /**
   104    * Set the type of a specific attribute.
   105    *
   106    * @param index The index of the attribute (zero-based).
   107    * @param type The attribute's type.
   108    */
   109   void setType(in unsigned long index, in AString type);
   111   /**
   112    * Set the Namespace URI of a specific attribute.
   113    *
   114    * @param index The index of the attribute (zero-based).
   115    * @param uri The attribute's Namespace URI, or the empty
   116    *        string for none.
   117    */
   118   void setURI(in unsigned long index, in AString uri);
   120   /**
   121    * Set the value of a specific attribute.
   122    *
   123    * @param index The index of the attribute (zero-based).
   124    * @param value The attribute's value.
   125    */
   126   void setValue(in unsigned long index, in AString value);
   127 };

mercurial