Version 4.0.2.1, tag libreoffice-4.0.2.1
[LibreOffice.git] / ucb / source / ucp / ftp / test_activedatasink.hxx
blobc7549216d304f3f010c40e419ab4068faed3ddc2
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
20 /**************************************************************************
21 TODO
22 **************************************************************************
24 *************************************************************************/
25 #ifndef _TEST_ACTIVEDATASINK_HXX_
26 #define _TEST_ACTIVEDATASINK_HXX_
28 #include <cppuhelper/weak.hxx>
29 #include <cppuhelper/queryinterface.hxx>
30 #include <com/sun/star/io/XActiveDataSink.hpp>
31 #include <com/sun/star/io/XInputStream.hpp>
33 namespace test_ftp {
36 class Test_ActiveDataSink
37 : public cppu::OWeakObject,
38 public com::sun::star::io::XActiveDataSink
40 public:
42 // XInterface
44 virtual com::sun::star::uno::Any SAL_CALL
45 queryInterface( const com::sun::star::uno::Type& rType )
46 throw( com::sun::star::uno::RuntimeException );
49 virtual void SAL_CALL acquire( void ) throw();
51 virtual void SAL_CALL release( void ) throw();
54 // XActiveDataSink
56 virtual void SAL_CALL
57 setInputStream(const com::sun::star::uno::Reference<com::sun::star::io::XInputStream>& aStream )
58 throw(com::sun::star::uno::RuntimeException)
60 m_xInputStream = aStream;
64 virtual ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL
65 getInputStream( )
66 throw(::com::sun::star::uno::RuntimeException)
68 return m_xInputStream;
72 private:
74 com::sun::star::uno::Reference<com::sun::star::io::XInputStream> m_xInputStream;
81 #endif
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */