aboutsummaryrefslogtreecommitdiffstats
path: root/libtransport/src/protocols/reassembly.h
diff options
context:
space:
mode:
authorMauro <you@example.com>2021-06-30 07:57:22 +0000
committerMauro Sardara <msardara@cisco.com>2021-07-06 16:16:04 +0000
commit08233d44a6cfde878d7e10bca38ae935ed1c8fd5 (patch)
tree7ecc534d55bdc7e8dd15ecab084720910bcdf4d9 /libtransport/src/protocols/reassembly.h
parent147ba39bed26887f5eba84757e2463ab8e370a9a (diff)
[HICN-713] Transport Library Major Refactoring 2
Co-authored-by: Luca Muscariello <muscariello@ieee.org> Co-authored-by: Michele Papalini <micpapal@cisco.com> Co-authored-by: Olivier Roques <oroques+fdio@cisco.com> Co-authored-by: Giulio Grassi <gigrassi@cisco.com> Signed-off-by: Mauro Sardara <msardara@cisco.com> Change-Id: I5b2c667bad66feb45abdb5effe22ed0f6c85d1c2
Diffstat (limited to 'libtransport/src/protocols/reassembly.h')
-rw-r--r--libtransport/src/protocols/reassembly.h33
1 files changed, 31 insertions, 2 deletions
diff --git a/libtransport/src/protocols/reassembly.h b/libtransport/src/protocols/reassembly.h
index 385122c53..e072ad123 100644
--- a/libtransport/src/protocols/reassembly.h
+++ b/libtransport/src/protocols/reassembly.h
@@ -46,19 +46,48 @@ class Reassembly {
virtual ~Reassembly() = default;
+ /**
+ * Hanle reassembly of content object.
+ */
virtual void reassemble(core::ContentObject &content_object) = 0;
+
+ /**
+ * Hanle reassembly of content object.
+ */
+ virtual void reassemble(utils::MemBuf &buffer, uint32_t suffix) = 0;
+
+ /**
+ * Handle reassembly of manifest
+ */
virtual void reassemble(
std::unique_ptr<core::ContentObjectManifest> &&manifest) = 0;
+
+ /**
+ * Reset reassembler for new round
+ */
virtual void reInitialize() = 0;
- virtual void setIndexer(Indexer *indexer) { index_manager_ = indexer; }
+
+ /**
+ * Use indexer to get next segments to reassembly
+ */
+ virtual void setIndexer(Indexer *indexer) { indexer_verifier_ = indexer; }
+
+ /**
+ * Decide if it is required to pass to application buffers whose verification
+ * has been delayed (e.g. because the manifest is missing). False by default.
+ */
+ virtual bool reassembleUnverified() { return false; }
protected:
+ /**
+ * Notify application there is data to read.
+ */
virtual void notifyApplication();
protected:
implementation::ConsumerSocket *reassembly_consumer_socket_;
TransportProtocol *transport_protocol_;
- Indexer *index_manager_;
+ Indexer *indexer_verifier_;
std::unique_ptr<utils::MemBuf> read_buffer_;
};