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 ()
 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
 

Private Member Functions

void closeStream ()
 

Private Attributes

osl::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 39 of file filstr.hxx.

Constructor & Destructor Documentation

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

Definition at line 70 of file filstr.cxx.

References closeStream().

Member Function Documentation

sal_Int32 SAL_CALL XStream_impl::available ( )
override

Definition at line 169 of file filstr.cxx.

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

void SAL_CALL XStream_impl::closeInput ( )
override

Definition at line 209 of file filstr.cxx.

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

void SAL_CALL XStream_impl::closeOutput ( )
override

Definition at line 220 of file filstr.cxx.

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

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

Definition at line 192 of file filstr.cxx.

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

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

sal_Int32 fileaccess::XStream_impl::CtorSuccess ( )
inline

Returns an error code as given by filerror.hxx.

Definition at line 56 of file filstr.hxx.

References m_nErrorCode.

void SAL_CALL XStream_impl::flush ( )
override

Definition at line 259 of file filstr.cxx.

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

Definition at line 88 of file filstr.cxx.

References m_aMutex, and m_bInputStreamCalled.

sal_Int64 SAL_CALL XStream_impl::getLength ( )
override

Definition at line 250 of file filstr.cxx.

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

Referenced by available().

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

Definition at line 57 of file filstr.hxx.

References m_nMinorErrorCode.

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

Definition at line 99 of file filstr.cxx.

References m_aMutex, and m_bOutputStreamCalled.

sal_Int64 SAL_CALL XStream_impl::getPosition ( )
override

Definition at line 241 of file filstr.cxx.

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

Referenced by available().

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

Definition at line 153 of file filstr.cxx.

References readBytes().

void SAL_CALL XStream_impl::seek ( sal_Int64  location)
override

Definition at line 231 of file filstr.cxx.

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

void SAL_CALL XStream_impl::skipBytes ( sal_Int32  nBytesToSkip)
override

Definition at line 162 of file filstr.cxx.

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

void SAL_CALL XStream_impl::truncate ( )
overridevirtual
void XStream_impl::waitForCompletion ( )
overridevirtual

Definition at line 262 of file filstr.cxx.

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

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

Definition at line 177 of file filstr.cxx.

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

Member Data Documentation

ReconnectingFile fileaccess::XStream_impl::m_aFile
private
osl::Mutex fileaccess::XStream_impl::m_aMutex
private

Definition at line 126 of file filstr.hxx.

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

bool fileaccess::XStream_impl::m_bInputStreamCalled
private

Definition at line 127 of file filstr.hxx.

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

bool fileaccess::XStream_impl::m_bOutputStreamCalled
private

Definition at line 127 of file filstr.hxx.

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

sal_Int32 fileaccess::XStream_impl::m_nErrorCode
private

Definition at line 132 of file filstr.hxx.

Referenced by CtorSuccess(), and XStream_impl().

bool fileaccess::XStream_impl::m_nIsOpen
private

Definition at line 128 of file filstr.hxx.

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

sal_Int32 fileaccess::XStream_impl::m_nMinorErrorCode
private

Definition at line 133 of file filstr.hxx.

Referenced by getMinorError(), and XStream_impl().


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