libzypp  17.25.6
zypp::detail::zckstreambufimpl Class Reference

Streambuffer reading or writing zchunk files. More...

#include <ZckStream.h>

Public Types

using error_type = std::string
 

Public Member Functions

 ~zckstreambufimpl ()
 
bool isOpen () const
 
bool canRead () const
 
bool canWrite () const
 
bool canSeek (std::ios_base::seekdir way_r) const
 
std::streamsize readData (char *buffer_r, std::streamsize maxcount_r)
 
bool writeData (const char *buffer_r, std::streamsize count_r)
 
off_t seekTo (off_t off_r, std::ios_base::seekdir way_r, std::ios_base::openmode omode_r)
 
off_t tell () const
 
error_type error () const
 

Protected Member Functions

bool openImpl (const char *name_r, std::ios_base::openmode mode_r)
 
bool closeImpl ()
 

Private Member Functions

void setError ()
 

Private Attributes

int _fd = -1
 
bool _isReading = false
 
zckCtx_zContext = nullptr
 
off_t _currfp = 0
 
error_type _lastErr
 

Detailed Description

Streambuffer reading or writing zchunk files.

Read and write mode are mutual exclusive. Seek is not supported.

This streambuf is used in ifzckstream and ofzckstream.

Definition at line 31 of file ZckStream.h.

Member Typedef Documentation

◆ error_type

Definition at line 34 of file ZckStream.h.

Constructor & Destructor Documentation

◆ ~zckstreambufimpl()

zypp::detail::zckstreambufimpl::~zckstreambufimpl ( )

Definition at line 26 of file ZckStream.cc.

Member Function Documentation

◆ isOpen()

bool zypp::detail::zckstreambufimpl::isOpen ( ) const

Definition at line 132 of file ZckStream.cc.

◆ canRead()

bool zypp::detail::zckstreambufimpl::canRead ( ) const

Definition at line 137 of file ZckStream.cc.

◆ canWrite()

bool zypp::detail::zckstreambufimpl::canWrite ( ) const

Definition at line 142 of file ZckStream.cc.

◆ canSeek()

bool zypp::detail::zckstreambufimpl::canSeek ( std::ios_base::seekdir  way_r) const

Definition at line 147 of file ZckStream.cc.

◆ readData()

std::streamsize zypp::detail::zckstreambufimpl::readData ( char *  buffer_r,
std::streamsize  maxcount_r 
)

Definition at line 104 of file ZckStream.cc.

◆ writeData()

bool zypp::detail::zckstreambufimpl::writeData ( const char *  buffer_r,
std::streamsize  count_r 
)

Definition at line 118 of file ZckStream.cc.

◆ seekTo()

off_t zypp::detail::zckstreambufimpl::seekTo ( off_t  off_r,
std::ios_base::seekdir  way_r,
std::ios_base::openmode  omode_r 
)

Definition at line 152 of file ZckStream.cc.

◆ tell()

off_t zypp::detail::zckstreambufimpl::tell ( ) const

Definition at line 157 of file ZckStream.cc.

◆ error()

error_type zypp::detail::zckstreambufimpl::error ( ) const
inline

Definition at line 48 of file ZckStream.h.

◆ openImpl()

bool zypp::detail::zckstreambufimpl::openImpl ( const char *  name_r,
std::ios_base::openmode  mode_r 
)
protected

Definition at line 31 of file ZckStream.cc.

◆ closeImpl()

bool zypp::detail::zckstreambufimpl::closeImpl ( )
protected

Definition at line 77 of file ZckStream.cc.

◆ setError()

void zypp::detail::zckstreambufimpl::setError ( )
private

Definition at line 96 of file ZckStream.cc.

Member Data Documentation

◆ _fd

int zypp::detail::zckstreambufimpl::_fd = -1
private

Definition at line 56 of file ZckStream.h.

◆ _isReading

bool zypp::detail::zckstreambufimpl::_isReading = false
private

Definition at line 57 of file ZckStream.h.

◆ _zContext

zckCtx* zypp::detail::zckstreambufimpl::_zContext = nullptr
private

Definition at line 58 of file ZckStream.h.

◆ _currfp

off_t zypp::detail::zckstreambufimpl::_currfp = 0
private

Definition at line 59 of file ZckStream.h.

◆ _lastErr

error_type zypp::detail::zckstreambufimpl::_lastErr
private

Definition at line 60 of file ZckStream.h.


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