widget/nsIFormatConverter.idl

branch
TOR_BUG_9701
changeset 10
ac0c01689b40
equal deleted inserted replaced
-1:000000000000 0:57c9dcea89b2
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/. */
5
6 #include "nsISupports.idl"
7 #include "nsISupportsArray.idl"
8
9
10 [scriptable, uuid(948A0023-E3A7-11d2-96CF-0060B0FB9956)]
11 interface nsIFormatConverter : nsISupports
12 {
13 /**
14 * Get the list of the "input" data flavors (mime types as nsISupportsCString),
15 * in otherwords, the flavors that this converter can convert "from" (the
16 * incoming data to the converter).
17 */
18 nsISupportsArray getInputDataFlavors ( ) ;
19
20 /**
21 * Get the list of the "output" data flavors (mime types as nsISupportsCString),
22 * in otherwords, the flavors that this converter can convert "to" (the
23 * outgoing data to the converter).
24 *
25 * @param aDataFlavorList fills list with supported flavors
26 */
27 nsISupportsArray getOutputDataFlavors ( ) ;
28
29 /**
30 * Determines whether a conversion from one flavor to another is supported
31 *
32 * @param aFromFormatConverter flavor to convert from
33 * @param aFromFormatConverter flavor to convert to
34 */
35 boolean canConvert ( in string aFromDataFlavor, in string aToDataFlavor ) ;
36
37 /**
38 * Converts from one flavor to another.
39 *
40 * @param aFromFormatConverter flavor to convert from
41 * @param aFromFormatConverter flavor to convert to (destination own the memory)
42 * @returns returns NS_OK if it was converted
43 */
44 void convert ( in string aFromDataFlavor, in nsISupports aFromData, in unsigned long aDataLen,
45 in string aToDataFlavor, out nsISupports aToData, out unsigned long aDataToLen ) ;
46
47 };
48
49
50 %{ C++
51
52 %}

mercurial