diff options
-rw-r--r-- | package/inc/ByteChucker.hxx | 11 | ||||
-rw-r--r-- | package/inc/ByteGrabber.hxx | 9 | ||||
-rw-r--r-- | package/inc/CRC32.hxx | 9 | ||||
-rw-r--r-- | package/inc/Deflater.hxx | 20 | ||||
-rw-r--r-- | package/inc/HashMaps.hxx | 97 | ||||
-rw-r--r-- | package/inc/Inflater.hxx | 22 | ||||
-rw-r--r-- | package/inc/ZipFile.hxx | 121 | ||||
-rw-r--r-- | package/inc/ZipOutputStream.hxx | 29 | ||||
-rw-r--r-- | package/inc/ZipPackage.hxx | 83 | ||||
-rw-r--r-- | package/inc/ZipPackageBuffer.hxx | 9 |
10 files changed, 153 insertions, 257 deletions
diff --git a/package/inc/ByteChucker.hxx b/package/inc/ByteChucker.hxx index 3658c07151bd..8e1a0699fba5 100644 --- a/package/inc/ByteChucker.hxx +++ b/package/inc/ByteChucker.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ByteChucker.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: mtg $ $Date: 2000-12-19 21:55:35 $ + * last change: $Author: mtg $ $Date: 2001-04-19 14:11:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,20 +61,13 @@ #ifndef _BYTE_CHUCKER_HXX_ #define _BYTE_CHUCKER_HXX_ -#ifndef _SAL_TYPES_H_ -#include <sal/types.h> -#endif - #ifndef _COM_SUN_STAR_IO_XOUTPUTSTREAM_HPP_ #include <com/sun/star/io/XOutputStream.hpp> #endif - #ifndef _COM_SUN_STAR_IO_XSEEKABLE_HPP_ #include <com/sun/star/io/XSeekable.hpp> #endif -#include <memory.h> //for memcpy - class ByteChucker { private: diff --git a/package/inc/ByteGrabber.hxx b/package/inc/ByteGrabber.hxx index 65e3e937e875..3496cb7210a6 100644 --- a/package/inc/ByteGrabber.hxx +++ b/package/inc/ByteGrabber.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ByteGrabber.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: mtg $ $Date: 2000-12-19 21:55:35 $ + * last change: $Author: mtg $ $Date: 2001-04-19 14:11:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,14 +61,9 @@ #ifndef _BYTE_GRABBER_HXX_ #define _BYTE_GRABBER_HXX_ -#ifndef _SAL_TYPES_H_ -#include <sal/types.h> -#endif - #ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_ #include <com/sun/star/io/XInputStream.hpp> #endif - #ifndef _COM_SUN_STAR_IO_XSEEKABLE_HPP_ #include <com/sun/star/io/XSeekable.hpp> #endif diff --git a/package/inc/CRC32.hxx b/package/inc/CRC32.hxx index c397df383123..8ca85ffe6189 100644 --- a/package/inc/CRC32.hxx +++ b/package/inc/CRC32.hxx @@ -2,9 +2,9 @@ * * $RCSfile: CRC32.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: mtg $ $Date: 2001-03-16 17:11:40 $ + * last change: $Author: mtg $ $Date: 2001-04-19 14:11:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,11 +64,6 @@ #ifndef _CPPUHELPER_IMPLBASE1_HXX_ #include <cppuhelper/implbase1.hxx> #endif - -#ifndef _ZLIB_H -#include <external/zlib/zlib.h> -#endif - #ifndef _COM_SUN_STAR_PACKAGE_XCHECKSUM_HPP_ #include <com/sun/star/packages/XChecksum.hpp> #endif diff --git a/package/inc/Deflater.hxx b/package/inc/Deflater.hxx index c715ed5e614f..5a0259056e31 100644 --- a/package/inc/Deflater.hxx +++ b/package/inc/Deflater.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Deflater.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: mtg $ $Date: 2001-03-16 17:11:40 $ + * last change: $Author: mtg $ $Date: 2001-04-19 14:11:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,22 +64,14 @@ #ifndef _COM_SUN_STAR_PACKAGE_XDEFLATER_HDL_ #include <com/sun/star/packages/XDeflater.hpp> #endif - #ifndef _CPPUHELPER_IMPLBASE1_HXX_ #include <cppuhelper/implbase1.hxx> #endif -#ifndef _ZLIB_H -#include <external/zlib/zlib.h> -#endif - -#ifndef _VOS_DIAGNOSE_H_ -#include <vos/diagnose.hxx> -#endif - -#ifndef _COM_SUN_STAR_PACKAGE_ZIPCONSTANTS_HPP_ -#include <com/sun/star/packages/ZipConstants.hpp> -#endif +extern "C" +{ + typedef struct z_stream_s z_stream;; +}; class Deflater : public cppu::WeakImplHelper1 < com::sun::star::packages::XDeflater> { diff --git a/package/inc/HashMaps.hxx b/package/inc/HashMaps.hxx new file mode 100644 index 000000000000..e58f3607c52c --- /dev/null +++ b/package/inc/HashMaps.hxx @@ -0,0 +1,97 @@ +/************************************************************************* + * + * $RCSfile: HashMaps.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: mtg $ $Date: 2001-04-19 14:11:06 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): Martin Gallwey (gallwey@sun.com) + * + * + ************************************************************************/ +#ifndef _HASHMAPS_HXX +#define _HASHMAPS_HXX + +#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_ +#include <com/sun/star/container/XNameContainer.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XUNOTUNNEl_HPP_ +#include <com/sun/star/lang/XUnoTunnel.hpp> +#endif +#include <hash_map> + +struct eqFunc +{ + sal_Bool operator()( const rtl::OUString &r1, + const rtl::OUString &r2) const + { + return r1 == r2; + } +}; + +struct hashFunc +{ + sal_Int32 operator()(const rtl::OUString &r1) const + { + return r1.hashCode(); + } +}; +typedef std::hash_map < rtl::OUString, + com::sun::star::uno::Reference < com::sun::star::lang::XUnoTunnel >, + hashFunc, + eqFunc > TunnelHash; + +typedef std::hash_map < rtl::OUString, + com::sun::star::uno::Reference < com::sun::star::container::XNameContainer >, + hashFunc, + eqFunc > NameHash; +#endif diff --git a/package/inc/Inflater.hxx b/package/inc/Inflater.hxx index 1eaa8fb1117c..b9b21eeb71e5 100644 --- a/package/inc/Inflater.hxx +++ b/package/inc/Inflater.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Inflater.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: mtg $ $Date: 2001-03-16 17:11:40 $ + * last change: $Author: mtg $ $Date: 2001-04-19 14:11:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,27 +61,17 @@ #ifndef _INFLATER_HXX_ #define _INFLATER_HXX_ -#ifndef _ZLIB_H -#include <external/zlib/zlib.h> -#endif - #ifndef _COM_SUN_STAR_PACKAGE_XINFLATER_HDL_ #include <com/sun/star/packages/XInflater.hpp> #endif - #ifndef _CPPUHELPER_IMPLBASE1_HXX_ #include <cppuhelper/implbase1.hxx> #endif -#ifndef _VOS_DIAGNOSE_H_ -#include <vos/diagnose.hxx> -#endif - -#ifndef _COM_SUN_STAR_PACKAGE_ZIPCONSTANTS_HPP_ -#include <com/sun/star/packages/ZipConstants.hpp> -#endif - - +extern "C" +{ + typedef struct z_stream_s z_stream; +} class Inflater : public cppu::WeakImplHelper1 < com::sun::star::packages::XInflater> { private: diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx index 06e24929368a..2db761a41edb 100644 --- a/package/inc/ZipFile.hxx +++ b/package/inc/ZipFile.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ZipFile.hxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: mtg $ $Date: 2001-03-16 17:11:40 $ + * last change: $Author: mtg $ $Date: 2001-04-19 14:11:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,42 +61,20 @@ #ifndef _ZIP_FILE_HXX #define _ZIP_FILE_HXX -#ifndef _CPPUHELPER_IMPLBASE1_HXX_ -#include <cppuhelper/implbase1.hxx> // helper for implementations -#endif - #ifndef _COM_SUN_STAR_PACKAGE_XZIPFILE_HPP_ #include <com/sun/star/packages/XZipFile.hpp> #endif - -#ifndef _ENTRY_INPUT_STREAM_HXX -#include "EntryInputStream.hxx" -#endif - -#ifndef _ZIP_ENUMERATION_HXX -#include "ZipEnumeration.hxx" -#endif - -#ifndef _ZIP_ENTRY_IMPL_HXX -#include "ZipEntryImpl.hxx" +#ifndef _CPPUHELPER_IMPLBASE1_HXX_ +#include <cppuhelper/implbase1.hxx> // helper for implementations #endif - #ifndef _BYTE_GRABBER_HXX_ -#include "ByteGrabber.hxx" +#include <ByteGrabber.hxx> #endif - -#ifndef _MANIFEST_ENTRY_HXX_ -#include "ManifestEntry.hxx" +#ifndef _ENTRY_HASH_HXX +#include <EntryHash.hxx> #endif - -#include <vector> - -#ifndef _VOS_DIAGNOSE_H_ -#include <vos/diagnose.hxx> -#endif - -#ifndef _COM_SUN_STAR_PACKAGE_ZIPCONSTANTS_HPP_ -#include <com/sun/star/packages/ZipConstants.hpp> +#ifndef _INFLATER_HXX +#include <Inflater.hxx> #endif /* @@ -119,7 +97,6 @@ private: public: ZipFile( com::sun::star::uno::Reference < com::sun::star::io::XInputStream > &xInput, sal_Bool bInitialise) throw(::com::sun::star::io::IOException, com::sun::star::packages::ZipException, com::sun::star::uno::RuntimeException); - void updateFromManList(std::vector < ManifestEntry * > &rManList); void setInputStream ( com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xNewStream ); sal_uInt32 SAL_CALL getHeader(const ::com::sun::star::packages::ZipEntry& rEntry) throw(::com::sun::star::io::IOException, ::com::sun::star::packages::ZipException, ::com::sun::star::uno::RuntimeException); @@ -163,84 +140,4 @@ private: throw(::com::sun::star::io::IOException, com::sun::star::packages::ZipException, com::sun::star::uno::RuntimeException); }; -#if 0 -/** - * Function to create a new component instance; is needed by factory helper implementation. - * @param xMgr service manager to if the components needs other component instances - */ -com::sun::star::uno::Reference< com::sun::star::uno::XInterface > ZipFile_create - ( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & xMgr ) -{ - return com::sun::star::uno::Reference< com::sun::star::uno::XInterface >( *new ZipFile( xMgr ) ); -} - -/** - * This function returns the name of the used environment. - * @param ppEnvTypeName name of the environment - * @param ppEnv could be point to a special environment, this parameter is normally set to null - */ -extern "C" void SAL_CALL component_getImplementationEnvironment( - const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ) -{ - *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; -} - -/** - * This function creates an implementation section in the registry and another subkey - * for each supported service. - * @param pServiceManager generic uno interface providing a service manager - * @param pRegistryKey generic uno interface providing registry key to write - */ -extern "C" sal_Bool SAL_CALL component_writeInfo( void* pServiceManager, void* pRegistryKey ) -{ - if (pRegistryKey) - { - try - { - com::sun::star::uno::Reference< com::sun::star::registry::XRegistryKey > xNewKey( - reinterpret_cast< com::sun::star::registry::XRegistryKey * >( pRegistryKey )->createKey( - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/package.ZipFile/UNO/SERVICES") ) ) ); - xNewKey->createKey( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("package.XZipFile") ) ); - return sal_True; - } - catch ( com::sun::star::registry::InvalidRegistryException& ) - { - DBG_ERROR( "InvalidRegistryException detected\n"); - return sal_False; - } - } - return sal_False; -} - -/** - * This function is called to get service factories for an implementation. - * @param pImplName name of implementation - * @param pServiceManager generic uno interface providing a service manager to instantiate components - * @param pRegistryKey registry data key to read and write component persistent data - * @return a component factory (generic uno interface) - */ -extern "C" void * SAL_CALL component_getFactory( - const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ) -{ - void * pRet = 0; - // which implementation is demanded? - if (pServiceManager && rtl_str_compare( pImplName, "package.ZipFile" )) - { - rtl::OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM("package.XZipFile") ); - com::sun::star::uno::Reference< com::sun::star::lang::XSingleServiceFactory > xFactory( - cppu::createSingleFactory( // helper function from cppuhelper lib - reinterpret_cast< com::sun::star::lang::XMultiServiceFactory * >( pServiceManager ), - ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("package.ZipFile") ), - ZipFile_create, - com::sun::star::uno::Sequence< rtl::OUString >( &aServiceName, 1 ) ) ); - if (xFactory.is()) - { - xFactory->acquire(); - pRet = xFactory.get(); - } - } - return pRet; -} - -#endif #endif diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx index 1461f661ad93..f95299d791c7 100644 --- a/package/inc/ZipOutputStream.hxx +++ b/package/inc/ZipOutputStream.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ZipOutputStream.hxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: mtg $ $Date: 2001-03-16 17:11:40 $ + * last change: $Author: mtg $ $Date: 2001-04-19 14:11:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,41 +62,24 @@ #define _ZIP_OUTPUT_STREAM_HXX #ifndef _BYTE_CHUCKER_HXX_ -#include "ByteChucker.hxx" +#include <ByteChucker.hxx> #endif - -#ifndef _ZIP_ENTRY_IMPL_HXX -#include "ZipEntryImpl.hxx" -#endif - -#ifndef _ZIP_FILE_HXX -#include "ZipFile.hxx" -#endif - #ifndef _DEFLATER_HXX -#include "Deflater.hxx" +#include <Deflater.hxx> #endif - #ifndef _CRC32_HXX -#include "CRC32.hxx" +#include <CRC32.hxx> #endif - #ifndef _COM_SUN_STAR_PACKAGE_XZIPOUTPUTSTREAM_HPP_ #include <com/sun/star/packages/XZipOutputStream.hpp> #endif - #ifndef _CPPUHELPER_IMPLBASE1_HXX_ #include <cppuhelper/implbase1.hxx> // helper for implementations #endif - #ifndef __SGI_STL_VECTOR #include <vector> #endif -#ifndef _VOS_DIAGNOSE_H_ -#include <vos/diagnose.hxx> -#endif - class ZipOutputStream : public cppu::WeakImplHelper1< com::sun::star::packages::XZipOutputStream > { @@ -111,7 +94,7 @@ private: CRC32 aCRC; sal_Bool bFinished; ByteChucker aChucker; - ::std::vector < ::com::sun::star::packages::ZipEntry* > aZipList; + ::std::vector < ::com::sun::star::packages::ZipEntry *> aZipList; public: ZipOutputStream( com::sun::star::uno::Reference < com::sun::star::io::XOutputStream > &xOStream, sal_Int32 nNewBufferSize); diff --git a/package/inc/ZipPackage.hxx b/package/inc/ZipPackage.hxx index 8ce3e2a34e23..2bc794d1d0ef 100644 --- a/package/inc/ZipPackage.hxx +++ b/package/inc/ZipPackage.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ZipPackage.hxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: mtg $ $Date: 2001-03-16 17:11:40 $ + * last change: $Author: mtg $ $Date: 2001-04-19 14:11:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,80 +62,46 @@ #define _ZIP_PACKAGE_HXX #ifndef _CPPUHELPER_WEAK_HXX_ -#include <cppuhelper/weak.hxx> // helper for implementations +#include <cppuhelper/weak.hxx> #endif - #ifndef _CPPUHELPER_FACTORY_HXX_ #include <cppuhelper/factory.hxx> #endif - #ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_ #include <com/sun/star/lang/XInitialization.hpp> #endif - #ifndef _COM_SUN_STAR_CONTAINER_XHIERARCHICALNAMEACCESS_HPP_ #include <com/sun/star/container/XHierarchicalNameAccess.hpp> #endif - #ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_ #include <com/sun/star/lang/XSingleServiceFactory.hpp> #endif - #ifndef _COM_SUN_STAR_UTIL_XCHANGESBATCH_HPP_ #include <com/sun/star/util/XChangesBatch.hpp> #endif - +#ifndef _COM_SUN_STAR_CONTAINER_XNAMECONTAINER_HPP_ +#include <com/sun/star/container/XNameContainer.hpp> +#endif #ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_ #include <com/sun/star/lang/XUnoTunnel.hpp> #endif - -#ifndef _UCBHELPER_CONTENT_HXX -#include <ucbhelper/content.hxx> -#endif - -#ifndef _COM_SUN_STAR_UCB_COMMANDABORTEDEXCEPTION_HPP_ -#include <com/sun/star/ucb/CommandAbortedException.hpp> -#endif - -#ifndef _ZIP_FILE_HXX -#include "ZipFile.hxx" -#endif - -#ifndef _ZIP_OUTPUT_STREAM_HXX -#include "ZipOutputStream.hxx" -#endif - -#ifndef _ZIP_PACKAGE_FOLDER_HXX -#include "ZipPackageFolder.hxx" -#endif - -#ifndef _ZIP_PACKAGE_STREAM_HXX -#include "ZipPackageStream.hxx" -#endif - -#ifndef _ZIP_PACKAGE_SINK_HXX -#include "ZipPackageSink.hxx" +#ifndef _COM_SUN_STAR_PACKAGES_XZIPFILE_HPP_ +#include <com/sun/star/packages/XZipFile.hpp> #endif - #ifndef _ZIP_PACKAGE_BUFFER_HXX -#include "ZipPackageBuffer.hxx" -#endif - -#ifndef _MANIFEST_ENTRY_HXX -#include "ManifestEntry.hxx" +#include <ZipPackageBuffer.hxx> #endif - -#ifndef _MANIFEST_WRITER_HXX -#include "ManifestWriter.hxx" +#ifndef _UCBHELPER_CONTENT_HXX +#include <ucbhelper/content.hxx> #endif - -#ifndef _MANIFEST_READER_HXX -#include "ManifestReader.hxx" +#ifndef _HASHMAPS_HXX +#include <HashMaps.hxx> #endif #include <vector> class ZipPackageFolder; +class ZipFile; class ZipPackage : public ::cppu::OWeakObject, @@ -149,27 +115,16 @@ private: ZipPackageFolder *pRootFolder; ZipFile *pZipFile; ::ucb::Content *pContent; - sal_Bool bContained; ::com::sun::star::uno::Reference < com::sun::star::packages::XZipFile > xZipFile; ::com::sun::star::uno::Reference < com::sun::star::container::XNameContainer > xRootFolder; ::com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xContentStream; ::com::sun::star::uno::Reference < com::sun::star::io::XSeekable > xContentSeek; const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xFactory; - sal_Bool isZipFile(com::sun::star::packages::ZipEntry &rEntry); void getZipFileContents(); - void destroyFolderTree( ::com::sun::star::uno::Reference < ::com::sun::star::lang::XUnoTunnel > xFolder ); NameHash aRecent; public: - ZipPackage (com::sun::star::uno::Reference < com::sun::star::io::XInputStream > &xInput, - const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > &xNewFactory); ZipPackage (const ::com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > &xNewFactory); - ZipPackageFolder * getRootFolder() - { - return pRootFolder; - } - ZipPackageBuffer & SAL_CALL ZipPackage::writeToBuffer() - throw(::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); virtual ~ZipPackage( void ); // XInterface virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& rType ) @@ -200,12 +155,16 @@ public: throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::util::ElementChange > SAL_CALL getPendingChanges( ) throw(::com::sun::star::uno::RuntimeException); - // Uno componentiseralation - com::sun::star::uno::Reference< com::sun::star::uno::XInterface > ZipFile_create( - const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > & xMgr ); + // XUnoTunnel virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& aIdentifier ) throw(::com::sun::star::uno::RuntimeException); com::sun::star::uno::Sequence < sal_Int8 > getUnoTunnelImplementationId( void ) throw(::com::sun::star::uno::RuntimeException); + // Uno componentiseralation + static ::rtl::OUString getImplementationName(); + static ::com::sun::star::uno::Sequence < ::rtl::OUString > getSupportedServiceNames(); + static ::com::sun::star::uno::Reference < com::sun::star::lang::XSingleServiceFactory > createServiceFactory( com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > const & rServiceFactory ); + virtual sal_Bool SAL_CALL supportsService(rtl::OUString const & rServiceName) + throw (com::sun::star::uno::RuntimeException); }; #endif diff --git a/package/inc/ZipPackageBuffer.hxx b/package/inc/ZipPackageBuffer.hxx index 44336ecf8060..40ee3a117282 100644 --- a/package/inc/ZipPackageBuffer.hxx +++ b/package/inc/ZipPackageBuffer.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ZipPackageBuffer.hxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: mtg $ $Date: 2000-12-19 21:55:35 $ + * last change: $Author: mtg $ $Date: 2001-04-19 14:11:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,23 +64,18 @@ #ifndef _COM_SUN_STAR_IO_XOUTPUTSTREAM_HPP_ #include <com/sun/star/io/XOutputStream.hpp> #endif - #ifndef _COM_SUN_STAR_LANG_ILLEGALARGUMENTEXCEPTION_HPP_ #include <com/sun/star/lang/IllegalArgumentException.hpp> #endif - #ifndef _COM_SUN_STAR_IO_XSEEKABLE_HPP_ #include <com/sun/star/io/XSeekable.hpp> #endif - #ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_ #include <com/sun/star/io/XInputStream.hpp> #endif - #ifndef _CPPUHELPER_WEAK_HXX_ #include <cppuhelper/weak.hxx> #endif - #include <memory.h> // for memcpy class ZipPackageBuffer : |