From 9e6ab12f40a9b626405bcdda9f51085e04064a42 Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Mon, 13 Sep 2021 10:07:45 +0200 Subject: Package filtering related test code --- zenserver/testing/httptest.cpp | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'zenserver/testing/httptest.cpp') diff --git a/zenserver/testing/httptest.cpp b/zenserver/testing/httptest.cpp index 653f76046..d1955ca27 100644 --- a/zenserver/testing/httptest.cpp +++ b/zenserver/testing/httptest.cpp @@ -36,4 +36,46 @@ HttpTestingService::HandleRequest(HttpServerRequest& Request) m_Router.HandleRequest(Request); } +////////////////////////////////////////////////////////////////////////// + +Ref +HttpTestingService::HandlePackageRequest(HttpServerRequest& HttpServiceRequest) +{ + return new PackageHandler(HttpServiceRequest); +} + +HttpTestingService::PackageHandler::PackageHandler(const HttpServerRequest& Request) +{ + ZEN_UNUSED(Request); +} + +HttpTestingService::PackageHandler::~PackageHandler() +{ +} + +void +HttpTestingService::PackageHandler::FilterOffer(std::vector& OfferCids) +{ + ZEN_UNUSED(OfferCids); + // No-op + return; +} +void +HttpTestingService::PackageHandler::OnBeginChunks() +{ +} + +zen::IoBuffer +HttpTestingService::PackageHandler::CreateTarget(const IoHash& Cid, uint64_t StorageSize) +{ + ZEN_UNUSED(Cid, StorageSize); + + return {}; +} + +void +HttpTestingService::PackageHandler::OnEndChunks() +{ +} + } // namespace zen -- cgit v1.2.3