00001 #ifndef BLOCK_H_ 00002 #define BLOCK_H_ 00003 00004 #include "BlockFlags.h" 00005 #include "NetworkFrame.h" 00006 00007 namespace dtn 00008 { 00009 namespace data 00010 { 00014 class Block 00015 { 00016 public: 00017 static const unsigned char BLOCK_TYPE = 0; 00018 00024 Block(Block *block); 00025 00030 Block(NetworkFrame *frame); 00031 00035 Block(const Block &k); 00036 00040 virtual ~Block(); 00041 00046 NetworkFrame& getFrame() const; 00047 00052 virtual unsigned char getType() const; 00053 00057 bool isProcessed() const; 00058 00063 BlockFlags getBlockFlags() const; 00064 00069 void setBlockFlags(BlockFlags flags); 00070 00075 unsigned int getHeaderSize() const; 00076 00081 NetworkFrame* dissociateNetworkFrame(); 00082 00086 void updateBlockSize(); 00087 00091 virtual bool isAdministrativeBlock() const; 00092 00093 protected: 00094 unsigned int getBodyIndex() const; 00095 bool m_processed; 00096 00097 private: 00098 NetworkFrame *m_frame; 00099 }; 00100 } 00101 } 00102 00103 #endif /*BLOCK_H_*/
1.5.6