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/.
12 #include <librevenge-stream/librevenge-stream.h>
13 #include <com/sun/star/uno/Reference.h>
14 #include "writerperfectdllapi.h"
15 #include <tools/long.hxx>
18 namespace com::sun::star::ucb
23 namespace writerperfect
25 class WRITERPERFECT_DLLPUBLIC DirectoryStream final
: public librevenge::RVNGInputStream
30 explicit DirectoryStream(const css::uno::Reference
<css::ucb::XContent
>& xContent
);
31 virtual ~DirectoryStream() override
;
33 static bool isDirectory(const css::uno::Reference
<css::ucb::XContent
>& xContent
);
34 static std::unique_ptr
<DirectoryStream
>
35 createForParent(const css::uno::Reference
<css::ucb::XContent
>& xContent
);
37 css::uno::Reference
<css::ucb::XContent
> getContent() const;
39 virtual bool isStructured() override
;
40 SAL_DLLPRIVATE
virtual unsigned subStreamCount() override
;
41 SAL_DLLPRIVATE
virtual const char* subStreamName(unsigned id
) override
;
42 SAL_DLLPRIVATE
virtual bool existsSubStream(const char* name
) override
;
43 SAL_DLLPRIVATE
virtual librevenge::RVNGInputStream
*
44 getSubStreamByName(const char* name
) override
;
45 SAL_DLLPRIVATE
virtual librevenge::RVNGInputStream
* getSubStreamById(unsigned id
) override
;
47 virtual const unsigned char* read(unsigned long numBytes
, unsigned long& numBytesRead
) override
;
48 virtual int seek(long offset
, librevenge::RVNG_SEEK_TYPE seekType
) override
;
49 virtual long tell() override
;
50 virtual bool isEnd() override
;
53 std::unique_ptr
<Impl
> m_pImpl
;
57 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */