LibreOffice Module connectivity (master) 1
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
connectivity::firebird::Blob Class Reference

#include <Blob.hxx>

Inheritance diagram for connectivity::firebird::Blob:
[legend]
Collaboration diagram for connectivity::firebird::Blob:
[legend]

Public Member Functions

 Blob (isc_db_handle *pDatabaseHandle, isc_tr_handle *pTransactionHandle, ISC_QUAD const &aBlobID)
 
bool readOneSegment (std::vector< char > &rDataOut)
 
virtual sal_Int64 SAL_CALL length () override
 
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getBytes (sal_Int64 aPosition, sal_Int32 aLength) override
 
virtual css::uno::Reference< css::io::XInputStream > SAL_CALL getBinaryStream () override
 
virtual sal_Int64 SAL_CALL position (const css::uno::Sequence< sal_Int8 > &rPattern, sal_Int64 aStart) override
 
virtual sal_Int64 SAL_CALL positionOfBlob (const css::uno::Reference< css::sdbc::XBlob > &rPattern, sal_Int64 aStart) override
 
virtual sal_Int32 SAL_CALL readBytes (css::uno::Sequence< sal_Int8 > &rDataOut, sal_Int32 nBytes) override
 
virtual sal_Int32 SAL_CALL readSomeBytes (css::uno::Sequence< sal_Int8 > &rDataOut, sal_Int32 nMaximumBytes) override
 
virtual void SAL_CALL skipBytes (sal_Int32 nBytes) override
 
virtual sal_Int32 SAL_CALL available () override
 
virtual void SAL_CALL closeInput () override
 
virtual void SAL_CALL disposing () override
 

Protected Member Functions

void ensureBlobIsOpened ()
 
void closeBlob ()
 Closes the blob and cleans up resources – can be used to reset the blob if we e.g. More...
 
sal_uInt16 getMaximumSegmentSize ()
 

Protected Attributes

::osl::Mutex m_aMutex
 
isc_db_handle * m_pDatabaseHandle
 
isc_tr_handle * m_pTransactionHandle
 
ISC_QUAD m_blobID
 
isc_blob_handle m_blobHandle
 
bool m_bBlobOpened
 
sal_Int64 m_nBlobLength
 
sal_uInt16 m_nMaxSegmentSize
 
sal_Int64 m_nBlobPosition
 
ISC_STATUS_ARRAY m_statusVector
 

Detailed Description

Definition at line 27 of file drivers/firebird/Blob.hxx.

Constructor & Destructor Documentation

◆ Blob()

Blob::Blob ( isc_db_handle *  pDatabaseHandle,
isc_tr_handle *  pTransactionHandle,
ISC_QUAD const &  aBlobID 
)

Definition at line 34 of file firebird/Blob.cxx.

References if(), and m_aMutex.

Member Function Documentation

◆ available()

sal_Int32 SAL_CALL Blob::available ( )
overridevirtual

◆ closeBlob()

void Blob::closeBlob ( )
protected

Closes the blob and cleans up resources – can be used to reset the blob if we e.g.

want to read from the beginning again.

Exceptions
css::sdbc::SQLException

Definition at line 155 of file firebird/Blob.cxx.

References connectivity::firebird::evaluateStatusVector(), m_aMutex, m_bBlobOpened, m_blobHandle, m_statusVector, and u.

Referenced by closeInput(), disposing(), and getBytes().

◆ closeInput()

void SAL_CALL Blob::closeInput ( )
overridevirtual

Definition at line 364 of file firebird/Blob.cxx.

References a, closeBlob(), Exception, and cppu::getCaughtException().

◆ disposing()

void SAL_CALL Blob::disposing ( )
overridevirtual

Definition at line 176 of file firebird/Blob.cxx.

References closeBlob(), and TOOLS_WARN_EXCEPTION.

◆ ensureBlobIsOpened()

void Blob::ensureBlobIsOpened ( )
protected

◆ getBinaryStream()

uno::Reference< XInputStream > SAL_CALL Blob::getBinaryStream ( )
overridevirtual

Definition at line 229 of file firebird/Blob.cxx.

◆ getBytes()

uno::Sequence< sal_Int8 > SAL_CALL Blob::getBytes ( sal_Int64  aPosition,
sal_Int32  aLength 
)
overridevirtual

◆ getMaximumSegmentSize()

sal_uInt16 Blob::getMaximumSegmentSize ( )
protected

Definition at line 118 of file firebird/Blob.cxx.

References ensureBlobIsOpened(), and m_nMaxSegmentSize.

Referenced by readOneSegment().

◆ length()

sal_Int64 SAL_CALL Blob::length ( )
overridevirtual

◆ position()

sal_Int64 SAL_CALL Blob::position ( const css::uno::Sequence< sal_Int8 > &  rPattern,
sal_Int64  aStart 
)
overridevirtual

◆ positionOfBlob()

sal_Int64 SAL_CALL Blob::positionOfBlob ( const css::uno::Reference< css::sdbc::XBlob > &  rPattern,
sal_Int64  aStart 
)
overridevirtual

◆ readBytes()

sal_Int32 SAL_CALL Blob::readBytes ( css::uno::Sequence< sal_Int8 > &  rDataOut,
sal_Int32  nBytes 
)
overridevirtual

◆ readOneSegment()

bool Blob::readOneSegment ( std::vector< char > &  rDataOut)

◆ readSomeBytes()

sal_Int32 SAL_CALL Blob::readSomeBytes ( css::uno::Sequence< sal_Int8 > &  rDataOut,
sal_Int32  nMaximumBytes 
)
overridevirtual

Definition at line 315 of file firebird/Blob.cxx.

References readBytes().

◆ skipBytes()

void SAL_CALL Blob::skipBytes ( sal_Int32  nBytes)
overridevirtual

Definition at line 324 of file firebird/Blob.cxx.

References readBytes().

Referenced by getBytes().

Member Data Documentation

◆ m_aMutex

::osl::Mutex connectivity::firebird::Blob::m_aMutex
protected

◆ m_bBlobOpened

bool connectivity::firebird::Blob::m_bBlobOpened
protected

Definition at line 41 of file drivers/firebird/Blob.hxx.

Referenced by closeBlob(), and ensureBlobIsOpened().

◆ m_blobHandle

isc_blob_handle connectivity::firebird::Blob::m_blobHandle
protected

Definition at line 39 of file drivers/firebird/Blob.hxx.

Referenced by closeBlob(), ensureBlobIsOpened(), readBytes(), and readOneSegment().

◆ m_blobID

ISC_QUAD connectivity::firebird::Blob::m_blobID
protected

Definition at line 38 of file drivers/firebird/Blob.hxx.

Referenced by ensureBlobIsOpened().

◆ m_nBlobLength

sal_Int64 connectivity::firebird::Blob::m_nBlobLength
protected

Definition at line 42 of file drivers/firebird/Blob.hxx.

Referenced by available(), ensureBlobIsOpened(), getBytes(), length(), and readBytes().

◆ m_nBlobPosition

sal_Int64 connectivity::firebird::Blob::m_nBlobPosition
protected

◆ m_nMaxSegmentSize

sal_uInt16 connectivity::firebird::Blob::m_nMaxSegmentSize
protected

Definition at line 43 of file drivers/firebird/Blob.hxx.

Referenced by ensureBlobIsOpened(), and getMaximumSegmentSize().

◆ m_pDatabaseHandle

isc_db_handle* connectivity::firebird::Blob::m_pDatabaseHandle
protected

Definition at line 33 of file drivers/firebird/Blob.hxx.

Referenced by ensureBlobIsOpened().

◆ m_pTransactionHandle

isc_tr_handle* connectivity::firebird::Blob::m_pTransactionHandle
protected

Definition at line 34 of file drivers/firebird/Blob.hxx.

Referenced by ensureBlobIsOpened().

◆ m_statusVector

ISC_STATUS_ARRAY connectivity::firebird::Blob::m_statusVector
protected

Definition at line 46 of file drivers/firebird/Blob.hxx.

Referenced by closeBlob(), ensureBlobIsOpened(), readBytes(), and readOneSegment().


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