IBR-DTNSuite
0.10
|
#include <BLOB.h>
Public Member Functions | |
FileBLOB (const ibrcommon::File &f) | |
virtual | ~FileBLOB () |
virtual void | clear () |
virtual void | open () |
virtual void | close () |
Public Member Functions inherited from ibrcommon::BLOB | |
virtual | ~BLOB () |
Public Member Functions inherited from ibrcommon::Mutex | |
Mutex (MUTEX_TYPE type=MUTEX_NORMAL) | |
virtual | ~Mutex () |
virtual void | trylock () throw (MutexException) |
virtual void | enter () throw (MutexException) |
virtual void | leave () throw (MutexException) |
Public Member Functions inherited from ibrcommon::MutexInterface | |
virtual | ~MutexInterface ()=0 |
Protected Member Functions | |
std::iostream & | __get_stream () |
std::streamsize | __get_size () |
Protected Member Functions inherited from ibrcommon::BLOB | |
BLOB () | |
Additional Inherited Members | |
Public Types inherited from ibrcommon::Mutex | |
enum | MUTEX_TYPE { MUTEX_NORMAL = PTHREAD_MUTEX_NORMAL, MUTEX_RECURSIVE = PTHREAD_MUTEX_RECURSIVE, MUTEX_ERRORCHECK = PTHREAD_MUTEX_ERRORCHECK } |
Static Public Member Functions inherited from ibrcommon::BLOB | |
static std::ostream & | copy (std::ostream &output, std::istream &input, const std::streamsize size, const size_t buffer_size=0x1000) |
static ibrcommon::BLOB::Reference | create () |
static ibrcommon::BLOB::Reference | open (const ibrcommon::File &f) |
static void | changeProvider (BLOB::Provider *p, bool auto_delete=false) |
Static Public Attributes inherited from ibrcommon::BLOB | |
static ibrcommon::Semaphore | _filelimit |
Protected Attributes inherited from ibrcommon::Mutex | |
pthread_mutex_t | m_mutex |
pthread_mutexattr_t | m_attr |
Static Protected Attributes inherited from ibrcommon::BLOB | |
static ProviderRef | provider |
A FileBLOB is a read only BLOB object. It is based on a fstream object, but denies write access. This could be used to easy access static files.
ibrcommon::FileBLOB::FileBLOB | ( | const ibrcommon::File & | f | ) |
Definition at line 269 of file BLOB.cpp.
References ibrcommon::File::exists().
|
protectedvirtual |
Implements ibrcommon::BLOB.
Definition at line 303 of file BLOB.cpp.
References ibrcommon::File::size().
|
inlineprotectedvirtual |
Implements ibrcommon::BLOB.
|
virtual |
This method deletes the content of the payload. The size will be zero after calling.
Implements ibrcommon::BLOB.
|
virtual |
Implements ibrcommon::BLOB.
Definition at line 295 of file BLOB.cpp.
References ibrcommon::BLOB::_filelimit, and ibrcommon::Semaphore::post().
|
virtual |
Implements ibrcommon::BLOB.
Definition at line 282 of file BLOB.cpp.
References ibrcommon::BLOB::_filelimit, ibrcommon::File::getPath(), and ibrcommon::Semaphore::wait().