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 .
19 #ifndef _FILINPSTR_HXX_
20 #define _FILINPSTR_HXX_
22 #include <rtl/ustring.hxx>
23 #include <cppuhelper/weak.hxx>
24 #include <ucbhelper/macros.hxx>
25 #include <com/sun/star/uno/XInterface.hpp>
26 #include <com/sun/star/lang/XTypeProvider.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>
33 namespace fileaccess
{
35 // forward declaration
40 class XInputStream_impl
41 : public cppu::OWeakObject
,
42 public com::sun::star::lang::XTypeProvider
,
43 public com::sun::star::io::XInputStream
,
44 public com::sun::star::io::XSeekable
48 XInputStream_impl( shell
* pMyShell
,const OUString
& aUncPath
, sal_Bool bLock
);
50 virtual ~XInputStream_impl();
53 * Returns an error code as given by filerror.hxx
56 sal_Int32 SAL_CALL
CtorSuccess();
57 sal_Int32 SAL_CALL
getMinorError();
64 virtual com::sun::star::uno::Any SAL_CALL
66 const com::sun::star::uno::Type
& rType
)
67 throw( com::sun::star::uno::RuntimeException
);
79 virtual sal_Int32 SAL_CALL
81 com::sun::star::uno::Sequence
< sal_Int8
>& aData
,
82 sal_Int32 nBytesToRead
)
83 throw( com::sun::star::io::NotConnectedException
,
84 com::sun::star::io::BufferSizeExceededException
,
85 com::sun::star::io::IOException
,
86 com::sun::star::uno::RuntimeException
);
88 virtual sal_Int32 SAL_CALL
90 com::sun::star::uno::Sequence
< sal_Int8
>& aData
,
91 sal_Int32 nMaxBytesToRead
)
92 throw( com::sun::star::io::NotConnectedException
,
93 com::sun::star::io::BufferSizeExceededException
,
94 com::sun::star::io::IOException
,
95 com::sun::star::uno::RuntimeException
);
99 sal_Int32 nBytesToSkip
)
100 throw( com::sun::star::io::NotConnectedException
,
101 com::sun::star::io::BufferSizeExceededException
,
102 com::sun::star::io::IOException
,
103 com::sun::star::uno::RuntimeException
);
105 virtual sal_Int32 SAL_CALL
108 throw( com::sun::star::io::NotConnectedException
,
109 com::sun::star::io::IOException
,
110 com::sun::star::uno::RuntimeException
);
112 virtual void SAL_CALL
115 throw( com::sun::star::io::NotConnectedException
,
116 com::sun::star::io::IOException
,
117 com::sun::star::uno::RuntimeException
);
119 virtual void SAL_CALL
122 throw( com::sun::star::lang::IllegalArgumentException
,
123 com::sun::star::io::IOException
,
124 com::sun::star::uno::RuntimeException
);
126 virtual sal_Int64 SAL_CALL
129 throw( com::sun::star::io::IOException
,
130 com::sun::star::uno::RuntimeException
);
132 virtual sal_Int64 SAL_CALL
135 throw( com::sun::star::io::IOException
,
136 com::sun::star::uno::RuntimeException
);
140 com::sun::star::uno::Reference
<
141 com::sun::star::ucb::XContentProvider
> m_xProvider
;
144 ReconnectingFile m_aFile
;
146 sal_Int32 m_nErrorCode
;
147 sal_Int32 m_nMinorErrorCode
;
151 } // end namespace XInputStream_impl
155 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */