diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-08-22 14:52:28 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-08-22 14:52:28 +0200 |
commit | 2d8911d9396a10ad794eb42b6d5a44e8f5af4d91 (patch) | |
tree | 05868189ccda3448cd5b554340b73df4b194de16 /include/ucbhelper | |
parent | 12c152ccbf2890378b92e7d00ecc532fee36b83f (diff) |
ucbhelper::Std{In,Out}putStream are only used in ucb/source/ucb/cmis/
...where their use of boost::shared_ptr (instead of std::shared_ptr) matches the
use in libcmis, but makes them unlikely to be useful anywhere else. So move
them into ucb/source/ucb/cmis/.
Change-Id: I68359be6b43d6889af4f241dcdcbdc0d9d70d717
Diffstat (limited to 'include/ucbhelper')
-rw-r--r-- | include/ucbhelper/std_inputstream.hxx | 115 | ||||
-rw-r--r-- | include/ucbhelper/std_outputstream.hxx | 71 |
2 files changed, 0 insertions, 186 deletions
diff --git a/include/ucbhelper/std_inputstream.hxx b/include/ucbhelper/std_inputstream.hxx deleted file mode 100644 index 569713366d9c..000000000000 --- a/include/ucbhelper/std_inputstream.hxx +++ /dev/null @@ -1,115 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_UCBHELPER_STD_INPUTSTREAM_HXX -#define INCLUDED_UCBHELPER_STD_INPUTSTREAM_HXX - -#include <boost/shared_ptr.hpp> -#include <istream> - -#include <rtl/ustring.hxx> -#include <osl/mutex.hxx> -#include <cppuhelper/weak.hxx> -#include <cppuhelper/queryinterface.hxx> -#include <com/sun/star/io/XInputStream.hpp> -#include <com/sun/star/io/XSeekable.hpp> - -#include <ucbhelper/ucbhelperdllapi.h> - -namespace ucbhelper -{ - /** Implements a seekable InputStream - * working on an std::istream - */ - class UCBHELPER_DLLPUBLIC StdInputStream - : public cppu::OWeakObject, - public css::io::XInputStream, - public css::io::XSeekable - { - public: - - StdInputStream( boost::shared_ptr< std::istream > const & pStream ); - - virtual ~StdInputStream(); - - virtual css::uno::Any SAL_CALL queryInterface ( const css::uno::Type& rType ) - throw ( css::uno::RuntimeException, std::exception ) override; - - virtual void SAL_CALL acquire( ) throw ( ) override; - - virtual void SAL_CALL release( ) throw ( ) override; - - virtual sal_Int32 SAL_CALL - readBytes ( css::uno::Sequence< sal_Int8 >& aData, - sal_Int32 nBytesToRead ) - throw ( css::io::NotConnectedException, - css::io::BufferSizeExceededException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - virtual sal_Int32 SAL_CALL - readSomeBytes ( css::uno::Sequence< sal_Int8 >& aData, - sal_Int32 nMaxBytesToRead ) - throw ( css::io::NotConnectedException, - css::io::BufferSizeExceededException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - virtual void SAL_CALL - skipBytes ( sal_Int32 nBytesToSkip ) - throw ( css::io::NotConnectedException, - css::io::BufferSizeExceededException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - virtual sal_Int32 SAL_CALL - available ( ) - throw ( css::io::NotConnectedException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - virtual void SAL_CALL - closeInput ( ) - throw ( css::io::NotConnectedException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - - /** XSeekable - */ - - virtual void SAL_CALL - seek ( sal_Int64 location ) - throw ( css::lang::IllegalArgumentException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - - virtual sal_Int64 SAL_CALL - getPosition ( ) - throw ( css::io::IOException, css::uno::RuntimeException, std::exception ) override; - - - virtual sal_Int64 SAL_CALL - getLength ( ) - throw ( css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - private: - - osl::Mutex m_aMutex; - boost::shared_ptr< std::istream > m_pStream; - sal_Int64 m_nLength; - }; - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/include/ucbhelper/std_outputstream.hxx b/include/ucbhelper/std_outputstream.hxx deleted file mode 100644 index 0537ee700fef..000000000000 --- a/include/ucbhelper/std_outputstream.hxx +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef INCLUDED_UCBHELPER_STD_OUTPUTSTREAM_HXX -#define INCLUDED_UCBHELPER_STD_OUTPUTSTREAM_HXX - -#include <boost/shared_ptr.hpp> -#include <ostream> - -#include <osl/mutex.hxx> -#include <cppuhelper/weak.hxx> -#include <cppuhelper/queryinterface.hxx> -#include <com/sun/star/io/XOutputStream.hpp> -#include <ucbhelper/ucbhelperdllapi.h> - -namespace ucbhelper -{ - /** Implements a OutputStream - * working on an std::ostream - */ - class UCBHELPER_DLLPUBLIC StdOutputStream : - public cppu::OWeakObject, - public css::io::XOutputStream - { - public: - - StdOutputStream( boost::shared_ptr< std::ostream > const & pStream ); - - virtual ~StdOutputStream( ); - - virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type& rType ) - throw ( css::uno::RuntimeException, std::exception ) override; - - virtual void SAL_CALL acquire ( ) throw ( ) override; - - virtual void SAL_CALL release ( ) throw ( ) override; - - virtual void SAL_CALL writeBytes ( const css::uno::Sequence< sal_Int8 >& aData ) - throw ( css::io::NotConnectedException, - css::io::BufferSizeExceededException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - virtual void SAL_CALL flush ( ) - throw ( css::io::NotConnectedException, - css::io::BufferSizeExceededException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - virtual void SAL_CALL closeOutput ( ) - throw ( css::io::NotConnectedException, - css::io::BufferSizeExceededException, - css::io::IOException, - css::uno::RuntimeException, std::exception ) override; - - private: - - osl::Mutex m_aMutex; - boost::shared_ptr< std::ostream > m_pStream; - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |