00001 /* 00002 * PayloadBlock.h 00003 * 00004 * Created on: 29.05.2009 00005 * Author: morgenro 00006 */ 00007 00008 00009 00010 #ifndef PAYLOADBLOCK_H_ 00011 #define PAYLOADBLOCK_H_ 00012 00013 #include "ibrdtn/data/Block.h" 00014 #include "ibrcommon/data/BLOB.h" 00015 00016 namespace dtn 00017 { 00018 namespace data 00019 { 00020 class PayloadBlock : public Block 00021 { 00022 public: 00023 static const char BLOCK_TYPE = 1; 00024 00025 PayloadBlock(); 00026 PayloadBlock(ibrcommon::BLOB::Reference ref); 00027 virtual ~PayloadBlock(); 00028 00029 ibrcommon::BLOB::Reference getBLOB() const; 00030 00031 virtual size_t getLength() const; 00032 virtual std::ostream &serialize(std::ostream &stream) const; 00033 virtual std::istream &deserialize(std::istream &stream); 00034 00035 private: 00036 ibrcommon::BLOB::Reference _blobref; 00037 }; 00038 } 00039 } 00040 00041 #endif /* PAYLOADBLOCK_H_ */
1.7.1