tdf#130857 qt weld: Support "Java Start Parameters" dialog
[LibreOffice.git] / xmlhelp / source / cxxhelp / provider / inputstream.hxx
blob5f9146293b46f4ac367a909a34983dde9f774f47
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 #pragma once
22 #include <rtl/ustring.hxx>
23 #include <osl/file.hxx>
24 #include <cppuhelper/weak.hxx>
25 #include <com/sun/star/io/XSeekable.hpp>
26 #include <com/sun/star/io/XInputStream.hpp>
29 namespace chelp {
31 class XInputStream_impl
32 : public cppu::OWeakObject,
33 public css::io::XInputStream,
34 public css::io::XSeekable
37 public:
38 explicit XInputStream_impl( const OUString& aUncPath );
40 virtual ~XInputStream_impl() override;
42 /**
43 * Returns an error code as given by filerror.hxx
46 bool CtorSuccess() { return m_bIsOpen;}
48 virtual css::uno::Any SAL_CALL
49 queryInterface(
50 const css::uno::Type& rType ) override;
52 virtual void SAL_CALL
53 acquire()
54 noexcept override;
56 virtual void SAL_CALL
57 release()
58 noexcept override;
60 virtual sal_Int32 SAL_CALL
61 readBytes(
62 css::uno::Sequence< sal_Int8 >& aData,
63 sal_Int32 nBytesToRead ) override;
65 virtual sal_Int32 SAL_CALL
66 readSomeBytes(
67 css::uno::Sequence< sal_Int8 >& aData,
68 sal_Int32 nMaxBytesToRead ) override;
70 virtual void SAL_CALL
71 skipBytes( sal_Int32 nBytesToSkip ) override;
73 virtual sal_Int32 SAL_CALL
74 available() override;
76 virtual void SAL_CALL
77 closeInput() override;
79 virtual void SAL_CALL
80 seek( sal_Int64 location ) override;
82 virtual sal_Int64 SAL_CALL
83 getPosition() override;
85 virtual sal_Int64 SAL_CALL
86 getLength() override;
88 private:
89 bool m_bIsOpen;
90 osl::File m_aFile;
94 } // end namespace XInputStream_impl
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */