xpcom/io/nsIUnicharOutputStream.idl

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* vim:set expandtab ts=4 sw=4 sts=4 cin: */
     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 /**
     9  * An interface that allows writing unicode data.
    10  */
    11 [scriptable, uuid(2d00b1bb-8b21-4a63-bcc6-7213f513ac2e)]
    12 interface nsIUnicharOutputStream : nsISupports
    13 {
    14     /**
    15      * Write a single character to the stream. When writing many characters,
    16      * prefer the string-taking write method.
    17      *
    18      * @retval true The character was written successfully
    19      * @retval false Not all bytes of the character could be written.
    20      */
    21     boolean write(in unsigned long aCount,
    22                   [const, array, size_is(aCount)] in char16_t c);
    24     /**
    25      * Write a string to the stream.
    26      *
    27      * @retval true The string was written successfully
    28      * @retval false Not all bytes of the string could be written.
    29      */
    30     boolean writeString(in AString str);
    32     /**
    33      * Flush the stream. This finishes the conversion and writes any bytes that
    34      * finish the current byte sequence.
    35      *
    36      * It does NOT flush the underlying stream.
    37      *
    38      * @see nsIUnicodeEncoder::Finish
    39      */
    40     void flush();
    42     /**
    43      * Close the stream and free associated resources. This also closes the
    44      * underlying stream.
    45      */
    46     void close();
    47 };

mercurial