1/************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28#ifndef __com_sun_star_datatransfer_XTransferable_idl__ 29#define __com_sun_star_datatransfer_XTransferable_idl__ 30 31#ifndef __com_sun_star_datatransfer_UnsupportedFlavorException_idl__ 32#include <com/sun/star/datatransfer/UnsupportedFlavorException.idl> 33#endif 34 35#ifndef __com_sun_star_datatransfer_DataFlavor_idl__ 36#include <com/sun/star/datatransfer/DataFlavor.idl> 37#endif 38 39#ifndef __com_sun_star_io_IOException_idl__ 40#include <com/sun/star/io/IOException.idl> 41#endif 42 43#ifndef __com_sun_star_uno_XInterface_idl__ 44#include <com/sun/star/uno/XInterface.idl> 45#endif 46 47//============================================================================= 48 49module com { module sun { module star { module datatransfer { 50 51//============================================================================= 52/** Interface to be implemented by objects used to provide data for a data 53 transfer operation. 54 55 @see com::sun::star::datatransfer::DataFlavor 56*/ 57 58published interface XTransferable: com::sun::star::uno::XInterface 59{ 60 //------------------------------------------------------------------------- 61 /** Called by a data consumer to obtain data from the source in a specified 62 format. 63 64 @param aFlavor 65 Describes the requested data format 66 67 @returns 68 The data in the specified <type>DataFlavor</type>. 69 70 @throws com::sun::star::io::IOException 71 if the data is no longer available in the requested flavor. 72 73 @throws com::sun::star::datatransfer::UnsupportedFlavorException 74 if the requested <type>DataFlavor</type> is not supported. 75 */ 76 any getTransferData( [in] DataFlavor aFlavor ) 77 raises ( UnsupportedFlavorException, com::sun::star::io::IOException ); 78 79 //------------------------------------------------------------------------- 80 /** Returns a sequence of supported <type>DataFlavor</type>. 81 82 @returns 83 The sequence of supported <type>DataFlavor</type>. 84 85 @see com::sun::star::datatransfer::DataFlavor 86 */ 87 sequence < DataFlavor > getTransferDataFlavors(); 88 89 //------------------------------------------------------------------------- 90 /** Checks if the data object supports the specified data flavor. 91 92 @param aFlavor 93 Describes the format that should be checked 94 95 @returns 96 A value of <TRUE/> if the <type>DataFlavor</type> is supported by the transfer source. 97 <p>A value of <FALSE/> if the <type>DataFlavor</type> is unsupported by the transfer source.</p> 98 99 <br/><br/><p><strong>Note: </strong>This method is only for analogy with the JAVA Clipboard interface. To 100 avoid many calls, the caller should instead use 101 <member scope="com::sun::star::datatransfer">XTransferable::getTransferDataFlavors()</member>. 102 */ 103 boolean isDataFlavorSupported( [in] DataFlavor aFlavor ); 104}; 105 106//============================================================================= 107 108}; }; }; }; 109 110#endif 111