merged tag ooo/OOO330_m14
[LibreOffice.git] / offapi / com / sun / star / embed / XHierarchicalStorageAccess.idl
blob1f2cdcf132f95cde53b1f7464b6a92d3d14e357d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * This file is part of OpenOffice.org.
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.
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).
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.
26 ************************************************************************/
27 #ifndef __com_sun_star_embed_XHierarchicalStorageAccess_idl__
28 #define __com_sun_star_embed_XHierarchicalStorageAccess_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include <com/sun/star/uno/XInterface.idl>
32 #endif
34 #ifndef __com_sun_star_io_XStream_idl__
35 #include <com/sun/star/io/XStream.idl>
36 #endif
38 #ifndef __com_sun_star_embed_XExtendedStorageStream_idl__
39 #include <com/sun/star/embed/XExtendedStorageStream.idl>
40 #endif
42 #ifndef __com_sun_star_io_IOException_idl__
43 #include <com/sun/star/io/IOException.idl>
44 #endif
46 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
47 #include <com/sun/star/lang/IllegalArgumentException.idl>
48 #endif
50 #ifndef __com_sun_star_embed_StorageWrappedTargetException_idl__
51 #include <com/sun/star/embed/StorageWrappedTargetException.idl>
52 #endif
54 #ifndef __com_sun_star_embed_InvalidStorageException_idl__
55 #include <com/sun/star/embed/InvalidStorageException.idl>
56 #endif
58 #ifndef __com_sun_star_packages_WrongPasswordException_idl__
59 #include <com/sun/star/packages/WrongPasswordException.idl>
60 #endif
62 #ifndef __com_sun_star_container_XNameAccess_idl__
63 #include <com/sun/star/container/XNameAccess.idl>
64 #endif
66 #ifndef __com_sun_star_container_NoSuchElementException_idl__
67 #include <com/sun/star/container/NoSuchElementException.idl>
68 #endif
70 #ifndef __com_sun_star_container_ElementExistException_idl__
71 #include <com/sun/star/container/ElementExistException.idl>
72 #endif
74 #ifndef __com_sun_star_packages_NoEncryptionException_idl__
75 #include <com/sun/star/packages/NoEncryptionException.idl>
76 #endif
79 //============================================================================
81 module com { module sun { module star { module embed {
83 //============================================================================
84 /** This interface allows hierarchical access to storage tree.
86 <p>
87 Currently only streams can be opened using this interface.
88 </p>
90 <p>
91 The hierarchical access can not be mixed with a normal access. Thus when
92 in a storage a stream with a path "a/b/c" is accessed using hierarchical
93 access, another stream "a/b/d" can also be opened with hierarchical
94 access ( if it is still not opened ), but the substorage "a" can not be
95 opened ( it is locked by hierarchical access ).
96 </p>
98 published interface XHierarchicalStorageAccess
100 // METHODS
102 // -----------------------------------------------------------------------
103 /** allows to get access to a child stream of the storage, using
104 hierarchical path.
107 In case the stream is open in readonly mode the
108 <method scope="com::sun::star::io">XStream::getOutputStream</method>
109 method will return an empty reference.
110 </p>
112 @param sStreamPath
113 the path to the substream that should be open
115 @param nOpenMode
116 a mode the stream should be open in,
117 can be a combination of <type>ElementModes</type> values
119 @throws ::com::sun::star::embed::InvalidStorageException
120 this storage is in invalid state for any reason
122 @throws ::com::sun::star::lang::IllegalArgumentException
123 one of provided arguments is illegal
125 @throws ::com::sun::star::packages::WrongPasswordException
126 the provided password is wrong
128 @throws ::com::sun::star::io::IOException
129 in case of io errors during stream opening
131 @throws ::com::sun::star::embed::StorageWrappedTargetException
132 wraps other exceptions
134 XExtendedStorageStream openStreamElementByHierarchicalName(
135 [in] string sStreamPath,
136 [in] long nOpenMode )
137 raises( ::com::sun::star::embed::InvalidStorageException,
138 ::com::sun::star::lang::IllegalArgumentException,
139 ::com::sun::star::packages::WrongPasswordException,
140 ::com::sun::star::io::IOException,
141 ::com::sun::star::embed::StorageWrappedTargetException );
143 // -----------------------------------------------------------------------
144 /** allows to get access to a child encrypted stream with password using
145 hierarchical path.
148 If storage does not allow any encryption this method will always throw
149 <type scope="com::sun::star::packages">NoEncryptionException</type>.
150 </p>
153 In case the stream is open in readonly mode the
154 <method scope="com::sun::star::io">XStream::getOutputStream</method>
155 method will return an empty reference.
156 </p>
158 @param sStreamPath
159 the path to the substream that should be open
161 @param nOpenMode
162 a mode the stream should be open in,
163 can be a combination of <type>ElementModes</type> values
165 @param sPassword
166 this parameter allowes to specify a reading password for the
167 stream, the password must be a correct one, otherwise an
168 exception will be thrown
170 @throws ::com::sun::star::embed::InvalidStorageException
171 this storage is in invalid state for any reason
173 @throws ::com::sun::star::lang::IllegalArgumentException
174 one of provided arguments is illegal
176 @throws ::com::sun::star::packages::NoEncryptionException
177 the stream is not encrypted
179 @throws ::com::sun::star::packages::WrongPasswordException
180 the provided password is wrong
182 @throws ::com::sun::star::io::IOException
183 in case of io errors during stream opening
185 @throws ::com::sun::star::embed::StorageWrappedTargetException
186 wraps other exceptions
188 XExtendedStorageStream openEncryptedStreamElementByHierarchicalName(
189 [in] string sStreamName,
190 [in] long nOpenMode,
191 [in] string sPassword )
192 raises( ::com::sun::star::embed::InvalidStorageException,
193 ::com::sun::star::lang::IllegalArgumentException,
194 ::com::sun::star::packages::NoEncryptionException,
195 ::com::sun::star::packages::WrongPasswordException,
196 ::com::sun::star::io::IOException,
197 ::com::sun::star::embed::StorageWrappedTargetException );
199 // -----------------------------------------------------------------------
200 /** removes a stream specified by hierarchical name from a storage.
202 @param sElementPath
203 the path to the element to remove
205 @throws ::com::sun::star::embed::InvalidStorageException
206 this storage is in invalid state for eny reason
208 @throws ::com::sun::star::lang::IllegalArgumentException
209 an illegal argument is provided
211 @throws ::com::sun::star::container::NoSuchElementException
212 there is no element with such name
214 @throws ::com::sun::star::io::IOException
215 in case of io errors during removing
217 @throws ::com::sun::star::embed::StorageWrappedTargetException
218 wraps other exceptions
221 void removeStreamElementByHierarchicalName( [in] string sElementPath )
222 raises( ::com::sun::star::embed::InvalidStorageException,
223 ::com::sun::star::lang::IllegalArgumentException,
224 ::com::sun::star::container::NoSuchElementException,
225 ::com::sun::star::io::IOException,
226 ::com::sun::star::embed::StorageWrappedTargetException );
230 //============================================================================
232 }; }; }; };
234 #endif