CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cvmfs::Sink Class Referenceabstract

#include <sink.h>

Inheritance diagram for cvmfs::Sink:

Public Member Functions

virtual ~Sink ()
 
virtual int64_t Write (const void *buf, uint64_t sz)=0
 
virtual int Reset ()=0
 

Detailed Description

A data sink that behaves like a writable file descriptor with a custom implementation.

Currently used by the Fetcher class to redirect writing into a cache manager.

TODO(jblomer): can all download destinations be implemented by inheriting from this class?

Definition at line 21 of file sink.h.

Constructor & Destructor Documentation

virtual cvmfs::Sink::~Sink ( )
inlinevirtual

Definition at line 23 of file sink.h.

Member Function Documentation

virtual int cvmfs::Sink::Reset ( )
pure virtual

Truncate all written data and start over at position zero.

Implemented in cvmfs::TransactionSink.

Referenced by download::DownloadManager::VerifyAndFinalize().

Here is the caller graph for this function:

virtual int64_t cvmfs::Sink::Write ( const void *  buf,
uint64_t  sz 
)
pure virtual

Appends data to the sink, returns the number of bytes written or -errno.

Implemented in cvmfs::TransactionSink.

Referenced by download::CallbackCurlData(), and zlib::DecompressZStream2Sink().

Here is the caller graph for this function:


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