LibreOffice Module comphelper (master) 1
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
comphelper::OSeekableInputWrapper Class Referencefinal

#include <seekableinput.hxx>

Inheritance diagram for comphelper::OSeekableInputWrapper:
[legend]
Collaboration diagram for comphelper::OSeekableInputWrapper:
[legend]

Public Member Functions

 OSeekableInputWrapper (css::uno::Reference< css::io::XInputStream > xInStream, css::uno::Reference< css::uno::XComponentContext > xContext)
 
virtual ~OSeekableInputWrapper () override
 
virtual sal_Int32 SAL_CALL readBytes (css::uno::Sequence< sal_Int8 > &aData, sal_Int32 nBytesToRead) override
 
virtual sal_Int32 SAL_CALL readSomeBytes (css::uno::Sequence< sal_Int8 > &aData, sal_Int32 nMaxBytesToRead) override
 
virtual void SAL_CALL skipBytes (sal_Int32 nBytesToSkip) override
 
virtual sal_Int32 SAL_CALL available () override
 
virtual void SAL_CALL closeInput () override
 
virtual void SAL_CALL seek (sal_Int64 location) override
 
virtual sal_Int64 SAL_CALL getPosition () override
 
virtual sal_Int64 SAL_CALL getLength () override
 

Static Public Member Functions

static css::uno::Reference< css::io::XInputStream > CheckSeekableCanWrap (const css::uno::Reference< css::io::XInputStream > &xInStream, const css::uno::Reference< css::uno::XComponentContext > &rxContext)
 

Private Member Functions

COMPHELPER_DLLPRIVATE void PrepareCopy_Impl ()
 

Private Attributes

std::mutex m_aMutex
 
css::uno::Reference< css::uno::XComponentContext > m_xContext
 
css::uno::Reference< css::io::XInputStream > m_xOriginalStream
 
css::uno::Reference< css::io::XInputStream > m_xCopyInput
 
css::uno::Reference< css::io::XSeekable > m_xCopySeek
 

Detailed Description

Definition at line 39 of file seekableinput.hxx.

Constructor & Destructor Documentation

◆ OSeekableInputWrapper()

comphelper::OSeekableInputWrapper::OSeekableInputWrapper ( css::uno::Reference< css::io::XInputStream >  xInStream,
css::uno::Reference< css::uno::XComponentContext >  xContext 
)

Definition at line 60 of file seekableinput.cxx.

References m_xContext, and m_xContext.

Referenced by CheckSeekableCanWrap().

◆ ~OSeekableInputWrapper()

comphelper::OSeekableInputWrapper::~OSeekableInputWrapper ( )
overridevirtual

Definition at line 71 of file seekableinput.cxx.

Member Function Documentation

◆ available()

sal_Int32 SAL_CALL comphelper::OSeekableInputWrapper::available ( )
overridevirtual

Definition at line 158 of file seekableinput.cxx.

References m_aMutex, m_xCopyInput, m_xOriginalStream, and PrepareCopy_Impl().

◆ CheckSeekableCanWrap()

uno::Reference< io::XInputStream > comphelper::OSeekableInputWrapper::CheckSeekableCanWrap ( const css::uno::Reference< css::io::XInputStream > &  xInStream,
const css::uno::Reference< css::uno::XComponentContext > &  rxContext 
)
static

Definition at line 76 of file seekableinput.cxx.

References OSeekableInputWrapper().

◆ closeInput()

void SAL_CALL comphelper::OSeekableInputWrapper::closeInput ( )
overridevirtual

Definition at line 171 of file seekableinput.cxx.

References m_aMutex, m_xCopyInput, m_xCopySeek, and m_xOriginalStream.

◆ getLength()

sal_Int64 SAL_CALL comphelper::OSeekableInputWrapper::getLength ( )
overridevirtual

Definition at line 219 of file seekableinput.cxx.

References m_aMutex, m_xCopySeek, m_xOriginalStream, and PrepareCopy_Impl().

◆ getPosition()

sal_Int64 SAL_CALL comphelper::OSeekableInputWrapper::getPosition ( )
overridevirtual

Definition at line 206 of file seekableinput.cxx.

References m_aMutex, m_xCopySeek, m_xOriginalStream, and PrepareCopy_Impl().

◆ PrepareCopy_Impl()

void comphelper::OSeekableInputWrapper::PrepareCopy_Impl ( )
private

◆ readBytes()

sal_Int32 SAL_CALL comphelper::OSeekableInputWrapper::readBytes ( css::uno::Sequence< sal_Int8 > &  aData,
sal_Int32  nBytesToRead 
)
overridevirtual

Definition at line 119 of file seekableinput.cxx.

References aData, m_aMutex, m_xCopyInput, m_xOriginalStream, and PrepareCopy_Impl().

◆ readSomeBytes()

sal_Int32 SAL_CALL comphelper::OSeekableInputWrapper::readSomeBytes ( css::uno::Sequence< sal_Int8 > &  aData,
sal_Int32  nMaxBytesToRead 
)
overridevirtual

Definition at line 132 of file seekableinput.cxx.

References aData, m_aMutex, m_xCopyInput, m_xOriginalStream, and PrepareCopy_Impl().

◆ seek()

void SAL_CALL comphelper::OSeekableInputWrapper::seek ( sal_Int64  location)
overridevirtual

Definition at line 193 of file seekableinput.cxx.

References m_aMutex, m_xCopySeek, m_xOriginalStream, and PrepareCopy_Impl().

◆ skipBytes()

void SAL_CALL comphelper::OSeekableInputWrapper::skipBytes ( sal_Int32  nBytesToSkip)
overridevirtual

Definition at line 145 of file seekableinput.cxx.

References m_aMutex, m_xCopyInput, m_xOriginalStream, and PrepareCopy_Impl().

Member Data Documentation

◆ m_aMutex

std::mutex comphelper::OSeekableInputWrapper::m_aMutex
private

◆ m_xContext

css::uno::Reference< css::uno::XComponentContext > comphelper::OSeekableInputWrapper::m_xContext
private

Definition at line 44 of file seekableinput.hxx.

Referenced by OSeekableInputWrapper(), and PrepareCopy_Impl().

◆ m_xCopyInput

css::uno::Reference< css::io::XInputStream > comphelper::OSeekableInputWrapper::m_xCopyInput
private

◆ m_xCopySeek

css::uno::Reference< css::io::XSeekable > comphelper::OSeekableInputWrapper::m_xCopySeek
private

Definition at line 49 of file seekableinput.hxx.

Referenced by closeInput(), getLength(), getPosition(), PrepareCopy_Impl(), and seek().

◆ m_xOriginalStream

css::uno::Reference< css::io::XInputStream > comphelper::OSeekableInputWrapper::m_xOriginalStream
private

The documentation for this class was generated from the following files: