LibreOffice Module ucb (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
fileaccess::XStream_impl Class Reference

#include <filstr.hxx>

Inheritance diagram for fileaccess::XStream_impl:
[legend]
Collaboration diagram for fileaccess::XStream_impl:
[legend]

Public Member Functions

 XStream_impl (const OUString &aUncPath, bool bLock)
 
sal_Int32 CtorSuccess () const
 Returns an error code as given by filerror.hxx. More...
 
sal_Int32 getMinorError () const
 
virtual ~XStream_impl () override
 
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getInputStream () override
 
virtual css::uno::Reference< css::io::XOutputStream > SAL_CALL getOutputStream () override
 
virtual void SAL_CALL truncate () override
 
sal_Int32 SAL_CALL readBytes (css::uno::Sequence< sal_Int8 > &aData, sal_Int32 nBytesToRead) override
 
sal_Int32 SAL_CALL readSomeBytes (css::uno::Sequence< sal_Int8 > &aData, sal_Int32 nMaxBytesToRead) override
 
void SAL_CALL skipBytes (sal_Int32 nBytesToSkip) override
 
sal_Int32 SAL_CALL available () override
 
void SAL_CALL closeInput () override
 
void SAL_CALL seek (sal_Int64 location) override
 
sal_Int64 SAL_CALL getPosition () override
 
sal_Int64 SAL_CALL getLength () override
 
void SAL_CALL writeBytes (const css::uno::Sequence< sal_Int8 > &aData) override
 
void SAL_CALL flush () override
 
void SAL_CALL closeOutput () override
 
virtual void SAL_CALL waitForCompletion () override
 
virtual sal_Int32 readSomeBytes (sal_Int8 *aData, sal_Int32 nMaxBytesToRead) override
 

Private Member Functions

void closeStream ()
 

Private Attributes

std::mutex m_aMutex
 
bool m_bInputStreamCalled
 
bool m_bOutputStreamCalled
 
bool m_nIsOpen
 
ReconnectingFile m_aFile
 
sal_Int32 m_nErrorCode
 
sal_Int32 m_nMinorErrorCode
 

Detailed Description

Definition at line 40 of file filstr.hxx.

Constructor & Destructor Documentation

◆ XStream_impl()

XStream_impl::XStream_impl ( const OUString &  aUncPath,
bool  bLock 
)

◆ ~XStream_impl()

XStream_impl::~XStream_impl ( )
overridevirtual

Definition at line 70 of file filstr.cxx.

References closeStream().

Member Function Documentation

◆ available()

sal_Int32 SAL_CALL XStream_impl::available ( )
override

Definition at line 185 of file filstr.cxx.

References getLength(), getPosition(), and SAL_MAX_INT32.

◆ closeInput()

void SAL_CALL XStream_impl::closeInput ( )
override

Definition at line 225 of file filstr.cxx.

References closeStream(), m_aMutex, m_bInputStreamCalled, and m_bOutputStreamCalled.

◆ closeOutput()

void SAL_CALL XStream_impl::closeOutput ( )
override

Definition at line 236 of file filstr.cxx.

References closeStream(), m_aMutex, m_bInputStreamCalled, and m_bOutputStreamCalled.

◆ closeStream()

void XStream_impl::closeStream ( )
private
Exceptions
css::io::NotConnectedException
css::io::IOException
css::uno::RuntimeException

Definition at line 208 of file filstr.cxx.

References fileaccess::ReconnectingFile::close(), err, ex, m_aFile, and m_nIsOpen.

Referenced by closeInput(), closeOutput(), and ~XStream_impl().

◆ CtorSuccess()

sal_Int32 fileaccess::XStream_impl::CtorSuccess ( ) const
inline

Returns an error code as given by filerror.hxx.

Definition at line 58 of file filstr.hxx.

References m_nErrorCode.

◆ flush()

void SAL_CALL XStream_impl::flush ( )
override

Definition at line 275 of file filstr.cxx.

◆ getInputStream()

uno::Reference< io::XInputStream > SAL_CALL XStream_impl::getInputStream ( )
overridevirtual

Definition at line 88 of file filstr.cxx.

References m_aMutex, and m_bInputStreamCalled.

◆ getLength()

sal_Int64 SAL_CALL XStream_impl::getLength ( )
override

Definition at line 266 of file filstr.cxx.

References fileaccess::ReconnectingFile::getSize(), m_aFile, and THROW_WHERE.

Referenced by available().

◆ getMinorError()

sal_Int32 fileaccess::XStream_impl::getMinorError ( ) const
inline

Definition at line 59 of file filstr.hxx.

References m_nMinorErrorCode.

◆ getOutputStream()

uno::Reference< io::XOutputStream > SAL_CALL XStream_impl::getOutputStream ( )
overridevirtual

Definition at line 99 of file filstr.cxx.

References m_aMutex, and m_bOutputStreamCalled.

◆ getPosition()

sal_Int64 SAL_CALL XStream_impl::getPosition ( )
override

Definition at line 257 of file filstr.cxx.

References fileaccess::ReconnectingFile::getPos(), m_aFile, and THROW_WHERE.

Referenced by available().

◆ readBytes()

sal_Int32 SAL_CALL XStream_impl::readBytes ( css::uno::Sequence< sal_Int8 > &  aData,
sal_Int32  nBytesToRead 
)
override

◆ readSomeBytes() [1/2]

sal_Int32 SAL_CALL fileaccess::XStream_impl::readSomeBytes ( css::uno::Sequence< sal_Int8 > &  aData,
sal_Int32  nMaxBytesToRead 
)
override

◆ readSomeBytes() [2/2]

sal_Int32 XStream_impl::readSomeBytes ( sal_Int8 aData,
sal_Int32  nMaxBytesToRead 
)
overridevirtual

Definition at line 152 of file filstr.cxx.

References m_aFile, m_nIsOpen, pData, fileaccess::ReconnectingFile::read(), and THROW_WHERE.

◆ seek()

void SAL_CALL XStream_impl::seek ( sal_Int64  location)
override

Definition at line 247 of file filstr.cxx.

References m_aFile, fileaccess::ReconnectingFile::setPos(), and THROW_WHERE.

◆ skipBytes()

void SAL_CALL XStream_impl::skipBytes ( sal_Int32  nBytesToSkip)
override

Definition at line 178 of file filstr.cxx.

References m_aFile, and fileaccess::ReconnectingFile::setPos().

◆ truncate()

void SAL_CALL XStream_impl::truncate ( )
overridevirtual

◆ waitForCompletion()

void XStream_impl::waitForCompletion ( )
overridevirtual

Definition at line 278 of file filstr.cxx.

References m_aFile, m_nIsOpen, and fileaccess::ReconnectingFile::sync().

◆ writeBytes()

void SAL_CALL XStream_impl::writeBytes ( const css::uno::Sequence< sal_Int8 > &  aData)
override

Definition at line 193 of file filstr.cxx.

References aData, length, m_aFile, p, THROW_WHERE, and fileaccess::ReconnectingFile::write().

Member Data Documentation

◆ m_aFile

ReconnectingFile fileaccess::XStream_impl::m_aFile
private

◆ m_aMutex

std::mutex fileaccess::XStream_impl::m_aMutex
private

Definition at line 134 of file filstr.hxx.

Referenced by closeInput(), closeOutput(), getInputStream(), and getOutputStream().

◆ m_bInputStreamCalled

bool fileaccess::XStream_impl::m_bInputStreamCalled
private

Definition at line 135 of file filstr.hxx.

Referenced by closeInput(), closeOutput(), and getInputStream().

◆ m_bOutputStreamCalled

bool fileaccess::XStream_impl::m_bOutputStreamCalled
private

Definition at line 135 of file filstr.hxx.

Referenced by closeInput(), closeOutput(), and getOutputStream().

◆ m_nErrorCode

sal_Int32 fileaccess::XStream_impl::m_nErrorCode
private

Definition at line 140 of file filstr.hxx.

Referenced by CtorSuccess(), and XStream_impl().

◆ m_nIsOpen

bool fileaccess::XStream_impl::m_nIsOpen
private

Definition at line 136 of file filstr.hxx.

Referenced by closeStream(), readBytes(), readSomeBytes(), waitForCompletion(), and XStream_impl().

◆ m_nMinorErrorCode

sal_Int32 fileaccess::XStream_impl::m_nMinorErrorCode
private

Definition at line 141 of file filstr.hxx.

Referenced by getMinorError(), and XStream_impl().


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