LCOV - code coverage report
Current view: top level - xmlhelp/source/cxxhelp/provider - inputstream.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 0 1 0.0 %
Date: 2014-11-03 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       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/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      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 .
      18             :  */
      19             : 
      20             : #ifndef INCLUDED_XMLHELP_SOURCE_CXXHELP_PROVIDER_INPUTSTREAM_HXX
      21             : #define INCLUDED_XMLHELP_SOURCE_CXXHELP_PROVIDER_INPUTSTREAM_HXX
      22             : 
      23             : #include <rtl/ustring.hxx>
      24             : #include <osl/file.hxx>
      25             : #include <cppuhelper/weak.hxx>
      26             : #include <com/sun/star/uno/XInterface.hpp>
      27             : #include <com/sun/star/io/XSeekable.hpp>
      28             : #include <com/sun/star/io/XInputStream.hpp>
      29             : #include <com/sun/star/ucb/XContentProvider.hpp>
      30             : 
      31             : 
      32             : namespace chelp {
      33             : 
      34             :     // forward declaration
      35             : 
      36             :     class XInputStream_impl
      37             :         : public cppu::OWeakObject,
      38             :           public com::sun::star::io::XInputStream,
      39             :           public com::sun::star::io::XSeekable
      40             :     {
      41             :     public:
      42             : 
      43             :         XInputStream_impl( const OUString& aUncPath );
      44             : 
      45             :         virtual ~XInputStream_impl();
      46             : 
      47             :         /**
      48             :          *  Returns an error code as given by filerror.hxx
      49             :          */
      50             : 
      51           0 :         bool SAL_CALL CtorSuccess() { return m_bIsOpen;}
      52             : 
      53             :         virtual com::sun::star::uno::Any SAL_CALL
      54             :         queryInterface(
      55             :             const com::sun::star::uno::Type& rType )
      56             :             throw( com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      57             : 
      58             :         virtual void SAL_CALL
      59             :         acquire(
      60             :             void )
      61             :             throw() SAL_OVERRIDE;
      62             : 
      63             :         virtual void SAL_CALL
      64             :         release(
      65             :             void )
      66             :             throw() SAL_OVERRIDE;
      67             : 
      68             :         virtual sal_Int32 SAL_CALL
      69             :         readBytes(
      70             :             com::sun::star::uno::Sequence< sal_Int8 >& aData,
      71             :             sal_Int32 nBytesToRead )
      72             :             throw( com::sun::star::io::NotConnectedException,
      73             :                    com::sun::star::io::BufferSizeExceededException,
      74             :                    com::sun::star::io::IOException,
      75             :                    com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      76             : 
      77             :         virtual sal_Int32 SAL_CALL
      78             :         readSomeBytes(
      79             :             com::sun::star::uno::Sequence< sal_Int8 >& aData,
      80             :             sal_Int32 nMaxBytesToRead )
      81             :             throw( com::sun::star::io::NotConnectedException,
      82             :                    com::sun::star::io::BufferSizeExceededException,
      83             :                    com::sun::star::io::IOException,
      84             :                    com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      85             : 
      86             :         virtual void SAL_CALL
      87             :         skipBytes(
      88             :             sal_Int32 nBytesToSkip )
      89             :             throw( com::sun::star::io::NotConnectedException,
      90             :                    com::sun::star::io::BufferSizeExceededException,
      91             :                    com::sun::star::io::IOException,
      92             :                    com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
      93             : 
      94             :         virtual sal_Int32 SAL_CALL
      95             :         available(
      96             :             void )
      97             :             throw( com::sun::star::io::NotConnectedException,
      98             :                    com::sun::star::io::IOException,
      99             :                    com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     100             : 
     101             :         virtual void SAL_CALL
     102             :         closeInput(
     103             :             void )
     104             :             throw( com::sun::star::io::NotConnectedException,
     105             :                    com::sun::star::io::IOException,
     106             :                    com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     107             : 
     108             :         virtual void SAL_CALL
     109             :         seek(
     110             :             sal_Int64 location )
     111             :             throw( com::sun::star::lang::IllegalArgumentException,
     112             :                    com::sun::star::io::IOException,
     113             :                    com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     114             : 
     115             :         virtual sal_Int64 SAL_CALL
     116             :         getPosition(
     117             :             void )
     118             :             throw( com::sun::star::io::IOException,
     119             :                    com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     120             : 
     121             :         virtual sal_Int64 SAL_CALL
     122             :         getLength(
     123             :             void )
     124             :             throw( com::sun::star::io::IOException,
     125             :                    com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
     126             : 
     127             :     private:
     128             : 
     129             :         bool                                               m_bIsOpen;
     130             :         osl::File                                          m_aFile;
     131             :     };
     132             : 
     133             : 
     134             : } // end namespace XInputStream_impl
     135             : 
     136             : #endif
     137             : 
     138             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10