1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_embed_XStorage2_idl__
20 #define __com_sun_star_embed_XStorage2_idl__
22 #include
<com
/sun
/star
/embed
/XStorage.idl
>
23 #include
<com
/sun
/star
/beans
/NamedValue.idl
>
27 module com
{ module sun
{ module star
{ module embed
{
29 /** This interface extends the base XStorage interface.
31 interface XStorage2
: XStorage
33 /** allows to get access to a child encrypted stream with EncryptionData.
36 If storage does not allow any encryption this method will always throw
37 com::sun::star::packages::NoEncryptionException.
41 In case the stream is open in readonly mode the
42 com::sun::star::io::XStream::getOutputStream()
43 method will return an empty reference.
47 the name of the substream that should be open
50 a mode the stream should be open in,
51 can be a combination of ElementModes values
53 @param aEncryptionData
54 this parameter allowes to specify an encryption data to decrypt the
55 stream, the encryption data must be correct, otherwise an
56 exception will be thrown
58 @throws ::com::sun::star::embed::InvalidStorageException
59 this storage is in invalid state for any reason
61 @throws ::com::sun::star::lang::IllegalArgumentException
62 one of provided arguments is illegal
64 @throws ::com::sun::star::packages::NoEncryptionException
65 the stream is not encrypted
67 @throws ::com::sun::star::packages::WrongPasswordException
68 the provided encryption data is wrong
70 @throws ::com::sun::star::io::IOException
71 in case of io errors during stream opening
73 @throws ::com::sun::star::embed::StorageWrappedTargetException
74 wraps other exceptions
76 ::com
::sun
::star
::io
::XStream openEncryptedStream
(
77 [in] string sStreamName
,
79 [in] sequence
< ::com
::sun
::star
::beans
::NamedValue
> aEncryptionData
)
80 raises
( ::com
::sun
::star
::embed
::InvalidStorageException
,
81 ::com
::sun
::star
::lang
::IllegalArgumentException
,
82 ::com
::sun
::star
::packages
::NoEncryptionException
,
83 ::com
::sun
::star
::packages
::WrongPasswordException
,
84 ::com
::sun
::star
::io
::IOException
,
85 ::com
::sun
::star
::embed
::StorageWrappedTargetException
);
87 /** allows to get readonly copy of a child encrypted stream with encryption
91 If storage does not allow any encryption this method will always throw
92 com::sun::star::packages::NoEncryptionException.
96 The stream is open in readonly mode so the
97 com::sun::star::io::XStream::getOutputStream()
98 method will return an empty reference.
102 This method allows to specify encryption data for the child stream
107 the name of the substream that should be copied
109 @param aEncryptionData
110 this parameter allowes to specify an encryption data for the
111 stream, the encryption data must be correct, otherwise an
112 exception will be thrown
114 @throws ::com::sun::star::embed::InvalidStorageException
115 this storage is in invalid state for any reason
117 @throws ::com::sun::star::lang::IllegalArgumentException
118 one of provided arguments is illegal
120 @throws ::com::sun::star::packages::NoEncryptionException
121 the stream is not encrypted
123 @throws ::com::sun::star::packages::WrongPasswordException
124 the provided encryption data is wrong
126 @throws ::com::sun::star::io::IOException
127 in case of io errors during stream opening
129 @throws ::com::sun::star::embed::StorageWrappedTargetException
130 wraps other exceptions
132 ::com
::sun
::star
::io
::XStream cloneEncryptedStream
(
133 [in] string sStreamName
,
134 [in] sequence
< ::com
::sun
::star
::beans
::NamedValue
> aEncryptionData
)
135 raises
( ::com
::sun
::star
::embed
::InvalidStorageException
,
136 ::com
::sun
::star
::lang
::IllegalArgumentException
,
137 ::com
::sun
::star
::packages
::NoEncryptionException
,
138 ::com
::sun
::star
::packages
::WrongPasswordException
,
139 ::com
::sun
::star
::io
::IOException
,
140 ::com
::sun
::star
::embed
::StorageWrappedTargetException
);
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */