Update ooo320-m1
[ooovba.git] / offapi / com / sun / star / packages / XDataSinkEncrSupport.idl
blobdbd7f31cf9b8a3b5b41ae6bd95b7e46b17b79201
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XDataSinkEncrSupport.idl,v $
10 * $Revision: 1.6 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef __com_sun_star_packages_XDataSinkEncrSupport_idl__
31 #define __com_sun_star_packages_XDataSinkEncrSupport_idl__
33 #ifndef __com_sun_star_uno_XInterface_idl__
34 #include <com/sun/star/uno/XInterface.idl>
35 #endif
37 #ifndef __com_sun_star_io_XInputStream_idl__
38 #include <com/sun/star/io/XInputStream.idl>
39 #endif
41 #ifndef __com_sun_star_io_IOException_idl__
42 #include <com/sun/star/io/IOException.idl>
43 #endif
45 #ifndef __com_sun_star_packages_WrongPasswordException_idl__
46 #include <com/sun/star/packages/WrongPasswordException.idl>
47 #endif
49 #ifndef __com_sun_star_packages_NoEncryptionException_idl__
50 #include <com/sun/star/packages/NoEncryptionException.idl>
51 #endif
53 #ifndef __com_sun_star_packages_EncryptionNotAllowedException_idl__
54 #include <com/sun/star/packages/EncryptionNotAllowedException.idl>
55 #endif
57 #ifndef __com_sun_star_packages_NoRawFormatException_idl__
58 #include <com/sun/star/packages/NoRawFormatException.idl>
59 #endif
62 //=============================================================================
64 module com { module sun { module star { module packages {
66 //=============================================================================
68 /** Allows to get access to the stream of a <type>PackageStream</type>.
70 interface XDataSinkEncrSupport: com::sun::star::uno::XInterface
72 //-------------------------------------------------------------------------
73 /** Allows to get access to the data of the PackageStream.
74 <p>
75 In case stream is encrypted one and the key for the stream is not set,
76 an exception must be thrown.
77 </p>
79 @returns
80 the stream
82 @throws ::com::sun::star::packages::WrongPasswordException
83 no key or a wrong one is set
85 @throws ::com::sun::star::io::IOException
86 in case of io problems during retrieving
88 ::com::sun::star::io::XInputStream getDataStream()
89 raises( ::com::sun::star::packages::WrongPasswordException,
90 ::com::sun::star::io::IOException );
93 //-------------------------------------------------------------------------
94 /** Allows to get access to the data of the PackageStream as to raw stream.
95 In case stream is not encrypted an exception will be thrown.
96 <p>
97 The difference of raw stream is that it contains header for encrypted data,
98 so an encrypted stream can be copyed from one PackageStream to
99 another one without decryption.
100 </p>
102 @returns
103 the raw representation of stream
105 @throws ::com::sun::star::packages::NoEncryptionException
106 the PackageStream object is not encrypted
108 @throws ::com::sun::star::io::IOException
109 in case of io problems during retrieving
111 ::com::sun::star::io::XInputStream getRawStream()
112 raises( ::com::sun::star::packages::NoEncryptionException,
113 ::com::sun::star::io::IOException );
115 //-------------------------------------------------------------------------
116 /** Allows to set a data stream for the PackageStream.
118 In case PackageStream is marked as encrypted the data stream will be encrypted on storing.
119 </p>
121 @param aStream
122 new data stream
124 @throws ::com::sun::star::io::IOException
125 in case of io problems
127 void setDataStream( [in] ::com::sun::star::io::XInputStream aStream )
128 raises( ::com::sun::star::io::IOException );
130 //-------------------------------------------------------------------------
131 /** Allows to set raw stream for the PackageStream.
132 The PackageStream object can not be marked as encrypted one,
133 an exception will be thrown in such case.
135 @param aStream
136 the new raw representation of stream
138 @throws ::com::sun::star::packages::EncryptionNotAllowedException
139 the PackageStream object is marked as encrypted
141 @throws ::com::sun::star::packages::NoRawFormatException
142 the stream is not a correct raw representation of encrypted package stream
144 @throws ::com::sun::star::io::IOException
145 in case of io problems during retrieving
147 void setRawStream( [in] ::com::sun::star::io::XInputStream aStream )
148 raises( ::com::sun::star::packages::EncryptionNotAllowedException,
149 ::com::sun::star::packages::NoRawFormatException,
150 ::com::sun::star::io::IOException );
152 //-------------------------------------------------------------------------
153 /** Allows to get access to the raw data of the stream as it is stored in
154 the package.
156 @returns
157 the plain raw stream as it is stored in the package
159 @throws ::com::sun::star::io::IOException
160 in case of io problems during retrieving
162 ::com::sun::star::io::XInputStream getPlainRawStream()
163 raises( ::com::sun::star::io::IOException );
167 //=============================================================================
169 }; }; }; };
171 /*=============================================================================
173 =============================================================================*/
174 #endif