2001-09-29 00:14:13 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
1999-08-25 12:34:46 +04:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
[scriptable, uuid(948A0023-E3A7-11d2-96CF-0060B0FB9956)]
|
|
|
|
interface nsIFormatConverter : nsISupports
|
2019-05-23 01:37:14 +03:00
|
|
|
{
|
1999-08-25 12:34:46 +04:00
|
|
|
/**
|
2002-08-06 04:53:19 +04:00
|
|
|
* Get the list of the "input" data flavors (mime types as nsISupportsCString),
|
2019-05-23 01:37:14 +03:00
|
|
|
* in otherwords, the flavors that this converter can convert "from" (the
|
1999-08-25 12:34:46 +04:00
|
|
|
* incoming data to the converter).
|
|
|
|
*/
|
2018-10-10 23:26:06 +03:00
|
|
|
Array<ACString> getInputDataFlavors ( ) ;
|
1999-08-25 12:34:46 +04:00
|
|
|
|
|
|
|
/**
|
2002-08-06 04:53:19 +04:00
|
|
|
* Get the list of the "output" data flavors (mime types as nsISupportsCString),
|
2019-05-23 01:37:14 +03:00
|
|
|
* in otherwords, the flavors that this converter can convert "to" (the
|
1999-08-25 12:34:46 +04:00
|
|
|
* outgoing data to the converter).
|
|
|
|
*
|
|
|
|
* @param aDataFlavorList fills list with supported flavors
|
|
|
|
*/
|
2018-10-10 23:26:06 +03:00
|
|
|
Array<ACString> getOutputDataFlavors ( ) ;
|
1999-08-25 12:34:46 +04:00
|
|
|
|
|
|
|
/**
|
2011-09-07 09:50:26 +04:00
|
|
|
* Determines whether a conversion from one flavor to another is supported
|
1999-08-25 12:34:46 +04:00
|
|
|
*
|
|
|
|
* @param aFromFormatConverter flavor to convert from
|
|
|
|
* @param aFromFormatConverter flavor to convert to
|
|
|
|
*/
|
1999-08-31 01:54:23 +04:00
|
|
|
boolean canConvert ( in string aFromDataFlavor, in string aToDataFlavor ) ;
|
1999-08-25 12:34:46 +04:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Converts from one flavor to another.
|
|
|
|
*
|
|
|
|
* @param aFromFormatConverter flavor to convert from
|
|
|
|
* @param aFromFormatConverter flavor to convert to (destination own the memory)
|
|
|
|
* @returns returns NS_OK if it was converted
|
|
|
|
*/
|
2018-11-20 20:01:46 +03:00
|
|
|
void convert ( in string aFromDataFlavor, in nsISupports aFromData,
|
2019-05-23 01:37:14 +03:00
|
|
|
in string aToDataFlavor, out nsISupports aToData ) ;
|
1999-08-25 12:34:46 +04:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
%{ C++
|
|
|
|
|
|
|
|
%}
|