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#ifndef __com_sun_star_document_XBinaryStreamResolver_idl__
28#define __com_sun_star_document_XBinaryStreamResolver_idl__
29
30#ifndef __com_sun_star_uno_XInterface_idl__
31#include <com/sun/star/uno/XInterface.idl>
32#endif
33#ifndef __com_sun_star_io_XInputStream_idl__
34#include <com/sun/star/io/XInputStream.idl>
35#endif
36#ifndef __com_sun_star_io_XOututStream_idl__
37#include <com/sun/star/io/XOutputStream.idl>
38#endif
39
40//=============================================================================
41
42module com {  module sun {  module star {  module document {
43
44//=============================================================================
45
46/**
47	<p>This interface encapsulates functionality to get/resolve binary data streams.
48	It is used to transform binary data to an url or to transform an url to binary
49	data. The binary data is represented through input and output streams.</p>
50
51	<p>In the case of transforming an url to binary data, the <code>getInputStream</code>
52	method is used. This returns a <type scope="com::sun::star::io">XInputStream</type>
53	from which the binary data, transformed from the given url, can be read.</p>
54
55	<p>In the case of transforming binary data to an url, a
56	<type scope="com::sun::star::io">XOutputStream</type> is created first to write
57	the binary data to. After this, the <code>resolveOutputStream</code> method can
58	be used to transform the binary data, represented through the
59	<type scope="com::sun::star::io">XOutputStream</type> interface, to an url.</p>
60 */
61published interface XBinaryStreamResolver: com::sun::star::uno::XInterface
62{
63	/** converts the given URL from the source URL namespace to an input stream,
64		from which binary data can be read
65	*/
66	com::sun::star::io::XInputStream getInputStream( [in] string aURL );
67
68	/** creates an output stream, to which binary data can be written.
69		After writing, an URL can be retrieved by a call to
70		<method>XBinaryStreamResolver::resolveOutputStream</method>.
71	*/
72	com::sun::star::io::XOutputStream createOutputStream();
73
74	/** converts the output stream, data has been written to, to an URL in
75		source URL namespace.
76	*/
77	string resolveOutputStream( [in] com::sun::star::io::XOutputStream aBinaryStream );
78};
79
80//=============================================================================
81
82}; }; }; };
83
84#endif
85