update dev300-m58
[ooovba.git] / offapi / com / sun / star / embed / XStorageRawAccess.idl
blobed691daf44d579be9dd6188c1fccc999149c7d7f
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: XStorageRawAccess.idl,v $
10 * $Revision: 1.4 $
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_embed_XStorageRawAccess_idl__
31 #define __com_sun_star_embed_XStorageRawAccess_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_XStream_idl__
38 #include <com/sun/star/io/XStream.idl>
39 #endif
41 #ifndef __com_sun_star_io_XInputStream_idl__
42 #include <com/sun/star/io/XInputStream.idl>
43 #endif
45 #ifndef __com_sun_star_io_IOException_idl__
46 #include <com/sun/star/io/IOException.idl>
47 #endif
49 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
50 #include <com/sun/star/lang/IllegalArgumentException.idl>
51 #endif
53 #ifndef __com_sun_star_embed_StorageWrappedTargetException_idl__
54 #include <com/sun/star/embed/StorageWrappedTargetException.idl>
55 #endif
57 #ifndef __com_sun_star_embed_InvalidStorageException_idl__
58 #include <com/sun/star/embed/InvalidStorageException.idl>
59 #endif
61 #ifndef __com_sun_star_container_NoSuchElementException_idl__
62 #include <com/sun/star/container/NoSuchElementException.idl>
63 #endif
65 #ifndef __com_sun_star_container_ElementExistException_idl__
66 #include <com/sun/star/container/ElementExistException.idl>
67 #endif
69 #ifndef __com_sun_star_packages_NoEncryptionException_idl__
70 #include <com/sun/star/packages/NoEncryptionException.idl>
71 #endif
73 #ifndef __com_sun_star_packages_NoRawFormatException_idl__
74 #include <com/sun/star/packages/NoRawFormatException.idl>
75 #endif
78 //============================================================================
80 module com { module sun { module star { module embed {
82 //============================================================================
83 /** This interface represents main storage functionality.
85 interface XStorageRawAccess
87 // -----------------------------------------------------------------------
88 /** allows to get a plain raw stream representing a package stream.
90 <p>
91 This method returns a stream from the package as it is stored there,
92 without any decompression/decription and etc. This method can be
93 helpful to check file consistency, for example by signing.
94 </p>
96 @returns
97 the raw representation of encrypted stream with all the data
98 required to copy the stream without information loss
100 @param sStreamName
101 the name of the substream that should be open
103 @throws ::com::sun::star::embed::InvalidStorageException
104 this storage is in invalid state for any reason
106 @throws ::com::sun::star::lang::IllegalArgumentException
107 one of provided arguments is illegal
109 @throws ::com::sun::star::container::NoSuchElementException
110 there is no element with specified name
112 @throws ::com::sun::star::io::IOException
113 in case of io errors during stream opening
115 @throws ::com::sun::star::embed::StorageWrappedTargetException
116 wraps other exceptions
118 ::com::sun::star::io::XInputStream getPlainRawStreamElement(
119 [in] string sStreamName )
120 raises( ::com::sun::star::embed::InvalidStorageException,
121 ::com::sun::star::lang::IllegalArgumentException,
122 ::com::sun::star::container::NoSuchElementException,
123 ::com::sun::star::io::IOException,
124 ::com::sun::star::embed::StorageWrappedTargetException );
126 // -----------------------------------------------------------------------
127 /** allows to get a raw stream representing encrypted stream with header.
130 This method allows to transport encrypted streams without decryption.
131 Mainly this method is introduced to allow to copy one encrypted
132 storage stream to another without decryption. It is not reccomended to
133 use this method outside of storage implementation since different
134 storages implementation could have different encryption format. If the
135 method is used outside of storage implementation the user code is
136 resposible to get sure that the raw format of source and target
137 storages is the same.
138 </p>
141 The difference of this method from the previous one is that it handles
142 only encrypted streams. The contents of returned by these methods
143 streams can differ for the same entry, since this method can add
144 additional data into the stream to allow successful insertion.
145 </p>
147 @param sStreamName
148 the name of the substream that should be open
150 @param xInputStream
151 a raw stream representing encrypted stream
153 @throws ::com::sun::star::embed::InvalidStorageException
154 this storage is in invalid state for any reason
156 @throws ::com::sun::star::lang::IllegalArgumentException
157 one of provided arguments is illegal
159 @throws ::com::sun::star::packages::NoEncryptionException
160 the stream is not an encrypted one
162 @throws ::com::sun::star::container::NoSuchElementException
163 there is no element with specified name
165 @throws ::com::sun::star::io::IOException
166 in case of io errors during stream opening
168 @throws ::com::sun::star::embed::StorageWrappedTargetException
169 wraps other exceptions
171 ::com::sun::star::io::XInputStream getRawEncrStreamElement(
172 [in] string sStreamName )
173 raises( ::com::sun::star::embed::InvalidStorageException,
174 ::com::sun::star::lang::IllegalArgumentException,
175 ::com::sun::star::packages::NoEncryptionException,
176 ::com::sun::star::container::NoSuchElementException,
177 ::com::sun::star::io::IOException,
178 ::com::sun::star::embed::StorageWrappedTargetException );
180 // -----------------------------------------------------------------------
181 /** allows to insert a raw stream representing encrypted stream with
182 header.
185 This method allows to insert a stream retrived by
186 <method>XStorageRawAccess::getRawEncrStreamElement()</method> into a
187 storage.
188 </p>
191 This method allows to transport encrypted streams without decryption.
192 Mainly this method is introduced to allow to copy one encrypted
193 storage stream to another without decryption. It is not reccomended to
194 use this method outside of storage implementation since different
195 storages implementation could have different encryption format.
196 </p>
198 @param sStreamName
199 the name of the substream that should be open
201 @param xInputStream
202 a raw stream representing encrypted stream
204 @throws ::com::sun::star::embed::InvalidStorageException
205 this storage is in invalid state for any reason
207 @throws ::com::sun::star::lang::IllegalArgumentException
208 one of provided arguments is illegal
210 @throws ::com::sun::star::packages::NoRawFormatException
211 the stream is not one of raw package stream format
213 @throws ::com::sun::star::container::ElementExistException
214 an element with specified name already exists
216 @throws ::com::sun::star::io::IOException
217 in case of io errors during stream opening
219 @throws ::com::sun::star::embed::StorageWrappedTargetException
220 wraps other exceptions
222 void insertRawEncrStreamElement(
223 [in] string sStreamName,
224 [in] ::com::sun::star::io::XInputStream xInStream )
225 raises( ::com::sun::star::embed::InvalidStorageException,
226 ::com::sun::star::lang::IllegalArgumentException,
227 ::com::sun::star::packages::NoRawFormatException,
228 ::com::sun::star::container::ElementExistException,
229 ::com::sun::star::io::IOException,
230 ::com::sun::star::embed::StorageWrappedTargetException );
233 //============================================================================
235 }; }; }; };
237 #endif