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
29#ifndef __com_sun_star_datatransfer_XDataFormatTranslator_idl__
30#define __com_sun_star_datatransfer_XDataFormatTranslator_idl__
31
32#ifndef __com_sun_star_uno_XInterface_idl__
33#include <com/sun/star/uno/XInterface.idl>
34#endif
35
36#ifndef __com_sun_star_datatransfer_DataFlavor_idl__
37#include <com/sun/star/datatransfer/DataFlavor.idl>
38#endif
39
40module com { module sun { module star { module datatransfer {
41
42//=============================================================================
43/** Interface to be implemented by objects used to translate a <type>DataFlavor</type> to
44    a system dependent data transfer type and vice versa.
45
46	<p>Different platforms use different types to describe data formats available
47	during data exchange operations like clipboard or drag&drop. Windows for instance
48	uses integer values to describe an available clipboard or drag&drop format, Unix
49	X11 uses so called Atoms etc.</p>
50*/
51
52published interface XDataFormatTranslator : com::sun::star::uno::XInterface
53{
54	//-------------------------------------------------------------------------
55	/** Converts a <type>DataFlavor</type> to system dependend data type.
56
57		@param aDataFlavor
58		Describes the format for which a system dependent data types is requested.
59
60		@returns
61		A system dependent data transfer type for the given <type>DataFlavor</type>
62		if there is one available.
63		<p>If the is no system dependent data type for a given <type>DataFlavor</type>
64		the returned any is empty.</p>
65	*/
66	any getSystemDataTypeFromDataFlavor( [in] DataFlavor aDataFlavor );
67
68	//-------------------------------------------------------------------------
69	/** Converts a system dependent data type to a <type>DataFlavor</type>.
70
71		@param aSysDataType
72		A system dependent data type. If aSysDataType is empty so is the returned <type>DataFlavor</type>.
73
74		@returns
75		A <type>DataFlavor</type> for the given system dependent data transfer type.
76		<p>If there is no appropriate mapping for a sytem dependent data type, the returned <type>DataFlavor</type> will be empty.</p>
77	*/
78	DataFlavor getDataFlavorFromSystemDataType( [in] any aSysDataType );
79};
80
81}; }; }; };
82
83#endif
84
85