Bump for 3.6-28
[LibreOffice.git] / offapi / com / sun / star / packages / XDataSinkEncrSupport.idl
blob395003a02537c23cf9b3b02c0094839e38b0ecae
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef __com_sun_star_packages_XDataSinkEncrSupport_idl__
29 #define __com_sun_star_packages_XDataSinkEncrSupport_idl__
31 #include <com/sun/star/uno/XInterface.idl>
33 #include <com/sun/star/io/XInputStream.idl>
35 #include <com/sun/star/io/IOException.idl>
36 #include <com/sun/star/packages/WrongPasswordException.idl>
37 #include <com/sun/star/packages/NoEncryptionException.idl>
39 #include <com/sun/star/packages/EncryptionNotAllowedException.idl>
40 #include <com/sun/star/packages/NoRawFormatException.idl>
43 //=============================================================================
45 module com { module sun { module star { module packages {
47 //=============================================================================
49 /** Allows to get access to the stream of a <type>PackageStream</type>.
51 interface XDataSinkEncrSupport: com::sun::star::uno::XInterface
53 //-------------------------------------------------------------------------
54 /** Allows to get access to the data of the PackageStream.
55 <p>
56 In case stream is encrypted one and the key for the stream is not set,
57 an exception must be thrown.
58 </p>
60 @returns
61 the stream
63 @throws ::com::sun::star::packages::WrongPasswordException
64 no key or a wrong one is set
66 @throws ::com::sun::star::io::IOException
67 in case of io problems during retrieving
69 ::com::sun::star::io::XInputStream getDataStream()
70 raises( ::com::sun::star::packages::WrongPasswordException,
71 ::com::sun::star::io::IOException );
74 //-------------------------------------------------------------------------
75 /** Allows to get access to the data of the PackageStream as to raw stream.
76 In case stream is not encrypted an exception will be thrown.
77 <p>
78 The difference of raw stream is that it contains header for encrypted data,
79 so an encrypted stream can be copied from one PackageStream to
80 another one without decryption.
81 </p>
83 @returns
84 the raw representation of stream
86 @throws ::com::sun::star::packages::NoEncryptionException
87 the PackageStream object is not encrypted
89 @throws ::com::sun::star::io::IOException
90 in case of io problems during retrieving
92 ::com::sun::star::io::XInputStream getRawStream()
93 raises( ::com::sun::star::packages::NoEncryptionException,
94 ::com::sun::star::io::IOException );
96 //-------------------------------------------------------------------------
97 /** Allows to set a data stream for the PackageStream.
98 <p>
99 In case PackageStream is marked as encrypted the data stream will be encrypted on storing.
100 </p>
102 @param aStream
103 new data stream
105 @throws ::com::sun::star::io::IOException
106 in case of io problems
108 void setDataStream( [in] ::com::sun::star::io::XInputStream aStream )
109 raises( ::com::sun::star::io::IOException );
111 //-------------------------------------------------------------------------
112 /** Allows to set raw stream for the PackageStream.
113 The PackageStream object can not be marked as encrypted one,
114 an exception will be thrown in such case.
116 @param aStream
117 the new raw representation of stream
119 @throws ::com::sun::star::packages::EncryptionNotAllowedException
120 the PackageStream object is marked as encrypted
122 @throws ::com::sun::star::packages::NoRawFormatException
123 the stream is not a correct raw representation of encrypted package stream
125 @throws ::com::sun::star::io::IOException
126 in case of io problems during retrieving
128 void setRawStream( [in] ::com::sun::star::io::XInputStream aStream )
129 raises( ::com::sun::star::packages::EncryptionNotAllowedException,
130 ::com::sun::star::packages::NoRawFormatException,
131 ::com::sun::star::io::IOException );
133 //-------------------------------------------------------------------------
134 /** Allows to get access to the raw data of the stream as it is stored in
135 the package.
137 @returns
138 the plain raw stream as it is stored in the package
140 @throws ::com::sun::star::io::IOException
141 in case of io problems during retrieving
143 ::com::sun::star::io::XInputStream getPlainRawStream()
144 raises( ::com::sun::star::io::IOException );
148 //=============================================================================
150 }; }; }; };
152 /*=============================================================================
154 =============================================================================*/
155 #endif
157 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */