widget/nsIFormatConverter.idl

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     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
    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 ( ) ;
    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 ( ) ;
    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 ) ;
    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 ) ; 
    47 };
    50 %{ C++
    52 %}

mercurial