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_packages_XDataSinkEncrSupport_idl__
28 #define __com_sun_star_packages_XDataSinkEncrSupport_idl__
30 #ifndef __com_sun_star_uno_XInterface_idl__
31 #include
<com
/sun
/star
/uno
/XInterface.idl
>
34 #ifndef __com_sun_star_io_XInputStream_idl__
35 #include
<com
/sun
/star
/io
/XInputStream.idl
>
38 #ifndef __com_sun_star_io_IOException_idl__
39 #include
<com
/sun
/star
/io
/IOException.idl
>
42 #ifndef __com_sun_star_packages_WrongPasswordException_idl__
43 #include
<com
/sun
/star
/packages
/WrongPasswordException.idl
>
46 #ifndef __com_sun_star_packages_NoEncryptionException_idl__
47 #include
<com
/sun
/star
/packages
/NoEncryptionException.idl
>
50 #ifndef __com_sun_star_packages_EncryptionNotAllowedException_idl__
51 #include
<com
/sun
/star
/packages
/EncryptionNotAllowedException.idl
>
54 #ifndef __com_sun_star_packages_NoRawFormatException_idl__
55 #include
<com
/sun
/star
/packages
/NoRawFormatException.idl
>
59 //=============================================================================
61 module com
{ module sun
{ module star
{ module packages
{
63 //=============================================================================
65 /** Allows to get access to the stream of a <type>PackageStream</type>.
67 interface XDataSinkEncrSupport
: com
::sun
::star
::uno
::XInterface
69 //-------------------------------------------------------------------------
70 /** Allows to get access to the data of the PackageStream.
72 In case stream is encrypted one and the key for the stream is not set,
73 an exception must be thrown.
79 @throws ::com::sun::star::packages::WrongPasswordException
80 no key or a wrong one is set
82 @throws ::com::sun::star::io::IOException
83 in case of io problems during retrieving
85 ::com
::sun
::star
::io
::XInputStream getDataStream
()
86 raises
( ::com
::sun
::star
::packages
::WrongPasswordException
,
87 ::com
::sun
::star
::io
::IOException
);
90 //-------------------------------------------------------------------------
91 /** Allows to get access to the data of the PackageStream as to raw stream.
92 In case stream is not encrypted an exception will be thrown.
94 The difference of raw stream is that it contains header for encrypted data,
95 so an encrypted stream can be copyed from one PackageStream to
96 another one without decryption.
100 the raw representation of stream
102 @throws ::com::sun::star::packages::NoEncryptionException
103 the PackageStream object is not encrypted
105 @throws ::com::sun::star::io::IOException
106 in case of io problems during retrieving
108 ::com
::sun
::star
::io
::XInputStream getRawStream
()
109 raises
( ::com
::sun
::star
::packages
::NoEncryptionException
,
110 ::com
::sun
::star
::io
::IOException
);
112 //-------------------------------------------------------------------------
113 /** Allows to set a data stream for the PackageStream.
115 In case PackageStream is marked as encrypted the data stream will be encrypted on storing.
121 @throws ::com::sun::star::io::IOException
122 in case of io problems
124 void setDataStream
( [in] ::com
::sun
::star
::io
::XInputStream aStream
)
125 raises
( ::com
::sun
::star
::io
::IOException
);
127 //-------------------------------------------------------------------------
128 /** Allows to set raw stream for the PackageStream.
129 The PackageStream object can not be marked as encrypted one,
130 an exception will be thrown in such case.
133 the new raw representation of stream
135 @throws ::com::sun::star::packages::EncryptionNotAllowedException
136 the PackageStream object is marked as encrypted
138 @throws ::com::sun::star::packages::NoRawFormatException
139 the stream is not a correct raw representation of encrypted package stream
141 @throws ::com::sun::star::io::IOException
142 in case of io problems during retrieving
144 void setRawStream
( [in] ::com
::sun
::star
::io
::XInputStream aStream
)
145 raises
( ::com
::sun
::star
::packages
::EncryptionNotAllowedException
,
146 ::com
::sun
::star
::packages
::NoRawFormatException
,
147 ::com
::sun
::star
::io
::IOException
);
149 //-------------------------------------------------------------------------
150 /** Allows to get access to the raw data of the stream as it is stored in
154 the plain raw stream as it is stored in the package
156 @throws ::com::sun::star::io::IOException
157 in case of io problems during retrieving
159 ::com
::sun
::star
::io
::XInputStream getPlainRawStream
()
160 raises
( ::com
::sun
::star
::io
::IOException
);
164 //=============================================================================
168 /*=============================================================================
170 =============================================================================*/