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 .
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>
31 class XInputStream_impl
32 : public cppu::OWeakObject
,
33 public css::io::XInputStream
,
34 public css::io::XSeekable
38 explicit XInputStream_impl( const OUString
& aUncPath
);
40 virtual ~XInputStream_impl() override
;
43 * Returns an error code as given by filerror.hxx
46 bool CtorSuccess() { return m_bIsOpen
;}
48 virtual css::uno::Any SAL_CALL
50 const css::uno::Type
& rType
) override
;
60 virtual sal_Int32 SAL_CALL
62 css::uno::Sequence
< sal_Int8
>& aData
,
63 sal_Int32 nBytesToRead
) override
;
65 virtual sal_Int32 SAL_CALL
67 css::uno::Sequence
< sal_Int8
>& aData
,
68 sal_Int32 nMaxBytesToRead
) override
;
71 skipBytes( sal_Int32 nBytesToSkip
) override
;
73 virtual sal_Int32 SAL_CALL
77 closeInput() override
;
80 seek( sal_Int64 location
) override
;
82 virtual sal_Int64 SAL_CALL
83 getPosition() override
;
85 virtual sal_Int64 SAL_CALL
94 } // end namespace XInputStream_impl
96 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */