summaryrefslogtreecommitdiff
path: root/package/inc
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2003-09-11 09:13:55 +0000
committerKurt Zenker <kz@openoffice.org>2003-09-11 09:13:55 +0000
commit1b7e17e60f3527a78f2c098e7bc554d058ff08f4 (patch)
tree6d42b6a3c71fdc766460b50dc9c4a5f1e8a48471 /package/inc
parent594d4f450641e724f9f24c2ea272830a0dab5c51 (diff)
INTEGRATION: CWS mav05 (1.18.18); FILE MERGED
2003/09/04 07:57:13 mav 1.18.18.3: #i15929# WrongPasswordException.idl is in packages now 2003/07/21 14:14:19 mav 1.18.18.2: #i15929# include MediaType in raw stream header, and other fixes 2003/07/18 14:20:47 mav 1.18.18.1: #i15929# support encryption in storages
Diffstat (limited to 'package/inc')
-rw-r--r--package/inc/ZipFile.hxx72
1 files changed, 62 insertions, 10 deletions
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx
index edc6ad166a0d..2aa04cd96873 100644
--- a/package/inc/ZipFile.hxx
+++ b/package/inc/ZipFile.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ZipFile.hxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: hr $ $Date: 2003-03-26 14:13:41 $
+ * last change: $Author: kz $ $Date: 2003-09-11 10:13:55 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,6 +61,20 @@
#ifndef _ZIP_FILE_HXX
#define _ZIP_FILE_HXX
+#ifndef _COM_SUN_STAR_PACKAGES_ZIP_ZIPEXCEPTION_HPP_
+#include <com/sun/star/packages/zip/ZipException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PACKAGES_ZIP_ZIPIOEXCEPTION_HPP_
+#include <com/sun/star/packages/zip/ZipIOException.hpp>
+#endif
+#ifndef _COM_SUN_STAR_PACKAGES_NOENCRYPTIONEXCEPTION_HPP_
+#include <com/sun/star/packages/NoEncryptionException.hpp>
+#endif
+
+#ifndef _COM_SUN_STAR_PACKAGES_WRONGPASSWORDEXCEPTION_HPP_
+#include <com/sun/star/packages/WrongPasswordException.hpp>
+#endif
+
#ifndef _BYTE_GRABBER_HXX_
#include <ByteGrabber.hxx>
#endif
@@ -70,9 +84,7 @@
#ifndef _INFLATER_HXX
#include <Inflater.hxx>
#endif
-#ifndef _COM_SUN_STAR_PACKAGES_ZIP_ZIPEXCEPTION_HPP_
-#include <com/sun/star/packages/zip/ZipException.hpp>
-#endif
+
namespace com { namespace sun { namespace star {
namespace lang { class XMultiServiceFactory; }
@@ -119,11 +131,13 @@ protected:
sal_Bool bRawStream,
sal_Bool bDecrypt );
+ // aMediaType parameter is used only for raw stream header creation
com::sun::star::uno::Reference < com::sun::star::io::XInputStream > createUnbufferedStream(
ZipEntry & rEntry,
const vos::ORef < EncryptionData > &rData,
- sal_Bool bRawStream,
- sal_Bool bDecrypt );
+ sal_Int8 nStreamMode,
+ sal_Bool bDecrypt,
+ ::rtl::OUString aMediaType = ::rtl::OUString() );
sal_Bool hasValidPassword ( ZipEntry & rEntry, const vos::ORef < EncryptionData > &rData );
@@ -152,21 +166,59 @@ public:
~ZipFile();
void setInputStream ( com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xNewStream );
- ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getRawStream(
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getRawData(
ZipEntry& rEntry,
const vos::ORef < EncryptionData > &rData,
sal_Bool bDecrypt)
throw(::com::sun::star::io::IOException, ::com::sun::star::packages::zip::ZipException, ::com::sun::star::uno::RuntimeException);
static void StaticGetCipher ( const vos::ORef < EncryptionData > & xEncryptionData, rtlCipher &rCipher );
- static void StaticFillHeader ( const vos::ORef < EncryptionData > & rData, sal_Int32 nSize, sal_Int8 * & pHeader );
- static sal_Bool StaticFillData ( vos::ORef < EncryptionData > & rData, sal_Int32 &rSize, ::com::sun::star::uno::Reference < com::sun::star::io::XInputStream > &rStream );
+
+ static void StaticFillHeader ( const vos::ORef < EncryptionData > & rData,
+ sal_Int32 nSize,
+ const ::rtl::OUString& aMediaType,
+ sal_Int8 * & pHeader );
+
+ static sal_Bool StaticFillData ( vos::ORef < EncryptionData > & rData,
+ sal_Int32 &rSize,
+ ::rtl::OUString& aMediaType,
+ ::com::sun::star::uno::Reference < com::sun::star::io::XInputStream > &rStream );
+
+ static ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > StaticGetDataFromRawStream(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xStream,
+ const vos::ORef < EncryptionData > &rData )
+ throw ( ::com::sun::star::packages::WrongPasswordException,
+ ::com::sun::star::packages::zip::ZipIOException,
+ ::com::sun::star::uno::RuntimeException );
+
+ static sal_Bool StaticHasValidPassword ( const ::com::sun::star::uno::Sequence< sal_Int8 > &aReadBuffer,
+ const vos::ORef < EncryptionData > &rData );
+
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getInputStream(
ZipEntry& rEntry,
const vos::ORef < EncryptionData > &rData,
sal_Bool bDecrypt )
throw(::com::sun::star::io::IOException, ::com::sun::star::packages::zip::ZipException, ::com::sun::star::uno::RuntimeException);
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getDataStream(
+ ZipEntry& rEntry,
+ const vos::ORef < EncryptionData > &rData,
+ sal_Bool bDecrypt )
+ throw ( ::com::sun::star::packages::WrongPasswordException,
+ ::com::sun::star::io::IOException,
+ ::com::sun::star::packages::zip::ZipException,
+ ::com::sun::star::uno::RuntimeException );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getWrappedRawStream(
+ ZipEntry& rEntry,
+ const vos::ORef < EncryptionData > &rData,
+ const ::rtl::OUString& aMediaType )
+ throw ( ::com::sun::star::packages::NoEncryptionException,
+ ::com::sun::star::io::IOException,
+ ::com::sun::star::packages::zip::ZipException,
+ ::com::sun::star::uno::RuntimeException );
+
::rtl::OUString SAL_CALL getName( )
throw(::com::sun::star::uno::RuntimeException);
sal_Int32 SAL_CALL getSize( )