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