// Copyright (c) Microsoft. All rights reserved. #ifndef BONDSPLICER_HPP #define BONDSPLICER_HPP #include "pal/PAL.hpp" #include "DataPackage.hpp" #include #include namespace ARIASDK_NS_BEGIN { class BondSplicer { protected: struct Span { size_t offset, length; }; struct PackageInfo { std::string tenantToken; Span header; std::list records; }; protected: std::vector m_buffer; std::vector m_packages; int32_t m_requestRetryCount; size_t m_overheadEstimate; public: BondSplicer(); BondSplicer(BondSplicer const&) = delete; BondSplicer& operator=(BondSplicer const&) = delete; size_t addDataPackage(std::string const& tenantToken, DataPackage const& dataPackage); void addRecord(size_t dataPackageIndex, std::vector const& recordBlob); size_t getSizeEstimate() const; std::vector splice() const; void clear(); }; } ARIASDK_NS_END #endif