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 .
20 #ifndef INCLUDED_XMLHELP_SOURCE_CXXHELP_PROVIDER_INPUTSTREAM_HXX
21 #define INCLUDED_XMLHELP_SOURCE_CXXHELP_PROVIDER_INPUTSTREAM_HXX
23 #include <rtl/ustring.hxx>
24 #include <osl/file.hxx>
25 #include <cppuhelper/weak.hxx>
26 #include <com/sun/star/uno/XInterface.hpp>
27 #include <com/sun/star/io/XSeekable.hpp>
28 #include <com/sun/star/io/XInputStream.hpp>
29 #include <com/sun/star/ucb/XContentProvider.hpp>
34 class XInputStream_impl
35 : public cppu::OWeakObject
,
36 public com::sun::star::io::XInputStream
,
37 public com::sun::star::io::XSeekable
41 XInputStream_impl( const OUString
& aUncPath
);
43 virtual ~XInputStream_impl();
46 * Returns an error code as given by filerror.hxx
49 bool SAL_CALL
CtorSuccess() { return m_bIsOpen
;}
51 virtual com::sun::star::uno::Any SAL_CALL
53 const com::sun::star::uno::Type
& rType
)
54 throw( com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
66 virtual sal_Int32 SAL_CALL
68 com::sun::star::uno::Sequence
< sal_Int8
>& aData
,
69 sal_Int32 nBytesToRead
)
70 throw( com::sun::star::io::NotConnectedException
,
71 com::sun::star::io::BufferSizeExceededException
,
72 com::sun::star::io::IOException
,
73 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
75 virtual sal_Int32 SAL_CALL
77 com::sun::star::uno::Sequence
< sal_Int8
>& aData
,
78 sal_Int32 nMaxBytesToRead
)
79 throw( com::sun::star::io::NotConnectedException
,
80 com::sun::star::io::BufferSizeExceededException
,
81 com::sun::star::io::IOException
,
82 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
86 sal_Int32 nBytesToSkip
)
87 throw( com::sun::star::io::NotConnectedException
,
88 com::sun::star::io::BufferSizeExceededException
,
89 com::sun::star::io::IOException
,
90 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
92 virtual sal_Int32 SAL_CALL
95 throw( com::sun::star::io::NotConnectedException
,
96 com::sun::star::io::IOException
,
97 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
102 throw( com::sun::star::io::NotConnectedException
,
103 com::sun::star::io::IOException
,
104 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
106 virtual void SAL_CALL
109 throw( com::sun::star::lang::IllegalArgumentException
,
110 com::sun::star::io::IOException
,
111 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
113 virtual sal_Int64 SAL_CALL
116 throw( com::sun::star::io::IOException
,
117 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
119 virtual sal_Int64 SAL_CALL
122 throw( com::sun::star::io::IOException
,
123 com::sun::star::uno::RuntimeException
, std::exception
) SAL_OVERRIDE
;
131 } // end namespace XInputStream_impl
135 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */