Bug 1869647 - Mark hasStorageAccess.sub.https.window.html as intermittent after wpt...
[gecko.git] / intl / uconv / nsIScriptableUConv.idl
blob7f1334c0c3cd5225bc427d3456408fd706fa6f01
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 nsIInputStream;
10 %{C++
11 // {0A698C44-3BFF-11d4-9649-00C0CA135B4E}
12 #define NS_ISCRIPTABLEUNICODECONVERTER_CID { 0x0A698C44, 0x3BFF, 0x11d4, { 0x96, 0x49, 0x00, 0xC0, 0xCA, 0x13, 0x5B, 0x4E } }
13 #define NS_ISCRIPTABLEUNICODECONVERTER_CONTRACTID "@mozilla.org/intl/scriptableunicodeconverter"
16 /**
17 * In new code, please use the WebIDL TextDecoder and TextEncoder
18 * instead. They represent bytes as Uint8Array (or as view to such
19 * array), which is the current best practice for representing bytes
20 * in JavaScript.
22 * This interface converts between UTF-16 in JavaScript strings
23 * and bytes transported as the unsigned value of each byte
24 * transported in a code unit of the same numeric value in
25 * a JavaScript string.
27 * @created 8/Jun/2000
28 * @author Makoto Kato [m_kato@ga2.so-net.ne.jp]
30 [scriptable, uuid(f36ee324-5c1c-437f-ba10-2b4db7a18031)]
31 interface nsIScriptableUnicodeConverter : nsISupports
33 /**
34 * Converts the data from Unicode to one Charset.
35 * Returns the converted string. After converting, Finish should be called
36 * and its return value appended to this return value.
38 ACString ConvertFromUnicode(in AString aSrc);
40 /**
41 * Returns the terminator string.
42 * Should be called after ConvertFromUnicode() and appended to that
43 * function's return value.
45 ACString Finish();
47 /**
48 * Converts the data from one Charset to Unicode.
50 AString ConvertToUnicode(in ACString aSrc);
52 /**
53 * Current character set.
55 * @throw NS_ERROR_UCONV_NOCONV
56 * The requested charset is not supported.
58 attribute ACString charset;
60 /**
61 * Meaningless
63 attribute boolean isInternal;