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 _ZIP_PACKAGE_ENTRY_HXX
20 #define _ZIP_PACKAGE_ENTRY_HXX
22 #include <com/sun/star/container/XChild.hpp>
23 #include <com/sun/star/container/XNamed.hpp>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/lang/XUnoTunnel.hpp>
26 #include <com/sun/star/container/XNameContainer.hpp>
27 #include <com/sun/star/lang/XServiceInfo.hpp>
28 #include <ZipEntry.hxx>
29 #include <cppuhelper/implbase5.hxx>
31 class ZipPackageFolder
;
33 class ZipPackageEntry
: public cppu::WeakImplHelper5
35 com::sun::star::container::XNamed
,
36 com::sun::star::container::XChild
,
37 com::sun::star::lang::XUnoTunnel
,
38 com::sun::star::beans::XPropertySet
,
39 com::sun::star::lang::XServiceInfo
45 bool mbAllowRemoveOnInsert
:1;
46 // com::sun::star::uno::Reference < com::sun::star::container::XNameContainer > xParent;
48 ZipPackageFolder
* pParent
;
51 ZipPackageEntry ( bool bNewFolder
= sal_False
);
52 virtual ~ZipPackageEntry( void );
54 OUString
& GetMediaType () { return sMediaType
; }
55 void SetMediaType ( const OUString
& sNewType
) { sMediaType
= sNewType
; }
56 void doSetParent ( ZipPackageFolder
* pNewParent
, sal_Bool bInsert
);
57 bool IsFolder ( ) { return mbIsFolder
; }
58 ZipPackageFolder
* GetParent ( ) { return pParent
; }
59 void SetFolder ( bool bSetFolder
) { mbIsFolder
= bSetFolder
; }
61 void clearParent ( void )
67 virtual OUString SAL_CALL
getName( )
68 throw(::com::sun::star::uno::RuntimeException
);
69 virtual void SAL_CALL
setName( const OUString
& aName
)
70 throw(::com::sun::star::uno::RuntimeException
);
72 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
> SAL_CALL
getParent( )
73 throw(::com::sun::star::uno::RuntimeException
);
74 virtual void SAL_CALL
setParent( const ::com::sun::star::uno::Reference
< ::com::sun::star::uno::XInterface
>& Parent
)
75 throw(::com::sun::star::lang::NoSupportException
, ::com::sun::star::uno::RuntimeException
);
77 virtual sal_Int64 SAL_CALL
getSomething( const ::com::sun::star::uno::Sequence
< sal_Int8
>& aIdentifier
)
78 throw(::com::sun::star::uno::RuntimeException
) = 0;
80 virtual ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertySetInfo
> SAL_CALL
getPropertySetInfo( )
81 throw(::com::sun::star::uno::RuntimeException
);
82 virtual void SAL_CALL
setPropertyValue( const OUString
& aPropertyName
, const ::com::sun::star::uno::Any
& aValue
)
83 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::beans::PropertyVetoException
, ::com::sun::star::lang::IllegalArgumentException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
) = 0;
84 virtual ::com::sun::star::uno::Any SAL_CALL
getPropertyValue( const OUString
& PropertyName
)
85 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
) = 0;
86 virtual void SAL_CALL
addPropertyChangeListener( const OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& xListener
)
87 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
88 virtual void SAL_CALL
removePropertyChangeListener( const OUString
& aPropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XPropertyChangeListener
>& aListener
)
89 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
90 virtual void SAL_CALL
addVetoableChangeListener( const OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
91 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
92 virtual void SAL_CALL
removeVetoableChangeListener( const OUString
& PropertyName
, const ::com::sun::star::uno::Reference
< ::com::sun::star::beans::XVetoableChangeListener
>& aListener
)
93 throw(::com::sun::star::beans::UnknownPropertyException
, ::com::sun::star::lang::WrappedTargetException
, ::com::sun::star::uno::RuntimeException
);
97 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */