1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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_ZIPPACKAGEENTRY_HXX
20 #define INCLUDED_PACKAGE_INC_ZIPPACKAGEENTRY_HXX
22 #include <com/sun/star/container/XChild.hpp>
23 #include <com/sun/star/container/XNamed.hpp>
24 #include <com/sun/star/beans/PropertyValue.hpp>
25 #include <com/sun/star/beans/XPropertySet.hpp>
26 #include <com/sun/star/lang/XUnoTunnel.hpp>
27 #include <com/sun/star/container/XNameContainer.hpp>
28 #include <com/sun/star/lang/XServiceInfo.hpp>
29 #include <com/sun/star/uno/XComponentContext.hpp>
30 #include <ZipEntry.hxx>
31 #include <cppuhelper/implbase.hxx>
35 typedef void* rtlRandomPool
;
36 class ZipOutputStream
;
37 class ZipPackageFolder
;
39 class ZipPackageEntry
: public cppu::WeakImplHelper
41 css::container::XNamed
,
42 css::container::XChild
,
43 css::lang::XUnoTunnel
,
44 css::beans::XPropertySet
,
45 css::lang::XServiceInfo
49 css::uno::Reference
< css::uno::XComponentContext
> m_xContext
;
52 bool mbAllowRemoveOnInsert
:1;
54 ZipPackageFolder
* mpParent
;
60 virtual ~ZipPackageEntry() override
;
62 const OUString
& GetMediaType () const { return msMediaType
; }
63 void SetMediaType ( const OUString
& sNewType
) { msMediaType
= sNewType
; }
64 void doSetParent ( ZipPackageFolder
* pNewParent
);
65 bool IsFolder ( ) { return mbIsFolder
; }
66 void SetFolder ( bool bSetFolder
) { mbIsFolder
= bSetFolder
; }
68 virtual bool saveChild( const OUString
&rPath
,
69 std::vector
< css::uno::Sequence
< css::beans::PropertyValue
> > &rManList
,
70 ZipOutputStream
& rZipOut
,
71 const css::uno::Sequence
< sal_Int8
>& rEncryptionKey
,
72 const rtlRandomPool
&rRandomPool
) = 0;
80 virtual OUString SAL_CALL
getName( ) override
;
81 virtual void SAL_CALL
setName( const OUString
& aName
) override
;
83 virtual css::uno::Reference
< css::uno::XInterface
> SAL_CALL
getParent( ) override
;
84 virtual void SAL_CALL
setParent( const css::uno::Reference
< css::uno::XInterface
>& Parent
) override
;
86 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
< sal_Int8
>& aIdentifier
) override
= 0;
88 virtual css::uno::Reference
< css::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( ) override
;
89 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const css::uno::Any
& aValue
) override
= 0;
90 virtual css::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
) override
= 0;
91 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& xListener
) override
;
92 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const css::uno::Reference
< css::beans::XPropertyChangeListener
>& aListener
) override
;
93 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
94 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const css::uno::Reference
< css::beans::XVetoableChangeListener
>& aListener
) override
;
98 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */