Update ooo320-m1
[ooovba.git] / ucb / source / ucp / ftp / test_activedatasink.hxx
blob75835ded99d662331aa40fff01141850d40ac223
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: test_activedatasink.hxx,v $
10 * $Revision: 1.5 $
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 /**************************************************************************
32 TODO
33 **************************************************************************
35 *************************************************************************/
36 #ifndef _TEST_ACTIVEDATASINK_HXX_
37 #define _TEST_ACTIVEDATASINK_HXX_
39 #include <cppuhelper/weak.hxx>
40 #include <cppuhelper/queryinterface.hxx>
41 #include <com/sun/star/io/XActiveDataSink.hpp>
42 #include <com/sun/star/io/XInputStream.hpp>
44 namespace test_ftp {
47 class Test_ActiveDataSink
48 : public cppu::OWeakObject,
49 public com::sun::star::io::XActiveDataSink
51 public:
53 // XInterface
55 virtual com::sun::star::uno::Any SAL_CALL
56 queryInterface( const com::sun::star::uno::Type& rType )
57 throw( com::sun::star::uno::RuntimeException );
60 virtual void SAL_CALL acquire( void ) throw();
62 virtual void SAL_CALL release( void ) throw();
65 // XActiveDataSink
67 virtual void SAL_CALL
68 setInputStream(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& aStream )
69 throw(com::sun::star::uno::RuntimeException)
71 m_xInputStream = aStream;
75 virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL
76 getInputStream( )
77 throw(::com::sun::star::uno::RuntimeException)
79 return m_xInputStream;
83 private:
85 com::sun::star::uno::Reference<com::sun::star::io::XInputStream> m_xInputStream;
92 #endif