fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / package / inc / ZipOutputStream.hxx
blobd6d7853f96ccdfabd842c139cd43d8bd1cec3035
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 INCLUDED_PACKAGE_INC_ZIPOUTPUTSTREAM_HXX
20 #define INCLUDED_PACKAGE_INC_ZIPOUTPUTSTREAM_HXX
22 #include <com/sun/star/uno/Reference.hxx>
23 #include <com/sun/star/io/XOutputStream.hpp>
25 #include <ByteChucker.hxx>
26 #include <comphelper/threadpool.hxx>
28 #include <vector>
30 struct ZipEntry;
31 class ZipOutputEntry;
32 class ZipPackageStream;
34 class ZipOutputStream
36 ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > m_xStream;
37 ::std::vector < ZipEntry * > m_aZipList;
39 ByteChucker m_aChucker;
40 ZipEntry *m_pCurrentEntry;
41 comphelper::ThreadPool &m_rSharedThreadPool;
42 std::vector< ZipOutputEntry* > m_aEntries;
44 public:
45 ZipOutputStream(
46 const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream > &xOStream );
47 ~ZipOutputStream();
49 void addDeflatingThread( ZipOutputEntry *pEntry, comphelper::ThreadTask *pThreadTask );
51 void writeLOC( ZipEntry *pEntry, bool bEncrypt = false )
52 throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
53 void rawWrite( const css::uno::Sequence< sal_Int8 >& rBuffer )
54 throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
55 void rawCloseEntry( bool bEncrypt = false )
56 throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
58 void finish()
59 throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
60 css::uno::Reference< css::io::XOutputStream > getStream();
62 static sal_uInt32 getCurrentDosTime();
63 static void setEntry( ZipEntry *pEntry );
65 private:
66 void writeEND(sal_uInt32 nOffset, sal_uInt32 nLength)
67 throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
68 void writeCEN( const ZipEntry &rEntry )
69 throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
70 void writeEXT( const ZipEntry &rEntry )
71 throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
74 #endif
76 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */