--- a/servlib/bundling/BPQBlockProcessor.h Wed May 04 15:44:40 2011 +0100
+++ b/servlib/bundling/BPQBlockProcessor.h Fri May 27 18:33:25 2011 +0100
@@ -2,32 +2,54 @@
#define _BPQ_BLOCK_PROCESSOR_H_
#include "BlockProcessor.h"
+
+#include "BundleProtocol.h"
+#include "BlockInfo.h"
+#include "BPQBlock.h"
+#include "Bundle.h"
+
#include <oasys/util/StringBuffer.h>
+#include <oasys/util/Singleton.h>
namespace dtn {
+
/**
* Block processor implementation for the BPQ Extension Block
*/
-class BPQBlockProcessor : public BlockProcessor {
+class BPQBlockProcessor : public BlockProcessor,
+ public oasys::Singleton<BPQBlockProcessor> {
public:
/// Constructor
BPQBlockProcessor();
/// @{ Virtual from BlockProcessor
-
int consume(Bundle* bundle,
BlockInfo* block,
u_char* buf,
size_t len);
+ int prepare(const Bundle* bundle,
+ BlockInfoVec* xmit_blocks,
+ const BlockInfo* source,
+ const LinkRef& link,
+ list_owner_t list);
+
int generate(const Bundle* bundle,
BlockInfoVec* xmit_blocks,
BlockInfo* block,
const LinkRef& link,
bool last);
+/*
+ int finalize(const Bundle* bundle,
+ BlockInfoVec* xmit_blocks,
+ BlockInfo* block,
+ const LinkRef& link);
+*/
+ /// @}
- /// @}
+//private:
+// BPQBlock* create_block(const Bundle* const bundle) const;
};
} // namespace dtn