Bug 1851372 [wpt PR 41785] - HTML: search setter always uses UTF-8, a=testonly
[gecko.git] / widget / nsIFormatConverter.idl
blob0d72f49d2a5c16ea95e29da8dfd5af1cd6ecdbfb
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 [scriptable, uuid(948A0023-E3A7-11d2-96CF-0060B0FB9956)]
9 interface nsIFormatConverter : nsISupports
11 /**
12 * Get the list of the "input" data flavors (mime types as nsISupportsCString),
13 * in otherwords, the flavors that this converter can convert "from" (the
14 * incoming data to the converter).
16 Array<ACString> getInputDataFlavors ( ) ;
18 /**
19 * Get the list of the "output" data flavors (mime types as nsISupportsCString),
20 * in otherwords, the flavors that this converter can convert "to" (the
21 * outgoing data to the converter).
23 * @param aDataFlavorList fills list with supported flavors
25 Array<ACString> getOutputDataFlavors ( ) ;
27 /**
28 * Determines whether a conversion from one flavor to another is supported
30 * @param aFromFormatConverter flavor to convert from
31 * @param aFromFormatConverter flavor to convert to
33 boolean canConvert ( in string aFromDataFlavor, in string aToDataFlavor ) ;
35 /**
36 * Converts from one flavor to another.
38 * @param aFromFormatConverter flavor to convert from
39 * @param aFromFormatConverter flavor to convert to (destination own the memory)
40 * @returns returns NS_OK if it was converted
42 void convert ( in string aFromDataFlavor, in nsISupports aFromData,
43 in string aToDataFlavor, out nsISupports aToData ) ;
48 %{ C++