fix baseline build (old cairo) - 'cairo_rectangle_int_t' does not name a type
[LibreOffice.git] / ucb / source / ucp / webdav-neon / NeonInputStream.hxx
blobfa69244c8e938b18b37715d64846a40ee35cbd10
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 INCLUDED_UCB_SOURCE_UCP_WEBDAV_NEON_NEONINPUTSTREAM_HXX
29 #define INCLUDED_UCB_SOURCE_UCP_WEBDAV_NEON_NEONINPUTSTREAM_HXX
31 #include <config_lgpl.h>
32 #include <sal/types.h>
33 #include <rtl/ustring.hxx>
34 #include <cppuhelper/weak.hxx>
35 #include <com/sun/star/io/XInputStream.hpp>
36 #include <com/sun/star/io/XSeekable.hpp>
39 namespace webdav_ucp
42 // A simple XInputStream implementation provided specifically for use
43 // by the DAVSession::GET method.
44 class NeonInputStream : public ::com::sun::star::io::XInputStream,
45 public ::com::sun::star::io::XSeekable,
46 public ::cppu::OWeakObject
48 private:
49 com::sun::star::uno::Sequence< sal_Int8 > mInputBuffer;
50 sal_Int64 mLen;
51 sal_Int64 mPos;
53 public:
54 NeonInputStream();
55 virtual ~NeonInputStream();
57 // Add some data to the end of the stream
58 void AddToStream( const char * inBuf, sal_Int32 inLen );
60 // XInterface
61 virtual com::sun::star::uno::Any SAL_CALL queryInterface(
62 const ::com::sun::star::uno::Type & type )
63 throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
65 virtual void SAL_CALL acquire()
66 throw () SAL_OVERRIDE
67 { OWeakObject::acquire(); }
69 virtual void SAL_CALL release()
70 throw() SAL_OVERRIDE
71 { OWeakObject::release(); }
74 // XInputStream
75 virtual sal_Int32 SAL_CALL readBytes(
76 ::com::sun::star::uno::Sequence< sal_Int8 > & aData,
77 sal_Int32 nBytesToRead )
78 throw( ::com::sun::star::io::NotConnectedException,
79 ::com::sun::star::io::BufferSizeExceededException,
80 ::com::sun::star::io::IOException,
81 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
83 virtual sal_Int32 SAL_CALL readSomeBytes(
84 ::com::sun::star::uno::Sequence< sal_Int8 > & aData,
85 sal_Int32 nMaxBytesToRead )
86 throw( ::com::sun::star::io::NotConnectedException,
87 ::com::sun::star::io::BufferSizeExceededException,
88 ::com::sun::star::io::IOException,
89 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
91 virtual void SAL_CALL skipBytes( sal_Int32 nBytesToSkip )
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, std::exception ) SAL_OVERRIDE;
97 virtual sal_Int32 SAL_CALL available()
98 throw( ::com::sun::star::io::NotConnectedException,
99 ::com::sun::star::io::IOException,
100 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
102 virtual void SAL_CALL closeInput()
103 throw( ::com::sun::star::io::NotConnectedException,
104 ::com::sun::star::io::IOException,
105 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
107 // XSeekable
108 virtual void SAL_CALL seek( sal_Int64 location )
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 getPosition()
114 throw( ::com::sun::star::io::IOException,
115 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
117 virtual sal_Int64 SAL_CALL getLength()
118 throw( ::com::sun::star::io::IOException,
119 ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
122 } // namespace webdav_ucp
123 #endif // INCLUDED_UCB_SOURCE_UCP_WEBDAV_NEON_NEONINPUTSTREAM_HXX
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */