Bug 796038 - Default browser prompt shows even after setting defaults for Firefox...
[gecko.git] / widget / nsIFormatConverter.idl
blob958c8c4d73eb7d7d41c8cfea5ef4b16b2171541b
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"
7 #include "nsISupportsArray.idl"
10 [scriptable, uuid(948A0023-E3A7-11d2-96CF-0060B0FB9956)]
11 interface nsIFormatConverter : nsISupports
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).
18 nsISupportsArray getInputDataFlavors ( ) ;
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).
25 * @param aDataFlavorList fills list with supported flavors
27 nsISupportsArray getOutputDataFlavors ( ) ;
29 /**
30 * Determines whether a conversion from one flavor to another is supported
32 * @param aFromFormatConverter flavor to convert from
33 * @param aFromFormatConverter flavor to convert to
35 boolean canConvert ( in string aFromDataFlavor, in string aToDataFlavor ) ;
37 /**
38 * Converts from one flavor to another.
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
44 void convert ( in string aFromDataFlavor, in nsISupports aFromData, in unsigned long aDataLen,
45 in string aToDataFlavor, out nsISupports aToData, out unsigned long aDataToLen ) ;
50 %{ C++