aboutsummaryrefslogtreecommitdiff
path: root/src/zenremotestore/partialblockrequestmode.cpp
diff options
context:
space:
mode:
authorLiam Mitchell <[email protected]>2026-03-09 18:40:40 -0700
committerLiam Mitchell <[email protected]>2026-03-09 18:40:40 -0700
commit97aa4e5c48305647a5d8f09da5f24bc1ce5540f3 (patch)
tree11062e72f4342aeb2f16ac19d6af20ac0e4acd78 /src/zenremotestore/partialblockrequestmode.cpp
parentMerge branch 'main' into lm/oidctoken-exe-path (diff)
parentupdated chunk–block analyser (#818) (diff)
downloadzen-97aa4e5c48305647a5d8f09da5f24bc1ce5540f3.tar.xz
zen-97aa4e5c48305647a5d8f09da5f24bc1ce5540f3.zip
Merge branch 'main' into lm/oidctoken-exe-path
Diffstat (limited to 'src/zenremotestore/partialblockrequestmode.cpp')
-rw-r--r--src/zenremotestore/partialblockrequestmode.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/zenremotestore/partialblockrequestmode.cpp b/src/zenremotestore/partialblockrequestmode.cpp
new file mode 100644
index 000000000..b3edf515b
--- /dev/null
+++ b/src/zenremotestore/partialblockrequestmode.cpp
@@ -0,0 +1,27 @@
+// Copyright Epic Games, Inc. All Rights Reserved.
+
+#include <zenremotestore/partialblockrequestmode.h>
+
+#include <zencore/string.h>
+
+namespace zen {
+
+EPartialBlockRequestMode
+PartialBlockRequestModeFromString(const std::string_view ModeString)
+{
+ switch (HashStringAsLowerDjb2(ModeString))
+ {
+ case HashStringDjb2("false"):
+ return EPartialBlockRequestMode::Off;
+ case HashStringDjb2("zencacheonly"):
+ return EPartialBlockRequestMode::ZenCacheOnly;
+ case HashStringDjb2("mixed"):
+ return EPartialBlockRequestMode::Mixed;
+ case HashStringDjb2("true"):
+ return EPartialBlockRequestMode::All;
+ default:
+ return EPartialBlockRequestMode::Invalid;
+ }
+}
+
+} // namespace zen