xref: /aoo4110/main/offapi/com/sun/star/embed/XStorage.idl (revision b1cdbd2c)
1*b1cdbd2cSJim Jagielski/**************************************************************
2*b1cdbd2cSJim Jagielski *
3*b1cdbd2cSJim Jagielski * Licensed to the Apache Software Foundation (ASF) under one
4*b1cdbd2cSJim Jagielski * or more contributor license agreements.  See the NOTICE file
5*b1cdbd2cSJim Jagielski * distributed with this work for additional information
6*b1cdbd2cSJim Jagielski * regarding copyright ownership.  The ASF licenses this file
7*b1cdbd2cSJim Jagielski * to you under the Apache License, Version 2.0 (the
8*b1cdbd2cSJim Jagielski * "License"); you may not use this file except in compliance
9*b1cdbd2cSJim Jagielski * with the License.  You may obtain a copy of the License at
10*b1cdbd2cSJim Jagielski *
11*b1cdbd2cSJim Jagielski *   http://www.apache.org/licenses/LICENSE-2.0
12*b1cdbd2cSJim Jagielski *
13*b1cdbd2cSJim Jagielski * Unless required by applicable law or agreed to in writing,
14*b1cdbd2cSJim Jagielski * software distributed under the License is distributed on an
15*b1cdbd2cSJim Jagielski * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b1cdbd2cSJim Jagielski * KIND, either express or implied.  See the License for the
17*b1cdbd2cSJim Jagielski * specific language governing permissions and limitations
18*b1cdbd2cSJim Jagielski * under the License.
19*b1cdbd2cSJim Jagielski *
20*b1cdbd2cSJim Jagielski *************************************************************/
21*b1cdbd2cSJim Jagielski
22*b1cdbd2cSJim Jagielski
23*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_embed_XStorage_idl__
24*b1cdbd2cSJim Jagielski#define __com_sun_star_embed_XStorage_idl__
25*b1cdbd2cSJim Jagielski
26*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_uno_XInterface_idl__
27*b1cdbd2cSJim Jagielski#include <com/sun/star/uno/XInterface.idl>
28*b1cdbd2cSJim Jagielski#endif
29*b1cdbd2cSJim Jagielski
30*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_io_XStream_idl__
31*b1cdbd2cSJim Jagielski#include <com/sun/star/io/XStream.idl>
32*b1cdbd2cSJim Jagielski#endif
33*b1cdbd2cSJim Jagielski
34*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_io_XInputStream_idl__
35*b1cdbd2cSJim Jagielski#include <com/sun/star/io/XInputStream.idl>
36*b1cdbd2cSJim Jagielski#endif
37*b1cdbd2cSJim Jagielski
38*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_io_IOException_idl__
39*b1cdbd2cSJim Jagielski#include <com/sun/star/io/IOException.idl>
40*b1cdbd2cSJim Jagielski#endif
41*b1cdbd2cSJim Jagielski
42*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_lang_XComponent_idl__
43*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/XComponent.idl>
44*b1cdbd2cSJim Jagielski#endif
45*b1cdbd2cSJim Jagielski
46*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47*b1cdbd2cSJim Jagielski#include <com/sun/star/lang/IllegalArgumentException.idl>
48*b1cdbd2cSJim Jagielski#endif
49*b1cdbd2cSJim Jagielski
50*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_embed_StorageWrappedTargetException_idl__
51*b1cdbd2cSJim Jagielski#include <com/sun/star/embed/StorageWrappedTargetException.idl>
52*b1cdbd2cSJim Jagielski#endif
53*b1cdbd2cSJim Jagielski
54*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_embed_InvalidStorageException_idl__
55*b1cdbd2cSJim Jagielski#include <com/sun/star/embed/InvalidStorageException.idl>
56*b1cdbd2cSJim Jagielski#endif
57*b1cdbd2cSJim Jagielski
58*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_packages_WrongPasswordException_idl__
59*b1cdbd2cSJim Jagielski#include <com/sun/star/packages/WrongPasswordException.idl>
60*b1cdbd2cSJim Jagielski#endif
61*b1cdbd2cSJim Jagielski
62*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_container_XNameAccess_idl__
63*b1cdbd2cSJim Jagielski#include <com/sun/star/container/XNameAccess.idl>
64*b1cdbd2cSJim Jagielski#endif
65*b1cdbd2cSJim Jagielski
66*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_container_NoSuchElementException_idl__
67*b1cdbd2cSJim Jagielski#include <com/sun/star/container/NoSuchElementException.idl>
68*b1cdbd2cSJim Jagielski#endif
69*b1cdbd2cSJim Jagielski
70*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_container_ElementExistException_idl__
71*b1cdbd2cSJim Jagielski#include <com/sun/star/container/ElementExistException.idl>
72*b1cdbd2cSJim Jagielski#endif
73*b1cdbd2cSJim Jagielski
74*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_packages_NoEncryptionException_idl__
75*b1cdbd2cSJim Jagielski#include <com/sun/star/packages/NoEncryptionException.idl>
76*b1cdbd2cSJim Jagielski#endif
77*b1cdbd2cSJim Jagielski
78*b1cdbd2cSJim Jagielski#ifndef __com_sun_star_packages_NoRawFormatException_idl__
79*b1cdbd2cSJim Jagielski#include <com/sun/star/packages/NoRawFormatException.idl>
80*b1cdbd2cSJim Jagielski#endif
81*b1cdbd2cSJim Jagielski
82*b1cdbd2cSJim Jagielski
83*b1cdbd2cSJim Jagielski//============================================================================
84*b1cdbd2cSJim Jagielski
85*b1cdbd2cSJim Jagielski module com {  module sun {  module star {  module embed {
86*b1cdbd2cSJim Jagielski
87*b1cdbd2cSJim Jagielski//============================================================================
88*b1cdbd2cSJim Jagielski/** This interface represents main storage functionality.
89*b1cdbd2cSJim Jagielski */
90*b1cdbd2cSJim Jagielskipublished interface XStorage
91*b1cdbd2cSJim Jagielski{
92*b1cdbd2cSJim Jagielski	// INTERFACES
93*b1cdbd2cSJim Jagielski	//
94*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
95*b1cdbd2cSJim Jagielski	/** allows to get list of child elements and to check if an element with a
96*b1cdbd2cSJim Jagielski		specified name exists in a storage.
97*b1cdbd2cSJim Jagielski
98*b1cdbd2cSJim Jagielski		<p>
99*b1cdbd2cSJim Jagielski		It is also possible to use this interface to get read access to
100*b1cdbd2cSJim Jagielski		a child element by
101*b1cdbd2cSJim Jagielski		<method scope="com::sun::star::container">XNameAccess::getByName</method>
102*b1cdbd2cSJim Jagielski		call. But the recommended way is to use <type>XStorage</type>
103*b1cdbd2cSJim Jagielski		interface for this purpose.
104*b1cdbd2cSJim Jagielski		</p>
105*b1cdbd2cSJim Jagielski	 */
106*b1cdbd2cSJim Jagielski	interface ::com::sun::star::container::XNameAccess;
107*b1cdbd2cSJim Jagielski
108*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
109*b1cdbd2cSJim Jagielski	/** allows to controll and track lifetime of the storage.
110*b1cdbd2cSJim Jagielski
111*b1cdbd2cSJim Jagielski		<p>
112*b1cdbd2cSJim Jagielski		In case a storage is disposed any call to it's methods should result
113*b1cdbd2cSJim Jagielski		in <type scope="com::sun::star::lang">DisposedException</type>.
114*b1cdbd2cSJim Jagielski		</p>
115*b1cdbd2cSJim Jagielski	 */
116*b1cdbd2cSJim Jagielski	interface ::com::sun::star::lang::XComponent;
117*b1cdbd2cSJim Jagielski
118*b1cdbd2cSJim Jagielski
119*b1cdbd2cSJim Jagielski	// METHODS
120*b1cdbd2cSJim Jagielski	//
121*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
122*b1cdbd2cSJim Jagielski	/** allows to copy current storage to another one
123*b1cdbd2cSJim Jagielski
124*b1cdbd2cSJim Jagielski		<p>
125*b1cdbd2cSJim Jagielski		The destination storage contents are overwritten.
126*b1cdbd2cSJim Jagielski		After the successful copying the target storage is automatically
127*b1cdbd2cSJim Jagielski		commited if it implements transacted access.
128*b1cdbd2cSJim Jagielski		</p>
129*b1cdbd2cSJim Jagielski
130*b1cdbd2cSJim Jagielski		@param xDest
131*b1cdbd2cSJim Jagielski			a destination storage this storage must be copied to.
132*b1cdbd2cSJim Jagielski
133*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
134*b1cdbd2cSJim Jagielski			this storage is in invalid state for any reason
135*b1cdbd2cSJim Jagielski
136*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::lang::IllegalArgumentException
137*b1cdbd2cSJim Jagielski			an illegal argument is provided
138*b1cdbd2cSJim Jagielski
139*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::io::IOException
140*b1cdbd2cSJim Jagielski			in case of io errors during copying
141*b1cdbd2cSJim Jagielski
142*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::StorageWrappedTargetException
143*b1cdbd2cSJim Jagielski			wraps other exception acquired during copying
144*b1cdbd2cSJim Jagielski	 */
145*b1cdbd2cSJim Jagielski	void copyToStorage( [in] XStorage xDest )
146*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::embed::InvalidStorageException,
147*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
148*b1cdbd2cSJim Jagielski				::com::sun::star::io::IOException,
149*b1cdbd2cSJim Jagielski				::com::sun::star::embed::StorageWrappedTargetException );
150*b1cdbd2cSJim Jagielski
151*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
152*b1cdbd2cSJim Jagielski	/** allows to get access to a child stream of the storage.
153*b1cdbd2cSJim Jagielski
154*b1cdbd2cSJim Jagielski		<p>
155*b1cdbd2cSJim Jagielski		In case the stream is open in readonly mode the
156*b1cdbd2cSJim Jagielski		<method scope="com::sun::star::io">XStream::getOutputStream</method>
157*b1cdbd2cSJim Jagielski		method will return an empty reference.
158*b1cdbd2cSJim Jagielski		</p>
159*b1cdbd2cSJim Jagielski
160*b1cdbd2cSJim Jagielski		@param sStreamName
161*b1cdbd2cSJim Jagielski			the name of the substream that should be open
162*b1cdbd2cSJim Jagielski
163*b1cdbd2cSJim Jagielski		@param nOpenMode
164*b1cdbd2cSJim Jagielski			a mode the stream should be open in,
165*b1cdbd2cSJim Jagielski			can be a combination of <type>ElementModes</type> values
166*b1cdbd2cSJim Jagielski
167*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
168*b1cdbd2cSJim Jagielski			this storage is in invalid state for any reason
169*b1cdbd2cSJim Jagielski
170*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::lang::IllegalArgumentException
171*b1cdbd2cSJim Jagielski			one of provided arguments is illegal
172*b1cdbd2cSJim Jagielski
173*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::packages::WrongPasswordException
174*b1cdbd2cSJim Jagielski			the provided password is wrong
175*b1cdbd2cSJim Jagielski
176*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::io::IOException
177*b1cdbd2cSJim Jagielski			in case of io errors during stream opening
178*b1cdbd2cSJim Jagielski
179*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::StorageWrappedTargetException
180*b1cdbd2cSJim Jagielski			wraps other exceptions
181*b1cdbd2cSJim Jagielski	 */
182*b1cdbd2cSJim Jagielski    ::com::sun::star::io::XStream  openStreamElement(
183*b1cdbd2cSJim Jagielski			[in] string sStreamName,
184*b1cdbd2cSJim Jagielski			[in] long nOpenMode )
185*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::embed::InvalidStorageException,
186*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
187*b1cdbd2cSJim Jagielski				::com::sun::star::packages::WrongPasswordException,
188*b1cdbd2cSJim Jagielski				::com::sun::star::io::IOException,
189*b1cdbd2cSJim Jagielski				::com::sun::star::embed::StorageWrappedTargetException );
190*b1cdbd2cSJim Jagielski
191*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
192*b1cdbd2cSJim Jagielski	/** allows to get access to a child encrypted stream with password.
193*b1cdbd2cSJim Jagielski
194*b1cdbd2cSJim Jagielski		<p>
195*b1cdbd2cSJim Jagielski		If storage does not allow any encryption this method will always throw
196*b1cdbd2cSJim Jagielski		<type scope="com::sun::star::packages">NoEncryptionException</type>.
197*b1cdbd2cSJim Jagielski		</p>
198*b1cdbd2cSJim Jagielski
199*b1cdbd2cSJim Jagielski		<p>
200*b1cdbd2cSJim Jagielski		In case the stream is open in readonly mode the
201*b1cdbd2cSJim Jagielski		<method scope="com::sun::star::io">XStream::getOutputStream</method>
202*b1cdbd2cSJim Jagielski		method will return an empty reference.
203*b1cdbd2cSJim Jagielski		</p>
204*b1cdbd2cSJim Jagielski
205*b1cdbd2cSJim Jagielski		@param sStreamName
206*b1cdbd2cSJim Jagielski			the name of the substream that should be open
207*b1cdbd2cSJim Jagielski
208*b1cdbd2cSJim Jagielski		@param nOpenMode
209*b1cdbd2cSJim Jagielski			a mode the stream should be open in,
210*b1cdbd2cSJim Jagielski			can be a combination of <type>ElementModes</type> values
211*b1cdbd2cSJim Jagielski
212*b1cdbd2cSJim Jagielski		@param sPassword
213*b1cdbd2cSJim Jagielski			this parameter allowes to specify a reading password for the
214*b1cdbd2cSJim Jagielski			stream, the password must be a correct one, otherwise an
215*b1cdbd2cSJim Jagielski			exception will be thrown
216*b1cdbd2cSJim Jagielski
217*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
218*b1cdbd2cSJim Jagielski			this storage is in invalid state for any reason
219*b1cdbd2cSJim Jagielski
220*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::lang::IllegalArgumentException
221*b1cdbd2cSJim Jagielski			one of provided arguments is illegal
222*b1cdbd2cSJim Jagielski
223*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::packages::NoEncryptionException
224*b1cdbd2cSJim Jagielski			the stream is not encrypted
225*b1cdbd2cSJim Jagielski
226*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::packages::WrongPasswordException
227*b1cdbd2cSJim Jagielski			the provided password is wrong
228*b1cdbd2cSJim Jagielski
229*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::io::IOException
230*b1cdbd2cSJim Jagielski			in case of io errors during stream opening
231*b1cdbd2cSJim Jagielski
232*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::StorageWrappedTargetException
233*b1cdbd2cSJim Jagielski			wraps other exceptions
234*b1cdbd2cSJim Jagielski	 */
235*b1cdbd2cSJim Jagielski    ::com::sun::star::io::XStream  openEncryptedStreamElement(
236*b1cdbd2cSJim Jagielski			[in] string sStreamName,
237*b1cdbd2cSJim Jagielski			[in] long nOpenMode,
238*b1cdbd2cSJim Jagielski			[in] string sPassword )
239*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::embed::InvalidStorageException,
240*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
241*b1cdbd2cSJim Jagielski				::com::sun::star::packages::NoEncryptionException,
242*b1cdbd2cSJim Jagielski				::com::sun::star::packages::WrongPasswordException,
243*b1cdbd2cSJim Jagielski				::com::sun::star::io::IOException,
244*b1cdbd2cSJim Jagielski				::com::sun::star::embed::StorageWrappedTargetException );
245*b1cdbd2cSJim Jagielski
246*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
247*b1cdbd2cSJim Jagielski	/** allows to get access to a child storage.
248*b1cdbd2cSJim Jagielski
249*b1cdbd2cSJim Jagielski		<p>
250*b1cdbd2cSJim Jagielski		The opened substorage must support specified in 'nOpenMode' access
251*b1cdbd2cSJim Jagielski		modes. It can support 'read' mode in addition. But any child element
252*b1cdbd2cSJim Jagielski		can support one of those modes only in case this mode is supported by
253*b1cdbd2cSJim Jagielski		parent storage.
254*b1cdbd2cSJim Jagielski		</p>
255*b1cdbd2cSJim Jagielski
256*b1cdbd2cSJim Jagielski		@param sStorName
257*b1cdbd2cSJim Jagielski			the name of the storage that should be open
258*b1cdbd2cSJim Jagielski
259*b1cdbd2cSJim Jagielski		@param nOpenMode
260*b1cdbd2cSJim Jagielski			a mode the storage should be open in
261*b1cdbd2cSJim Jagielski
262*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
263*b1cdbd2cSJim Jagielski			this storage is in invalid state for any reason
264*b1cdbd2cSJim Jagielski
265*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::lang::IllegalArgumentException
266*b1cdbd2cSJim Jagielski			one of provided arguments is illegal
267*b1cdbd2cSJim Jagielski
268*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::io::IOException
269*b1cdbd2cSJim Jagielski			in case of io errors during stream opening
270*b1cdbd2cSJim Jagielski
271*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::StorageWrappedTargetException
272*b1cdbd2cSJim Jagielski			wraps other exceptions
273*b1cdbd2cSJim Jagielski
274*b1cdbd2cSJim Jagielski	 */
275*b1cdbd2cSJim Jagielski    XStorage openStorageElement( [in] string sStorName,
276*b1cdbd2cSJim Jagielski								 [in] long nOpenMode )
277*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::embed::InvalidStorageException,
278*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
279*b1cdbd2cSJim Jagielski				::com::sun::star::io::IOException,
280*b1cdbd2cSJim Jagielski				::com::sun::star::embed::StorageWrappedTargetException );
281*b1cdbd2cSJim Jagielski
282*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
283*b1cdbd2cSJim Jagielski	/** allows to get readonly copy of a child stream of the storage.
284*b1cdbd2cSJim Jagielski
285*b1cdbd2cSJim Jagielski		<p>
286*b1cdbd2cSJim Jagielski		The stream is open in readonly mode so the
287*b1cdbd2cSJim Jagielski		<method scope="com::sun::star::io">XStream::getOutputStream</method>
288*b1cdbd2cSJim Jagielski		method will return an empty reference.
289*b1cdbd2cSJim Jagielski		</p>
290*b1cdbd2cSJim Jagielski
291*b1cdbd2cSJim Jagielski		@param sStreamName
292*b1cdbd2cSJim Jagielski			the name of the substream that should be copied
293*b1cdbd2cSJim Jagielski
294*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
295*b1cdbd2cSJim Jagielski			this storage is in invalid state for any reason
296*b1cdbd2cSJim Jagielski
297*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::lang::IllegalArgumentException
298*b1cdbd2cSJim Jagielski			one of provided arguments is illegal
299*b1cdbd2cSJim Jagielski
300*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::packages::WrongPasswordException
301*b1cdbd2cSJim Jagielski			the provided password is wrong
302*b1cdbd2cSJim Jagielski
303*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::io::IOException
304*b1cdbd2cSJim Jagielski			in case of io errors during stream opening
305*b1cdbd2cSJim Jagielski
306*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::StorageWrappedTargetException
307*b1cdbd2cSJim Jagielski			wraps other exceptions
308*b1cdbd2cSJim Jagielski	 */
309*b1cdbd2cSJim Jagielski    ::com::sun::star::io::XStream cloneStreamElement( [in] string sStreamName )
310*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::embed::InvalidStorageException,
311*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
312*b1cdbd2cSJim Jagielski				::com::sun::star::packages::WrongPasswordException,
313*b1cdbd2cSJim Jagielski				::com::sun::star::io::IOException,
314*b1cdbd2cSJim Jagielski				::com::sun::star::embed::StorageWrappedTargetException );
315*b1cdbd2cSJim Jagielski
316*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
317*b1cdbd2cSJim Jagielski	/** allows to get readonly copy of a child encrypted stream with password.
318*b1cdbd2cSJim Jagielski
319*b1cdbd2cSJim Jagielski		<p>
320*b1cdbd2cSJim Jagielski		If storage does not allow any encryption this method will always throw
321*b1cdbd2cSJim Jagielski		<type scope="com::sun::star::packages">NoEncryptionException</type>.
322*b1cdbd2cSJim Jagielski		</p>
323*b1cdbd2cSJim Jagielski
324*b1cdbd2cSJim Jagielski		<p>
325*b1cdbd2cSJim Jagielski		The stream is open in readonly mode so the
326*b1cdbd2cSJim Jagielski		<method scope="com::sun::star::io">XStream::getOutputStream</method>
327*b1cdbd2cSJim Jagielski		method will return an empty reference.
328*b1cdbd2cSJim Jagielski		</p>
329*b1cdbd2cSJim Jagielski
330*b1cdbd2cSJim Jagielski		<p>
331*b1cdbd2cSJim Jagielski		This method allows to specify reading password for the child stream
332*b1cdbd2cSJim Jagielski		explicitly.
333*b1cdbd2cSJim Jagielski		</p>
334*b1cdbd2cSJim Jagielski
335*b1cdbd2cSJim Jagielski		@param sStreamName
336*b1cdbd2cSJim Jagielski			the name of the substream that should be copied
337*b1cdbd2cSJim Jagielski
338*b1cdbd2cSJim Jagielski		@param sPassword
339*b1cdbd2cSJim Jagielski			this parameter allowes to specify a reading password for the
340*b1cdbd2cSJim Jagielski			stream, the password must be a correct one, otherwise an
341*b1cdbd2cSJim Jagielski			exception will be thrown
342*b1cdbd2cSJim Jagielski
343*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
344*b1cdbd2cSJim Jagielski			this storage is in invalid state for any reason
345*b1cdbd2cSJim Jagielski
346*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::lang::IllegalArgumentException
347*b1cdbd2cSJim Jagielski			one of provided arguments is illegal
348*b1cdbd2cSJim Jagielski
349*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::packages::NoEncryptionException
350*b1cdbd2cSJim Jagielski			the stream is not encrypted
351*b1cdbd2cSJim Jagielski
352*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::packages::WrongPasswordException
353*b1cdbd2cSJim Jagielski			the provided password is wrong
354*b1cdbd2cSJim Jagielski
355*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::io::IOException
356*b1cdbd2cSJim Jagielski			in case of io errors during stream opening
357*b1cdbd2cSJim Jagielski
358*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::StorageWrappedTargetException
359*b1cdbd2cSJim Jagielski			wraps other exceptions
360*b1cdbd2cSJim Jagielski	 */
361*b1cdbd2cSJim Jagielski    ::com::sun::star::io::XStream cloneEncryptedStreamElement(
362*b1cdbd2cSJim Jagielski			[in] string sStreamName,
363*b1cdbd2cSJim Jagielski			[in] string sPassword )
364*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::embed::InvalidStorageException,
365*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
366*b1cdbd2cSJim Jagielski				::com::sun::star::packages::NoEncryptionException,
367*b1cdbd2cSJim Jagielski				::com::sun::star::packages::WrongPasswordException,
368*b1cdbd2cSJim Jagielski				::com::sun::star::io::IOException,
369*b1cdbd2cSJim Jagielski				::com::sun::star::embed::StorageWrappedTargetException );
370*b1cdbd2cSJim Jagielski
371*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
372*b1cdbd2cSJim Jagielski	/** allows to get copy of this storage at the state of it's last commit.
373*b1cdbd2cSJim Jagielski
374*b1cdbd2cSJim Jagielski		<p>
375*b1cdbd2cSJim Jagielski		This method makes sence only for services implementations that allow
376*b1cdbd2cSJim Jagielski		transaction in the storage.
377*b1cdbd2cSJim Jagielski		</p>
378*b1cdbd2cSJim Jagielski
379*b1cdbd2cSJim Jagielski		@param xStorage
380*b1cdbd2cSJim Jagielski			the target storage that will be filled in with copy.
381*b1cdbd2cSJim Jagielski
382*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
383*b1cdbd2cSJim Jagielski			this storage is in invalid state for any reason
384*b1cdbd2cSJim Jagielski
385*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::lang::IllegalArgumentException
386*b1cdbd2cSJim Jagielski			one of provided arguments is illegal
387*b1cdbd2cSJim Jagielski
388*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::io::IOException
389*b1cdbd2cSJim Jagielski			in case of io errors during copying
390*b1cdbd2cSJim Jagielski
391*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::StorageWrappedTargetException
392*b1cdbd2cSJim Jagielski			wraps other exceptions
393*b1cdbd2cSJim Jagielski
394*b1cdbd2cSJim Jagielski	 */
395*b1cdbd2cSJim Jagielski    void copyLastCommitTo( [in] XStorage xTargetStorage )
396*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::embed::InvalidStorageException,
397*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
398*b1cdbd2cSJim Jagielski				::com::sun::star::io::IOException,
399*b1cdbd2cSJim Jagielski				::com::sun::star::embed::StorageWrappedTargetException );
400*b1cdbd2cSJim Jagielski
401*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
402*b1cdbd2cSJim Jagielski	/** allows to get copy of a child storage at the state of it's last commit.
403*b1cdbd2cSJim Jagielski
404*b1cdbd2cSJim Jagielski		<p>
405*b1cdbd2cSJim Jagielski		This method makes sence only for services implementations that allow
406*b1cdbd2cSJim Jagielski		transaction in the storage.
407*b1cdbd2cSJim Jagielski		</p>
408*b1cdbd2cSJim Jagielski
409*b1cdbd2cSJim Jagielski		@param sStorName
410*b1cdbd2cSJim Jagielski			the name of the storage that should be copied
411*b1cdbd2cSJim Jagielski
412*b1cdbd2cSJim Jagielski		@param xStorage
413*b1cdbd2cSJim Jagielski			the target storage that will be filled in with copy
414*b1cdbd2cSJim Jagielski
415*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
416*b1cdbd2cSJim Jagielski			this storage is in invalid state for any reason
417*b1cdbd2cSJim Jagielski
418*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::lang::IllegalArgumentException
419*b1cdbd2cSJim Jagielski			one of provided arguments is illegal
420*b1cdbd2cSJim Jagielski
421*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::io::IOException
422*b1cdbd2cSJim Jagielski			in case of io errors during copying
423*b1cdbd2cSJim Jagielski
424*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::StorageWrappedTargetException
425*b1cdbd2cSJim Jagielski			wraps other exceptions
426*b1cdbd2cSJim Jagielski
427*b1cdbd2cSJim Jagielski	 */
428*b1cdbd2cSJim Jagielski    void copyStorageElementLastCommitTo(
429*b1cdbd2cSJim Jagielski			[in] string sStorName,
430*b1cdbd2cSJim Jagielski			[in] XStorage xTargetStorage )
431*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::embed::InvalidStorageException,
432*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
433*b1cdbd2cSJim Jagielski				::com::sun::star::io::IOException,
434*b1cdbd2cSJim Jagielski				::com::sun::star::embed::StorageWrappedTargetException );
435*b1cdbd2cSJim Jagielski
436*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
437*b1cdbd2cSJim Jagielski	/** allows to check if an element is a child stream with specified name.
438*b1cdbd2cSJim Jagielski
439*b1cdbd2cSJim Jagielski		<p>
440*b1cdbd2cSJim Jagielski		In case there is no child element with such name an exception will be
441*b1cdbd2cSJim Jagielski		thrown.
442*b1cdbd2cSJim Jagielski		</p>
443*b1cdbd2cSJim Jagielski
444*b1cdbd2cSJim Jagielski		@param sElementName
445*b1cdbd2cSJim Jagielski			the name of the element to check
446*b1cdbd2cSJim Jagielski
447*b1cdbd2cSJim Jagielski		@returns
448*b1cdbd2cSJim Jagielski			<TRUE/> in case the element is a stream
449*b1cdbd2cSJim Jagielski			<FALSE/> - the element is a storage
450*b1cdbd2cSJim Jagielski
451*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::container::NoSuchElementException
452*b1cdbd2cSJim Jagielski			there is no element with such name
453*b1cdbd2cSJim Jagielski
454*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::lang::IllegalArgumentException
455*b1cdbd2cSJim Jagielski			an illegal argument is provided
456*b1cdbd2cSJim Jagielski
457*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
458*b1cdbd2cSJim Jagielski			this storage is in invalid state for any reason
459*b1cdbd2cSJim Jagielski
460*b1cdbd2cSJim Jagielski	 */
461*b1cdbd2cSJim Jagielski    boolean isStreamElement( [in] string sElementName )
462*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::container::NoSuchElementException,
463*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
464*b1cdbd2cSJim Jagielski				::com::sun::star::embed::InvalidStorageException );
465*b1cdbd2cSJim Jagielski
466*b1cdbd2cSJim Jagielski
467*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
468*b1cdbd2cSJim Jagielski	/** allows to check if an element is a child storage with specified name.
469*b1cdbd2cSJim Jagielski
470*b1cdbd2cSJim Jagielski		<p>
471*b1cdbd2cSJim Jagielski		In case there is no child element with such name an exception will be
472*b1cdbd2cSJim Jagielski		thrown.
473*b1cdbd2cSJim Jagielski		</p>
474*b1cdbd2cSJim Jagielski
475*b1cdbd2cSJim Jagielski		@param sElementName
476*b1cdbd2cSJim Jagielski			the name of the element to check
477*b1cdbd2cSJim Jagielski
478*b1cdbd2cSJim Jagielski		@returns
479*b1cdbd2cSJim Jagielski			<TRUE/> in case the element is a storage
480*b1cdbd2cSJim Jagielski			<FALSE/> - the element is a stream
481*b1cdbd2cSJim Jagielski
482*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::container::NoSuchElementException
483*b1cdbd2cSJim Jagielski			there is no element with such name
484*b1cdbd2cSJim Jagielski
485*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::lang::IllegalArgumentException
486*b1cdbd2cSJim Jagielski			an illegal argument is provided
487*b1cdbd2cSJim Jagielski
488*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
489*b1cdbd2cSJim Jagielski			this storage is in invalid state for any reason
490*b1cdbd2cSJim Jagielski
491*b1cdbd2cSJim Jagielski	 */
492*b1cdbd2cSJim Jagielski    boolean isStorageElement( [in] string sElementName )
493*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::container::NoSuchElementException,
494*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
495*b1cdbd2cSJim Jagielski				::com::sun::star::embed::InvalidStorageException );
496*b1cdbd2cSJim Jagielski
497*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
498*b1cdbd2cSJim Jagielski	/** removes an element from a storage.
499*b1cdbd2cSJim Jagielski
500*b1cdbd2cSJim Jagielski		@param sElementName
501*b1cdbd2cSJim Jagielski			the name of the element to remove
502*b1cdbd2cSJim Jagielski
503*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
504*b1cdbd2cSJim Jagielski			this storage is in invalid state for eny reason
505*b1cdbd2cSJim Jagielski
506*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::lang::IllegalArgumentException
507*b1cdbd2cSJim Jagielski			an illegal argument is provided
508*b1cdbd2cSJim Jagielski
509*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::container::NoSuchElementException
510*b1cdbd2cSJim Jagielski			there is no element with such name
511*b1cdbd2cSJim Jagielski
512*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::io::IOException
513*b1cdbd2cSJim Jagielski			in case of io errors during removing
514*b1cdbd2cSJim Jagielski
515*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::StorageWrappedTargetException
516*b1cdbd2cSJim Jagielski			wraps other exceptions
517*b1cdbd2cSJim Jagielski
518*b1cdbd2cSJim Jagielski	 */
519*b1cdbd2cSJim Jagielski    void removeElement( [in] string sElementName )
520*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::embed::InvalidStorageException,
521*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
522*b1cdbd2cSJim Jagielski				::com::sun::star::container::NoSuchElementException,
523*b1cdbd2cSJim Jagielski				::com::sun::star::io::IOException,
524*b1cdbd2cSJim Jagielski				::com::sun::star::embed::StorageWrappedTargetException );
525*b1cdbd2cSJim Jagielski
526*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
527*b1cdbd2cSJim Jagielski	/** renames an element in a storage.
528*b1cdbd2cSJim Jagielski
529*b1cdbd2cSJim Jagielski		@param sElementName
530*b1cdbd2cSJim Jagielski			the old name of the element to rename
531*b1cdbd2cSJim Jagielski
532*b1cdbd2cSJim Jagielski		@param sNewName
533*b1cdbd2cSJim Jagielski			the new name of the element to rename
534*b1cdbd2cSJim Jagielski
535*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
536*b1cdbd2cSJim Jagielski			this storage is in invalid state for eny reason
537*b1cdbd2cSJim Jagielski
538*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::lang::IllegalArgumentException
539*b1cdbd2cSJim Jagielski			an illegal argument is provided
540*b1cdbd2cSJim Jagielski
541*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::container::NoSuchElementException
542*b1cdbd2cSJim Jagielski			there is no element with old name in this storage
543*b1cdbd2cSJim Jagielski
544*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::container::ElementExistException
545*b1cdbd2cSJim Jagielski			an element with new name already exists in this storage
546*b1cdbd2cSJim Jagielski
547*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::io::IOException
548*b1cdbd2cSJim Jagielski			in case of io errors during renaming
549*b1cdbd2cSJim Jagielski
550*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::StorageWrappedTargetException
551*b1cdbd2cSJim Jagielski			wraps other exceptions
552*b1cdbd2cSJim Jagielski
553*b1cdbd2cSJim Jagielski	 */
554*b1cdbd2cSJim Jagielski    void renameElement( [in] string sElementName, [in] string sNewName )
555*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::embed::InvalidStorageException,
556*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
557*b1cdbd2cSJim Jagielski				::com::sun::star::container::NoSuchElementException,
558*b1cdbd2cSJim Jagielski				::com::sun::star::container::ElementExistException,
559*b1cdbd2cSJim Jagielski				::com::sun::star::io::IOException,
560*b1cdbd2cSJim Jagielski				::com::sun::star::embed::StorageWrappedTargetException );
561*b1cdbd2cSJim Jagielski
562*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
563*b1cdbd2cSJim Jagielski	/** allows to copy an entry from one storage to another.
564*b1cdbd2cSJim Jagielski
565*b1cdbd2cSJim Jagielski		<p>
566*b1cdbd2cSJim Jagielski		If target element supports transacted mode it must be commited by this
567*b1cdbd2cSJim Jagielski		method after successful copying.
568*b1cdbd2cSJim Jagielski		</p>
569*b1cdbd2cSJim Jagielski
570*b1cdbd2cSJim Jagielski		@param sElementName
571*b1cdbd2cSJim Jagielski			the name of the element in this storage
572*b1cdbd2cSJim Jagielski
573*b1cdbd2cSJim Jagielski		@param xDest
574*b1cdbd2cSJim Jagielski			a destination storage
575*b1cdbd2cSJim Jagielski
576*b1cdbd2cSJim Jagielski		@param sNewName
577*b1cdbd2cSJim Jagielski			the name of the result element in destination storage
578*b1cdbd2cSJim Jagielski
579*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
580*b1cdbd2cSJim Jagielski			this storage is in invalid state for eny reason
581*b1cdbd2cSJim Jagielski
582*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::container::NoSuchElementException
583*b1cdbd2cSJim Jagielski			there is no specified source element in this storage
584*b1cdbd2cSJim Jagielski
585*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::container::ElementExistException
586*b1cdbd2cSJim Jagielski			an element with specified destination name already exists in destination storage
587*b1cdbd2cSJim Jagielski
588*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::io::IOException
589*b1cdbd2cSJim Jagielski			in case of io errors during copying
590*b1cdbd2cSJim Jagielski
591*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::StorageWrappedTargetException
592*b1cdbd2cSJim Jagielski			wraps other exceptions
593*b1cdbd2cSJim Jagielski
594*b1cdbd2cSJim Jagielski	 */
595*b1cdbd2cSJim Jagielski    void copyElementTo(
596*b1cdbd2cSJim Jagielski			[in] string sElementName,
597*b1cdbd2cSJim Jagielski			[in] XStorage xDest,
598*b1cdbd2cSJim Jagielski			[in] string sNewName )
599*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::embed::InvalidStorageException,
600*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
601*b1cdbd2cSJim Jagielski				::com::sun::star::container::NoSuchElementException,
602*b1cdbd2cSJim Jagielski				::com::sun::star::container::ElementExistException,
603*b1cdbd2cSJim Jagielski				::com::sun::star::io::IOException,
604*b1cdbd2cSJim Jagielski				::com::sun::star::embed::StorageWrappedTargetException );
605*b1cdbd2cSJim Jagielski
606*b1cdbd2cSJim Jagielski	// -----------------------------------------------------------------------
607*b1cdbd2cSJim Jagielski	/** allows to move an entry from one storage to another.
608*b1cdbd2cSJim Jagielski
609*b1cdbd2cSJim Jagielski		<p>
610*b1cdbd2cSJim Jagielski		If target element supports transacted mode it must be commited by this
611*b1cdbd2cSJim Jagielski		method after successful moving.
612*b1cdbd2cSJim Jagielski		</p>
613*b1cdbd2cSJim Jagielski
614*b1cdbd2cSJim Jagielski		@param sElementName
615*b1cdbd2cSJim Jagielski			the name of the element in this storage
616*b1cdbd2cSJim Jagielski
617*b1cdbd2cSJim Jagielski		@param xDest
618*b1cdbd2cSJim Jagielski			a destination storage
619*b1cdbd2cSJim Jagielski
620*b1cdbd2cSJim Jagielski		@param sNewName
621*b1cdbd2cSJim Jagielski			the name of the result element in destination storage
622*b1cdbd2cSJim Jagielski
623*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::InvalidStorageException
624*b1cdbd2cSJim Jagielski			this storage is in invalid state for eny reason
625*b1cdbd2cSJim Jagielski
626*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::container::NoSuchElementException
627*b1cdbd2cSJim Jagielski			there is no specified source element in this storage
628*b1cdbd2cSJim Jagielski
629*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::container::ElementExistException
630*b1cdbd2cSJim Jagielski			an element with specified destination name already exists in destination storage
631*b1cdbd2cSJim Jagielski
632*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::io::IOException
633*b1cdbd2cSJim Jagielski			in case of io errors during moving
634*b1cdbd2cSJim Jagielski
635*b1cdbd2cSJim Jagielski		@throws ::com::sun::star::embed::StorageWrappedTargetException
636*b1cdbd2cSJim Jagielski			wraps other exceptions
637*b1cdbd2cSJim Jagielski
638*b1cdbd2cSJim Jagielski	 */
639*b1cdbd2cSJim Jagielski    void moveElementTo(
640*b1cdbd2cSJim Jagielski			[in] string sElementName,
641*b1cdbd2cSJim Jagielski			[in] XStorage xDest,
642*b1cdbd2cSJim Jagielski			[in] string sNewName )
643*b1cdbd2cSJim Jagielski		raises( ::com::sun::star::embed::InvalidStorageException,
644*b1cdbd2cSJim Jagielski				::com::sun::star::lang::IllegalArgumentException,
645*b1cdbd2cSJim Jagielski				::com::sun::star::container::NoSuchElementException,
646*b1cdbd2cSJim Jagielski				::com::sun::star::container::ElementExistException,
647*b1cdbd2cSJim Jagielski				::com::sun::star::io::IOException,
648*b1cdbd2cSJim Jagielski				::com::sun::star::embed::StorageWrappedTargetException );
649*b1cdbd2cSJim Jagielski
650*b1cdbd2cSJim Jagielski};
651*b1cdbd2cSJim Jagielski
652*b1cdbd2cSJim Jagielski//============================================================================
653*b1cdbd2cSJim Jagielski
654*b1cdbd2cSJim Jagielski}; }; }; };
655*b1cdbd2cSJim Jagielski
656*b1cdbd2cSJim Jagielski#endif
657*b1cdbd2cSJim Jagielski
658