IBR-DTNSuite
0.10
|
#include <PlainSerializer.h>
Public Types | |
enum | Encoding { INVALID, SKIP_PAYLOAD, BASE64, RAW } |
Public Member Functions | |
PlainSerializer (std::ostream &stream, Encoding enc=BASE64) | |
virtual | ~PlainSerializer () |
dtn::data::Serializer & | operator<< (const dtn::data::Bundle &obj) |
dtn::data::Serializer & | operator<< (const dtn::data::PrimaryBlock &obj) |
dtn::data::Serializer & | operator<< (const dtn::data::Block &obj) |
void | writeData (const dtn::data::Block &block) |
void | writeData (std::istream &stream, const dtn::data::Length &len) |
dtn::data::Length | getLength (const dtn::data::Bundle &obj) |
dtn::data::Length | getLength (const dtn::data::PrimaryBlock &obj) const |
dtn::data::Length | getLength (const dtn::data::Block &obj) const |
Public Member Functions inherited from dtn::data::Serializer | |
virtual | ~Serializer () |
virtual Serializer & | operator<< (const dtn::data::BundleFragment &obj) |
Static Public Member Functions | |
static Encoding | parseEncoding (const std::string &data) |
static std::string | printEncoding (const Encoding &enc) |
Definition at line 34 of file PlainSerializer.h.
Enumerator | |
---|---|
INVALID | |
SKIP_PAYLOAD | |
BASE64 | |
RAW |
Definition at line 37 of file PlainSerializer.h.
Definition at line 58 of file PlainSerializer.cpp.
|
virtual |
Definition at line 63 of file PlainSerializer.cpp.
|
virtual |
Implements dtn::data::Serializer.
Definition at line 198 of file PlainSerializer.cpp.
|
virtual |
Implements dtn::data::Serializer.
Definition at line 203 of file PlainSerializer.cpp.
|
virtual |
Implements dtn::data::Serializer.
Definition at line 208 of file PlainSerializer.cpp.
|
virtual |
Implements dtn::data::Serializer.
Definition at line 67 of file PlainSerializer.cpp.
References dtn::data::Bundle::begin(), dtn::data::Bundle::end(), and dtn::data::Bundle::size().
|
virtual |
Implements dtn::data::Serializer.
Definition at line 88 of file PlainSerializer.cpp.
References dtn::data::PrimaryBlock::appdatalength, dtn::data::PrimaryBlock::custodian, dtn::data::PrimaryBlock::destination, dtn::data::PrimaryBlock::FRAGMENT, dtn::data::PrimaryBlock::fragmentoffset, dtn::data::EID::getString(), dtn::data::PrimaryBlock::lifetime, dtn::data::PrimaryBlock::procflags, dtn::data::PrimaryBlock::reportto, dtn::data::PrimaryBlock::sequencenumber, dtn::data::PrimaryBlock::source, dtn::data::PrimaryBlock::timestamp, and dtn::data::SDNV< E >::toString().
|
virtual |
Implements dtn::data::Serializer.
Definition at line 108 of file PlainSerializer.cpp.
References BASE64, dtn::data::Block::BLOCK_CONTAINS_EIDS, dtn::data::Block::DELETE_BUNDLE_IF_NOT_PROCESSED, dtn::data::Block::DISCARD_IF_NOT_PROCESSED, dtn::data::Block::FORWARDED_WITHOUT_PROCESSED, dtn::data::Block::get(), dtn::data::Block::getEIDList(), dtn::data::Block::getLength(), dtn::data::Block::getType(), dtn::data::Block::LAST_BLOCK, printEncoding(), RAW, dtn::data::Block::REPLICATE_IN_EVERY_FRAGMENT, dtn::data::Block::serialize(), SKIP_PAYLOAD, and dtn::data::Block::TRANSMIT_STATUSREPORT_IF_NOT_PROCESSED.
|
static |
Definition at line 36 of file PlainSerializer.cpp.
References BASE64, INVALID, RAW, and SKIP_PAYLOAD.
Referenced by dtn::api::PlainDeserializer::operator>>(), dtn::api::PlainDeserializer::readData(), and dtn::api::ExtendedApiHandler::run().
|
static |
Definition at line 44 of file PlainSerializer.cpp.
References BASE64, RAW, and SKIP_PAYLOAD.
Referenced by operator<<(), and writeData().
void dtn::api::PlainSerializer::writeData | ( | const dtn::data::Block & | block | ) |
Definition at line 508 of file PlainSerializer.cpp.
References BASE64, dtn::data::Block::getLength(), printEncoding(), RAW, and dtn::data::Block::serialize().
Referenced by dtn::api::ExtendedApiHandler::run().
void dtn::api::PlainSerializer::writeData | ( | std::istream & | stream, |
const dtn::data::Length & | len | ||
) |
Definition at line 537 of file PlainSerializer.cpp.
References BASE64, ibrcommon::BLOB::copy(), printEncoding(), and RAW.