aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/vfs/vfsservice.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenserver/vfs/vfsservice.h')
-rw-r--r--src/zenserver/vfs/vfsservice.h52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/zenserver/vfs/vfsservice.h b/src/zenserver/vfs/vfsservice.h
new file mode 100644
index 000000000..9510cfcda
--- /dev/null
+++ b/src/zenserver/vfs/vfsservice.h
@@ -0,0 +1,52 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+#pragma once
+
+#include <zencore/refcount.h>
+#include <zenhttp/httpserver.h>
+#include <zenvfs/vfs.h>
+
+#include <memory>
+
+namespace zen {
+
+class ProjectStore;
+class ZenCacheStore;
+
+/** Virtual File System service
+
+ Implements support for exposing data via a virtual file system interface. Currently
+ this is primarily used to surface various data stored in the local storage service
+ to users for debugging and exploration purposes.
+
+ Currently, it surfaces information from the structured cache service and from the
+ project store.
+
+ */
+
+class VfsService : public HttpService
+{
+public:
+ VfsService();
+ ~VfsService();
+
+ void Mount(std::string_view MountPoint);
+ void Unmount();
+
+ void AddService(Ref<ProjectStore>&&);
+ void AddService(Ref<ZenCacheStore>&&);
+
+protected:
+ virtual const char* BaseUri() const override;
+ virtual void HandleRequest(HttpServerRequest& HttpServiceRequest) override;
+
+private:
+ struct Impl;
+ Impl* m_Impl = nullptr;
+
+ HttpRequestRouter m_Router;
+
+ friend struct VfsServiceDataSource;
+};
+
+} // namespace zen