00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017 #ifndef _PS_BLOCK_PROCESSOR_H_
00018 #define _PS_BLOCK_PROCESSOR_H_
00019
00020 #ifdef BSP_ENABLED
00021
00022 #include "bundling/BlockProcessor.h"
00023 #include "Ciphersuite.h"
00024
00025 namespace dtn {
00026
00030 class PS_BlockProcessor : public BlockProcessor {
00031 public:
00033 PS_BlockProcessor();
00034
00036
00052 virtual int consume(Bundle* bundle,
00053 BlockInfo* block,
00054 u_char* buf,
00055 size_t len);
00056
00061 virtual int reload_post_process(Bundle* bundle,
00062 BlockInfoVec* block_list,
00063 BlockInfo* block);
00064
00071 virtual bool validate(const Bundle* bundle,
00072 BlockInfoVec* block_list,
00073 BlockInfo* block,
00074 status_report_reason_t* reception_reason,
00075 status_report_reason_t* deletion_reason);
00076
00085 virtual int prepare(const Bundle* bundle,
00086 BlockInfoVec* xmit_blocks,
00087 const BlockInfo* source,
00088 const LinkRef& link,
00089 list_owner_t list);
00090
00099 virtual int generate(const Bundle* bundle,
00100 BlockInfoVec* xmit_blocks,
00101 BlockInfo* block,
00102 const LinkRef& link,
00103 bool last);
00104
00112 virtual int finalize(const Bundle* bundle,
00113 BlockInfoVec* xmit_blocks,
00114 BlockInfo* block,
00115 const LinkRef& link);
00117 };
00118
00119 }
00120
00121 #endif
00122
00123 #endif