Bump version to 6.0-36
[LibreOffice.git] / writerperfect / inc / DirectoryStream.hxx
blob0421f9ced8cd4cab0a65c2710ea656c19bc06c05
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/.
8 */
10 #ifndef INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX
11 #define INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX
13 #include <librevenge-stream/librevenge-stream.h>
14 #include <com/sun/star/uno/Reference.h>
15 #include "writerperfectdllapi.h"
16 #include <memory>
17 #include <climits>
19 namespace com
21 namespace sun
23 namespace star
25 namespace ucb
27 class XContent;
33 namespace writerperfect
36 class WRITERPERFECT_DLLPUBLIC DirectoryStream : public librevenge::RVNGInputStream
38 struct Impl;
40 public:
41 explicit DirectoryStream(const css::uno::Reference<css::ucb::XContent> &xContent);
42 virtual ~DirectoryStream() override;
44 static bool isDirectory(const css::uno::Reference<css::ucb::XContent> &xContent);
45 static std::unique_ptr<DirectoryStream> createForParent(const css::uno::Reference<css::ucb::XContent> &xContent);
47 const css::uno::Reference<css::ucb::XContent> getContent() const;
49 virtual bool isStructured() override;
50 virtual unsigned subStreamCount() override;
51 virtual const char *subStreamName(unsigned id) override;
52 virtual bool existsSubStream(const char *name) override;
53 virtual librevenge::RVNGInputStream *getSubStreamByName(const char *name) override;
54 virtual librevenge::RVNGInputStream *getSubStreamById(unsigned id) override;
56 virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead) override;
57 virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) override;
58 virtual long tell() override;
59 virtual bool isEnd() override;
61 private:
62 std::unique_ptr<Impl> m_pImpl;
67 #endif // INCLUDED_WRITERPERFECT_DIRECTORYSTREAM_HXX
69 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */