1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: inputstream.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef _INPUSTREAM_HXX_
32 #define _INPUSTREAM_HXX_
34 #include <rtl/ustring.hxx>
35 #include <osl/file.hxx>
36 #include <cppuhelper/weak.hxx>
37 #include <com/sun/star/uno/XInterface.hpp>
38 #include <com/sun/star/io/XSeekable.hpp>
39 #include <com/sun/star/io/XInputStream.hpp>
40 #include <com/sun/star/ucb/XContentProvider.hpp>
45 // forward declaration
47 class XInputStream_impl
48 : public cppu::OWeakObject
,
49 public com::sun::star::io::XInputStream
,
50 public com::sun::star::io::XSeekable
54 XInputStream_impl( const rtl::OUString
& aUncPath
);
56 virtual ~XInputStream_impl();
59 * Returns an error code as given by filerror.hxx
62 bool SAL_CALL
CtorSuccess();
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
);
145 } // end namespace XInputStream_impl