LibreOffice Module unotools (master) 1
|
#include <ucblockbytes.hxx>
Public Member Functions | |
virtual ErrCode | ReadAt (sal_uInt64 nPos, void *pBuffer, std::size_t nCount, std::size_t *pRead) const override |
virtual ErrCode | WriteAt (sal_uInt64, const void *, std::size_t, std::size_t *pWritten) override |
virtual ErrCode | Flush () const override |
virtual ErrCode | SetSize (sal_uInt64) override |
virtual ErrCode | Stat (SvLockBytesStat *pStat) const override |
void | SetError (ErrCode nError) |
ErrCode const & | GetError () const |
css::uno::Reference< css::io::XInputStream > | getInputStream () |
bool | setInputStream (const css::uno::Reference< css::io::XInputStream > &rxInputStream, bool bSetXSeekable=true) |
void | setStream (const css::uno::Reference< css::io::XStream > &rxStream) |
void | terminate () |
css::uno::Reference< css::io::XInputStream > | getInputStream () const |
css::uno::Reference< css::io::XOutputStream > | getOutputStream () const |
css::uno::Reference< css::io::XSeekable > | getSeekable () const |
void | setDontClose () |
void | SetStreamValid () |
Public Member Functions inherited from SvLockBytes | |
SvLockBytes () | |
SvLockBytes (SvStream *pTheStream, bool bTheOwner=false) | |
virtual | ~SvLockBytes () override |
const SvStream * | GetStream () const |
void | SetSynchronMode (bool bTheSync=true) |
bool | IsSynchronMode () const |
virtual ErrCode | ReadAt (sal_uInt64 nPos, void *pBuffer, std::size_t nCount, std::size_t *pRead) const |
virtual ErrCode | WriteAt (sal_uInt64 nPos, const void *pBuffer, std::size_t nCount, std::size_t *pWritten) |
virtual ErrCode | Flush () const |
virtual ErrCode | SetSize (sal_uInt64 nSize) |
virtual ErrCode | Stat (SvLockBytesStat *pStat) const |
Public Member Functions inherited from SvRefBase | |
SvRefBase () | |
SvRefBase (const SvRefBase &) | |
SvRefBase & | operator= (const SvRefBase &) |
void | RestoreNoDelete () |
void | AddNextRef () |
void | AddFirstRef () |
void | ReleaseRef () |
unsigned int | GetRefCount () const |
Static Public Member Functions | |
static UcbLockBytesRef | CreateLockBytes (const css::uno::Reference< css::ucb::XContent > &xContent, const css::uno::Sequence< css::beans::PropertyValue > &rProps, StreamMode eMode, const css::uno::Reference< css::task::XInteractionHandler > &xInter) |
static UcbLockBytesRef | CreateInputLockBytes (const css::uno::Reference< css::io::XInputStream > &xContent) |
static UcbLockBytesRef | CreateLockBytes (const css::uno::Reference< css::io::XStream > &xContent) |
Protected Member Functions | |
virtual | ~UcbLockBytes () override |
Protected Member Functions inherited from SvLockBytes | |
void | close () |
Protected Member Functions inherited from SvRefBase | |
virtual | ~SvRefBase () COVERITY_NOEXCEPT_FALSE |
Private Member Functions | |
UcbLockBytes () | |
bool | setInputStreamImpl (std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< css::io::XInputStream > &rxInputStream, bool bSetXSeekable=true) |
Private Attributes | |
osl::Condition | m_aInitialized |
osl::Condition | m_aTerminated |
std::mutex | m_aMutex |
css::uno::Reference< css::io::XInputStream > | m_xInputStream |
css::uno::Reference< css::io::XOutputStream > | m_xOutputStream |
css::uno::Reference< css::io::XSeekable > | m_xSeekable |
ErrCode | m_nError |
bool | m_bTerminated |
bool | m_bDontClose |
bool | m_bStreamValid |
Definition at line 62 of file ucblockbytes.hxx.
|
private |
Definition at line 936 of file ucblockbytes.cxx.
References ERRCODE_NONE, m_bTerminated, and SvLockBytes::SetSynchronMode().
Referenced by CreateInputLockBytes().
|
overrideprotectedvirtual |
Definition at line 945 of file ucblockbytes.cxx.
References m_bDontClose, m_xInputStream, and m_xOutputStream.
|
static |
Definition at line 1266 of file ucblockbytes.cxx.
References UcbLockBytes().
|
static |
|
static |
Referenced by utl::lcl_CreateStream().
|
overridevirtual |
Reimplemented from SvLockBytes.
Definition at line 1180 of file ucblockbytes.cxx.
References ERRCODE_IO_CANTWRITE, ERRCODE_NONE, Exception, and getOutputStream().
|
inline |
Reference< XInputStream > utl::UcbLockBytes::getInputStream | ( | ) |
Definition at line 979 of file ucblockbytes.cxx.
References m_aMutex, m_bDontClose, and m_xInputStream.
|
inline |
Definition at line 113 of file ucblockbytes.hxx.
References m_aMutex, and m_xInputStream.
|
inline |
Definition at line 119 of file ucblockbytes.hxx.
References m_aMutex, and m_xOutputStream.
|
inline |
Definition at line 125 of file ucblockbytes.hxx.
References m_aMutex, and m_xSeekable.
|
overridevirtual |
Reimplemented from SvLockBytes.
Definition at line 1065 of file ucblockbytes.cxx.
References aData, ERRCODE_IO_CANTREAD, ERRCODE_IO_CANTSEEK, ERRCODE_IO_PENDING, ERRCODE_NONE, getInputStream(), getSeekable(), SvLockBytes::IsSynchronMode(), m_aInitialized, m_bTerminated, nCount, nPos, and xStream.
|
inline |
Definition at line 131 of file ucblockbytes.hxx.
References m_bDontClose.
|
inline |
bool utl::UcbLockBytes::setInputStream | ( | const css::uno::Reference< css::io::XInputStream > & | rxInputStream, |
bool | bSetXSeekable = true |
||
) |
Definition at line 1002 of file ucblockbytes.cxx.
References m_aMutex, and setInputStreamImpl().
|
private |
Definition at line 1008 of file ucblockbytes.cxx.
References comphelper::OStorageHelper::CopyInputToOutput(), Exception, m_aInitialized, m_bDontClose, m_bStreamValid, m_xInputStream, and m_xSeekable.
Referenced by setInputStream(), and setStream().
|
overridevirtual |
Reimplemented from SvLockBytes.
Definition at line 1198 of file ucblockbytes.cxx.
References ERRCODE_IO_CANTWRITE, ERRCODE_NONE, getOutputStream(), nCount, SvLockBytesStat::nSize, SAL_INFO, Stat(), and WriteAt().
void utl::UcbLockBytes::setStream | ( | const css::uno::Reference< css::io::XStream > & | rxStream | ) |
Definition at line 986 of file ucblockbytes.cxx.
References m_aMutex, m_xOutputStream, m_xSeekable, and setInputStreamImpl().
void utl::UcbLockBytes::SetStreamValid | ( | ) |
Definition at line 1045 of file ucblockbytes.cxx.
References m_aInitialized, m_bStreamValid, and m_xInputStream.
|
overridevirtual |
Reimplemented from SvLockBytes.
Definition at line 1230 of file ucblockbytes.cxx.
References ERRCODE_IO_CANTTELL, ERRCODE_IO_INVALIDACCESS, ERRCODE_IO_INVALIDPARAMETER, ERRCODE_IO_PENDING, ERRCODE_NONE, getInputStream(), getSeekable(), SvLockBytes::IsSynchronMode(), m_aInitialized, m_bTerminated, SvLockBytesStat::nSize, and xStream.
Referenced by SetSize().
void utl::UcbLockBytes::terminate | ( | ) |
Definition at line 1052 of file ucblockbytes.cxx.
References ERRCODE_IO_NOTEXISTS, ERRCODE_NONE, GetError(), m_aInitialized, m_aTerminated, m_bTerminated, m_xInputStream, and SetError().
|
overridevirtual |
Reimplemented from SvLockBytes.
Definition at line 1141 of file ucblockbytes.cxx.
References aData, DBG_ASSERT, ERRCODE_IO_CANTSEEK, ERRCODE_IO_CANTWRITE, ERRCODE_NONE, Exception, getOutputStream(), getSeekable(), SvLockBytes::IsSynchronMode(), m_aInitialized, nCount, nPos, and pData.
Referenced by SetSize().
|
private |
Definition at line 64 of file ucblockbytes.hxx.
Referenced by ReadAt(), setInputStreamImpl(), SetStreamValid(), Stat(), terminate(), and WriteAt().
|
private |
Definition at line 66 of file ucblockbytes.hxx.
Referenced by getInputStream(), getOutputStream(), getSeekable(), setInputStream(), and setStream().
|
private |
Definition at line 65 of file ucblockbytes.hxx.
Referenced by terminate().
|
private |
Definition at line 75 of file ucblockbytes.hxx.
Referenced by getInputStream(), setDontClose(), setInputStreamImpl(), and ~UcbLockBytes().
|
private |
Definition at line 76 of file ucblockbytes.hxx.
Referenced by setInputStreamImpl(), and SetStreamValid().
|
private |
Definition at line 74 of file ucblockbytes.hxx.
Referenced by ReadAt(), Stat(), and terminate().
|
private |
Definition at line 72 of file ucblockbytes.hxx.
Referenced by GetError(), and SetError().
|
private |
Definition at line 68 of file ucblockbytes.hxx.
Referenced by getInputStream(), setInputStreamImpl(), SetStreamValid(), terminate(), and ~UcbLockBytes().
|
private |
Definition at line 69 of file ucblockbytes.hxx.
Referenced by getOutputStream(), setStream(), and ~UcbLockBytes().
|
private |
Definition at line 70 of file ucblockbytes.hxx.
Referenced by getSeekable(), setInputStreamImpl(), and setStream().