Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3)

Unified Diff: third_party/openvr/src/src/vrcommon/vrpathregistry_public.h

Issue 2754253003: Add OpenVR SDK to third_party (Closed)
Patch Set: feedback Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/openvr/src/src/vrcommon/vrpathregistry_public.h
diff --git a/third_party/openvr/src/src/vrcommon/vrpathregistry_public.h b/third_party/openvr/src/src/vrcommon/vrpathregistry_public.h
new file mode 100644
index 0000000000000000000000000000000000000000..1386c75cb5125f4d5845da824fda38e7eef02a1b
--- /dev/null
+++ b/third_party/openvr/src/src/vrcommon/vrpathregistry_public.h
@@ -0,0 +1,45 @@
+//========= Copyright Valve Corporation ============//
+#pragma once
+
+#include <string>
+#include <vector>
+#include <stdint.h>
+
+static const char *k_pchRuntimeOverrideVar = "VR_OVERRIDE";
+static const char *k_pchConfigOverrideVar = "VR_CONFIG_PATH";
+static const char *k_pchLogOverrideVar = "VR_LOG_PATH";
+
+class CVRPathRegistry_Public
+{
+public:
+ static std::string GetVRPathRegistryFilename();
+ static std::string GetOpenVRConfigPath();
+
+public:
+ CVRPathRegistry_Public();
+
+ /** Returns paths using the path registry and the provided override values. Pass NULL for any paths you don't care about.
+ * Returns false if the path registry could not be read. Valid paths might still be returned based on environment variables. */
+ static bool GetPaths( std::string *psRuntimePath, std::string *psConfigPath, std::string *psLogPath, const char *pchConfigPathOverride, const char *pchLogPathOverride, std::vector<std::string> *pvecExternalDrivers = NULL );
+
+ bool BLoadFromFile();
+ bool BSaveToFile() const;
+
+ bool ToJsonString( std::string &sJsonString );
+
+ // methods to get the current values
+ std::string GetRuntimePath() const;
+ std::string GetConfigPath() const;
+ std::string GetLogPath() const;
+
+protected:
+ typedef std::vector< std::string > StringVector_t;
+
+ // index 0 is the current setting
+ StringVector_t m_vecRuntimePath;
+ StringVector_t m_vecLogPath;
+ StringVector_t m_vecConfigPath;
+
+ // full list of external drivers
+ StringVector_t m_vecExternalDrivers;
+};
« no previous file with comments | « third_party/openvr/src/src/vrcommon/strtools_public.cpp ('k') | third_party/openvr/src/src/vrcommon/vrpathregistry_public.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698