bump product version to 7.6.3.2-android
[LibreOffice.git] / package / source / xstor / ocompinstream.hxx
blobeffbc4be2fb8f236cf11032bede8ac11c10ee088
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 .
20 #ifndef INCLUDED_PACKAGE_SOURCE_XSTOR_OCOMPINSTREAM_HXX
21 #define INCLUDED_PACKAGE_SOURCE_XSTOR_OCOMPINSTREAM_HXX
23 #include <com/sun/star/io/XInputStream.hpp>
24 #include <com/sun/star/beans/XPropertySet.hpp>
25 #include <com/sun/star/beans/PropertyValue.hpp>
26 #include <com/sun/star/embed/XExtendedStorageStream.hpp>
27 #include <com/sun/star/embed/XRelationshipAccess.hpp>
28 #include <cppuhelper/implbase.hxx>
29 #include <comphelper/interfacecontainer3.hxx>
30 #include <comphelper/refcountedmutex.hxx>
31 #include <rtl/ref.hxx>
32 #include <memory>
35 struct OWriteStream_Impl;
37 class OInputCompStream : public cppu::WeakImplHelper < css::io::XInputStream
38 ,css::embed::XExtendedStorageStream
39 ,css::embed::XRelationshipAccess
40 ,css::beans::XPropertySet >
42 protected:
43 OWriteStream_Impl* m_pImpl;
44 rtl::Reference<comphelper::RefCountedMutex> m_xMutex;
45 css::uno::Reference < css::io::XInputStream > m_xStream;
46 std::unique_ptr<::comphelper::OInterfaceContainerHelper3<css::lang::XEventListener>> m_pInterfaceContainer;
47 css::uno::Sequence < css::beans::PropertyValue > m_aProperties;
48 bool m_bDisposed;
49 sal_Int32 m_nStorageType;
51 public:
52 OInputCompStream( OWriteStream_Impl& pImpl,
53 css::uno::Reference< css::io::XInputStream > xStream,
54 const css::uno::Sequence< css::beans::PropertyValue >& aProps,
55 sal_Int32 nStorageType );
57 OInputCompStream( css::uno::Reference< css::io::XInputStream > xStream,
58 const css::uno::Sequence< css::beans::PropertyValue >& aProps,
59 sal_Int32 nStorageType );
61 virtual ~OInputCompStream() override;
63 void InternalDispose();
65 // XInterface
66 virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) override;
68 // XInputStream
69 virtual sal_Int32 SAL_CALL readBytes( css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nBytesToRead ) override;
70 virtual sal_Int32 SAL_CALL readSomeBytes( css::uno::Sequence< sal_Int8 >& aData, sal_Int32 nMaxBytesToRead ) override;
71 virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip ) override;
72 virtual sal_Int32 SAL_CALL available( ) override;
73 virtual void SAL_CALL closeInput( ) override;
75 //XStream
76 virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getInputStream( ) override;
77 virtual css::uno::Reference< css::io::XOutputStream > SAL_CALL getOutputStream( ) override;
79 //XComponent
80 virtual void SAL_CALL dispose( ) override;
81 virtual void SAL_CALL addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener ) override;
82 virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::lang::XEventListener >& aListener ) override;
84 //XRelationshipAccess
85 virtual sal_Bool SAL_CALL hasByID( const OUString& sID ) override;
86 virtual OUString SAL_CALL getTargetByID( const OUString& sID ) override;
87 virtual OUString SAL_CALL getTypeByID( const OUString& sID ) override;
88 virtual css::uno::Sequence< css::beans::StringPair > SAL_CALL getRelationshipByID( const OUString& sID ) override;
89 virtual css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > SAL_CALL getRelationshipsByType( const OUString& sType ) override;
90 virtual css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > > SAL_CALL getAllRelationships( ) override;
91 virtual void SAL_CALL insertRelationshipByID( const OUString& sID, const css::uno::Sequence< css::beans::StringPair >& aEntry, sal_Bool bReplace ) override;
92 virtual void SAL_CALL removeRelationshipByID( const OUString& sID ) override;
93 virtual void SAL_CALL insertRelationships( const css::uno::Sequence< css::uno::Sequence< css::beans::StringPair > >& aEntries, sal_Bool bReplace ) override;
94 virtual void SAL_CALL clearRelationships( ) override;
96 //XPropertySet
97 virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo() override;
98 virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) override;
99 virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) override;
100 virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) override;
101 virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) override;
102 virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
103 virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) override;
107 #endif
109 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */