Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
michael@0 | 2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 3 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 4 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 5 | |
michael@0 | 6 | #include "nsISupports.idl" |
michael@0 | 7 | |
michael@0 | 8 | interface nsIOutputStream; |
michael@0 | 9 | interface nsIDOMNode; |
michael@0 | 10 | |
michael@0 | 11 | /** |
michael@0 | 12 | * The nsIDOMSerializer interface is really a placeholder till the W3C |
michael@0 | 13 | * DOM Working Group defines a mechanism for serializing DOM nodes. |
michael@0 | 14 | * An instance of this interface can be used to serialize a DOM document |
michael@0 | 15 | * or any DOM subtree. |
michael@0 | 16 | */ |
michael@0 | 17 | |
michael@0 | 18 | [scriptable, uuid(9fd4ba15-e67c-4c98-b52c-7715f62c9196)] |
michael@0 | 19 | interface nsIDOMSerializer : nsISupports |
michael@0 | 20 | { |
michael@0 | 21 | /** |
michael@0 | 22 | * The subtree rooted by the specified element is serialized to |
michael@0 | 23 | * a string. |
michael@0 | 24 | * |
michael@0 | 25 | * @param root The root of the subtree to be serialized. This could |
michael@0 | 26 | * be any node, including a Document. |
michael@0 | 27 | * @returns The serialized subtree in the form of a Unicode string |
michael@0 | 28 | */ |
michael@0 | 29 | AString serializeToString(in nsIDOMNode root); |
michael@0 | 30 | |
michael@0 | 31 | /** |
michael@0 | 32 | * The subtree rooted by the specified element is serialized to |
michael@0 | 33 | * a byte stream using the character set specified. |
michael@0 | 34 | * @param root The root of the subtree to be serialized. This could |
michael@0 | 35 | * be any node, including a Document. |
michael@0 | 36 | * @param stream The byte stream to which the subtree is serialized. |
michael@0 | 37 | * @param charset The name of the character set to use for the encoding |
michael@0 | 38 | * to a byte stream. If this string is empty and root is |
michael@0 | 39 | * a document, the document's character set will be used. |
michael@0 | 40 | */ |
michael@0 | 41 | void serializeToStream(in nsIDOMNode root, in nsIOutputStream stream, |
michael@0 | 42 | in AUTF8String charset); |
michael@0 | 43 | }; |
michael@0 | 44 | |
michael@0 | 45 | %{ C++ |
michael@0 | 46 | #define NS_XMLSERIALIZER_CID \ |
michael@0 | 47 | { /* a6cf9124-15b3-11d2-932e-00805f8add32 */ \ |
michael@0 | 48 | 0xa6cf9124, 0x15b3, 0x11d2, \ |
michael@0 | 49 | {0x93, 0x2e, 0x00, 0x80, 0x5f, 0x8a, 0xdd, 0x32} } |
michael@0 | 50 | #define NS_XMLSERIALIZER_CONTRACTID \ |
michael@0 | 51 | "@mozilla.org/xmlextras/xmlserializer;1" |
michael@0 | 52 | %} |
michael@0 | 53 |