1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _FILINPSTR_HXX_
29 #define _FILINPSTR_HXX_
31 #include <rtl/ustring.hxx>
32 #include <cppuhelper/weak.hxx>
33 #include <ucbhelper/macros.hxx>
34 #include <com/sun/star/uno/XInterface.hpp>
35 #include <com/sun/star/lang/XTypeProvider.hpp>
36 #include <com/sun/star/io/XSeekable.hpp>
37 #include <com/sun/star/io/XInputStream.hpp>
38 #include <com/sun/star/ucb/XContentProvider.hpp>
42 namespace fileaccess
{
44 // forward declaration
49 class XInputStream_impl
50 : public cppu::OWeakObject
,
51 public com::sun::star::lang::XTypeProvider
,
52 public com::sun::star::io::XInputStream
,
53 public com::sun::star::io::XSeekable
57 XInputStream_impl( shell
* pMyShell
,const rtl::OUString
& aUncPath
, sal_Bool bLock
);
59 virtual ~XInputStream_impl();
62 * Returns an error code as given by filerror.hxx
65 sal_Int32 SAL_CALL
CtorSuccess();
66 sal_Int32 SAL_CALL
getMinorError();
73 virtual com::sun::star::uno::Any SAL_CALL
75 const com::sun::star::uno::Type
& rType
)
76 throw( com::sun::star::uno::RuntimeException
);
88 virtual sal_Int32 SAL_CALL
90 com::sun::star::uno::Sequence
< sal_Int8
>& aData
,
91 sal_Int32 nBytesToRead
)
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
);
97 virtual sal_Int32 SAL_CALL
99 com::sun::star::uno::Sequence
< sal_Int8
>& aData
,
100 sal_Int32 nMaxBytesToRead
)
101 throw( com::sun::star::io::NotConnectedException
,
102 com::sun::star::io::BufferSizeExceededException
,
103 com::sun::star::io::IOException
,
104 com::sun::star::uno::RuntimeException
);
106 virtual void SAL_CALL
108 sal_Int32 nBytesToSkip
)
109 throw( com::sun::star::io::NotConnectedException
,
110 com::sun::star::io::BufferSizeExceededException
,
111 com::sun::star::io::IOException
,
112 com::sun::star::uno::RuntimeException
);
114 virtual sal_Int32 SAL_CALL
117 throw( com::sun::star::io::NotConnectedException
,
118 com::sun::star::io::IOException
,
119 com::sun::star::uno::RuntimeException
);
121 virtual void SAL_CALL
124 throw( com::sun::star::io::NotConnectedException
,
125 com::sun::star::io::IOException
,
126 com::sun::star::uno::RuntimeException
);
128 virtual void SAL_CALL
131 throw( com::sun::star::lang::IllegalArgumentException
,
132 com::sun::star::io::IOException
,
133 com::sun::star::uno::RuntimeException
);
135 virtual sal_Int64 SAL_CALL
138 throw( com::sun::star::io::IOException
,
139 com::sun::star::uno::RuntimeException
);
141 virtual sal_Int64 SAL_CALL
144 throw( com::sun::star::io::IOException
,
145 com::sun::star::uno::RuntimeException
);
150 com::sun::star::uno::Reference
<
151 com::sun::star::ucb::XContentProvider
> m_xProvider
;
156 ReconnectingFile m_aFile
;
158 sal_Int32 m_nErrorCode
;
159 sal_Int32 m_nMinorErrorCode
;
163 } // end namespace XInputStream_impl
167 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */