summaryrefslogtreecommitdiff
path: root/thirdparty/openxr/src/loader/manifest_file.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'thirdparty/openxr/src/loader/manifest_file.hpp')
-rw-r--r--thirdparty/openxr/src/loader/manifest_file.hpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/thirdparty/openxr/src/loader/manifest_file.hpp b/thirdparty/openxr/src/loader/manifest_file.hpp
index 0d04886d84..de0aab65c2 100644
--- a/thirdparty/openxr/src/loader/manifest_file.hpp
+++ b/thirdparty/openxr/src/loader/manifest_file.hpp
@@ -14,6 +14,7 @@
#include <memory>
#include <string>
#include <vector>
+#include <iosfwd>
#include <unordered_map>
namespace Json {
@@ -79,6 +80,8 @@ class RuntimeManifestFile : public ManifestFile {
std::vector<std::unique_ptr<RuntimeManifestFile>> &manifest_files);
};
+using LibraryLocator = bool (*)(const std::string &json_filename, const std::string &library_path, std::string &out_combined_path);
+
// ApiLayerManifestFile class -
// Responsible for finding and parsing API Layer-specific manifest files.
class ApiLayerManifestFile : public ManifestFile {
@@ -93,8 +96,19 @@ class ApiLayerManifestFile : public ManifestFile {
ApiLayerManifestFile(ManifestFileType type, const std::string &filename, const std::string &layer_name,
const std::string &description, const JsonVersion &api_version, const uint32_t &implementation_version,
const std::string &library_path);
+
+ static void CreateIfValid(ManifestFileType type, const std::string &filename, std::istream &json_stream,
+ LibraryLocator locate_library, std::vector<std::unique_ptr<ApiLayerManifestFile>> &manifest_files);
static void CreateIfValid(ManifestFileType type, const std::string &filename,
std::vector<std::unique_ptr<ApiLayerManifestFile>> &manifest_files);
+ /// @return false if we could not find the library.
+ static bool LocateLibraryRelativeToJson(const std::string &json_filename, const std::string &library_path,
+ std::string &out_combined_path);
+#ifdef XR_USE_PLATFORM_ANDROID
+ static bool LocateLibraryInAssets(const std::string &json_filename, const std::string &library_path,
+ std::string &out_combined_path);
+ static void AddManifestFilesAndroid(ManifestFileType type, std::vector<std::unique_ptr<ApiLayerManifestFile>> &manifest_files);
+#endif
JsonVersion _api_version;
std::string _layer_name;