aboutsummaryrefslogtreecommitdiff
path: root/zenserver/testing/httptest.cpp
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2021-09-13 10:07:45 +0200
committerStefan Boberg <[email protected]>2021-09-13 10:07:45 +0200
commit9e6ab12f40a9b626405bcdda9f51085e04064a42 (patch)
treeb5a71eb8d62cdee5e906a0464001e91ffc2e4f33 /zenserver/testing/httptest.cpp
parentImplemented generic CbPackage attachments filtering (diff)
downloadzen-9e6ab12f40a9b626405bcdda9f51085e04064a42.tar.xz
zen-9e6ab12f40a9b626405bcdda9f51085e04064a42.zip
Package filtering related test code
Diffstat (limited to 'zenserver/testing/httptest.cpp')
-rw-r--r--zenserver/testing/httptest.cpp42
1 files changed, 42 insertions, 0 deletions
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<IHttpPackageHandler>
+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<IoHash>& 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