fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / xmlhelp / source / cxxhelp / provider / inputstream.hxx
blob192f3804266320dca93881152595c625fc0bbd7b
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 #ifndef _INPUSTREAM_HXX_
21 #define _INPUSTREAM_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>
32 namespace chelp {
34 // forward declaration
36 class XInputStream_impl
37 : public cppu::OWeakObject,
38 public com::sun::star::io::XInputStream,
39 public com::sun::star::io::XSeekable
41 public:
43 XInputStream_impl( const OUString& aUncPath );
45 virtual ~XInputStream_impl();
47 /**
48 * Returns an error code as given by filerror.hxx
51 bool SAL_CALL CtorSuccess();
53 virtual com::sun::star::uno::Any SAL_CALL
54 queryInterface(
55 const com::sun::star::uno::Type& rType )
56 throw( com::sun::star::uno::RuntimeException);
58 virtual void SAL_CALL
59 acquire(
60 void )
61 throw();
63 virtual void SAL_CALL
64 release(
65 void )
66 throw();
68 virtual sal_Int32 SAL_CALL
69 readBytes(
70 com::sun::star::uno::Sequence< sal_Int8 >& aData,
71 sal_Int32 nBytesToRead )
72 throw( com::sun::star::io::NotConnectedException,
73 com::sun::star::io::BufferSizeExceededException,
74 com::sun::star::io::IOException,
75 com::sun::star::uno::RuntimeException);
77 virtual sal_Int32 SAL_CALL
78 readSomeBytes(
79 com::sun::star::uno::Sequence< sal_Int8 >& aData,
80 sal_Int32 nMaxBytesToRead )
81 throw( com::sun::star::io::NotConnectedException,
82 com::sun::star::io::BufferSizeExceededException,
83 com::sun::star::io::IOException,
84 com::sun::star::uno::RuntimeException);
86 virtual void SAL_CALL
87 skipBytes(
88 sal_Int32 nBytesToSkip )
89 throw( com::sun::star::io::NotConnectedException,
90 com::sun::star::io::BufferSizeExceededException,
91 com::sun::star::io::IOException,
92 com::sun::star::uno::RuntimeException );
94 virtual sal_Int32 SAL_CALL
95 available(
96 void )
97 throw( com::sun::star::io::NotConnectedException,
98 com::sun::star::io::IOException,
99 com::sun::star::uno::RuntimeException );
101 virtual void SAL_CALL
102 closeInput(
103 void )
104 throw( com::sun::star::io::NotConnectedException,
105 com::sun::star::io::IOException,
106 com::sun::star::uno::RuntimeException );
108 virtual void SAL_CALL
109 seek(
110 sal_Int64 location )
111 throw( com::sun::star::lang::IllegalArgumentException,
112 com::sun::star::io::IOException,
113 com::sun::star::uno::RuntimeException );
115 virtual sal_Int64 SAL_CALL
116 getPosition(
117 void )
118 throw( com::sun::star::io::IOException,
119 com::sun::star::uno::RuntimeException );
121 virtual sal_Int64 SAL_CALL
122 getLength(
123 void )
124 throw( com::sun::star::io::IOException,
125 com::sun::star::uno::RuntimeException );
127 private:
129 bool m_bIsOpen;
130 osl::File m_aFile;
134 } // end namespace XInputStream_impl
136 #endif
138 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */