xref: /AOO41X/main/offapi/com/sun/star/datatransfer/XTransferable.idl (revision d1766043198e81d0bcfc626e12893e7b4d7e31ca)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements.  See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership.  The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License.  You may obtain a copy of the License at
10 *
11 *   http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied.  See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24#ifndef __com_sun_star_datatransfer_XTransferable_idl__
25#define __com_sun_star_datatransfer_XTransferable_idl__
26
27#ifndef __com_sun_star_datatransfer_UnsupportedFlavorException_idl__
28#include <com/sun/star/datatransfer/UnsupportedFlavorException.idl>
29#endif
30
31#ifndef __com_sun_star_datatransfer_DataFlavor_idl__
32#include <com/sun/star/datatransfer/DataFlavor.idl>
33#endif
34
35#ifndef __com_sun_star_io_IOException_idl__
36#include <com/sun/star/io/IOException.idl>
37#endif
38
39#ifndef __com_sun_star_uno_XInterface_idl__
40#include <com/sun/star/uno/XInterface.idl>
41#endif
42
43//=============================================================================
44
45module com { module sun { module star { module datatransfer {
46
47//=============================================================================
48/** Interface to be implemented by objects used to provide data for a data
49    transfer operation.
50
51    @see com::sun::star::datatransfer::DataFlavor
52*/
53
54published interface XTransferable: com::sun::star::uno::XInterface
55{
56    //-------------------------------------------------------------------------
57    /** Called by a data consumer to obtain data from the source in a specified
58        format.
59
60        @param aFlavor
61        Describes the requested data format
62
63        @returns
64        The data in the specified <type>DataFlavor</type>.
65
66        @throws com::sun::star::io::IOException
67        if the data is no longer available in the requested flavor.
68
69        @throws com::sun::star::datatransfer::UnsupportedFlavorException
70        if the requested <type>DataFlavor</type> is not supported.
71    */
72    any getTransferData( [in] DataFlavor aFlavor )
73        raises ( UnsupportedFlavorException, com::sun::star::io::IOException );
74
75    //-------------------------------------------------------------------------
76    /** Returns a sequence of supported <type>DataFlavor</type>.
77
78        @returns
79        The sequence of supported <type>DataFlavor</type>.
80
81        @see com::sun::star::datatransfer::DataFlavor
82    */
83    sequence < DataFlavor > getTransferDataFlavors();
84
85    //-------------------------------------------------------------------------
86    /** Checks if the data object supports the specified data flavor.
87
88        @param aFlavor
89        Describes the format that should be checked
90
91        @returns
92        A value of <TRUE/> if the <type>DataFlavor</type> is supported by the transfer source.
93        <p>A value of <FALSE/> if the <type>DataFlavor</type> is unsupported by the transfer source.</p>
94
95        <br/><br/><p><strong>Note: </strong>This method is only for analogy with the JAVA Clipboard interface. To
96        avoid many calls, the caller should instead use
97        <member scope="com::sun::star::datatransfer">XTransferable::getTransferDataFlavors()</member>.
98    */
99    boolean isDataFlavorSupported( [in] DataFlavor aFlavor );
100};
101
102//=============================================================================
103
104}; }; }; };
105
106#endif
107