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_embed_XHierarchicalStorageAccess2_idl__
24#define __com_sun_star_embed_XHierarchicalStorageAccess2_idl__
25
26#ifndef __com_sun_star_embed_XHierarchicalStorageAccess_idl__
27#include <com/sun/star/embed/XHierarchicalStorageAccess.idl>
28#endif
29
30#ifndef __com_sun_star_beans_NamedValue_idl__
31#include <com/sun/star/beans/NamedValue.idl>
32#endif
33
34//============================================================================
35
36 module com {  module sun {  module star {  module embed {
37
38//============================================================================
39/** This interface extends XHierarchicalStorageAccess interface.
40 */
41interface XHierarchicalStorageAccess2 : XHierarchicalStorageAccess
42{
43	// -----------------------------------------------------------------------
44	/** allows to get access to a child encrypted stream with encryption data
45        using hierarchical path.
46
47		<p>
48		If storage does not allow any encryption this method will always throw
49		<type scope="com::sun::star::packages">NoEncryptionException</type>.
50		</p>
51
52		<p>
53		In case the stream is open in readonly mode the
54		<method scope="com::sun::star::io">XStream::getOutputStream</method>
55		method will return an empty reference.
56		</p>
57
58		@param sStreamPath
59			the path to the substream that should be open
60
61		@param nOpenMode
62			a mode the stream should be open in,
63			can be a combination of <type>ElementModes</type> values
64
65		@param aEncryptionData
66			this parameter allowes to specify an encryption data for the
67			stream, the data must be correct, otherwise an
68			exception will be thrown
69
70		@throws ::com::sun::star::embed::InvalidStorageException
71			this storage is in invalid state for any reason
72
73		@throws ::com::sun::star::lang::IllegalArgumentException
74			one of provided arguments is illegal
75
76		@throws ::com::sun::star::packages::NoEncryptionException
77			the stream is not encrypted
78
79		@throws ::com::sun::star::packages::WrongPasswordException
80			the provided password is wrong
81
82		@throws ::com::sun::star::io::IOException
83			in case of io errors during stream opening
84
85		@throws ::com::sun::star::embed::StorageWrappedTargetException
86			wraps other exceptions
87	 */
88    XExtendedStorageStream  openEncryptedStreamByHierarchicalName(
89			[in] string sStreamName,
90			[in] long nOpenMode,
91			[in] sequence< ::com::sun::star::beans::NamedValue > aEncryptionData )
92		raises( ::com::sun::star::embed::InvalidStorageException,
93				::com::sun::star::lang::IllegalArgumentException,
94				::com::sun::star::packages::NoEncryptionException,
95				::com::sun::star::packages::WrongPasswordException,
96				::com::sun::star::io::IOException,
97				::com::sun::star::embed::StorageWrappedTargetException );
98};
99
100//============================================================================
101
102}; }; }; };
103
104#endif
105
106