summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/glue/manager.h
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-06-25 01:17:13 +0200
committerZach Hilman <zachhilman@gmail.com>2019-06-25 01:17:13 +0200
commit5f8d2a2044842a0d0674d178e7bb98be2ee65be2 (patch)
tree6b7e462a839240ca305a22d82c9196af4609979f /src/core/hle/service/glue/manager.h
parentregistered_cache: Add getter to determine source slot in content provider union (diff)
downloadyuzu-5f8d2a2044842a0d0674d178e7bb98be2ee65be2.tar
yuzu-5f8d2a2044842a0d0674d178e7bb98be2ee65be2.tar.gz
yuzu-5f8d2a2044842a0d0674d178e7bb98be2ee65be2.tar.bz2
yuzu-5f8d2a2044842a0d0674d178e7bb98be2ee65be2.tar.lz
yuzu-5f8d2a2044842a0d0674d178e7bb98be2ee65be2.tar.xz
yuzu-5f8d2a2044842a0d0674d178e7bb98be2ee65be2.tar.zst
yuzu-5f8d2a2044842a0d0674d178e7bb98be2ee65be2.zip
Diffstat (limited to 'src/core/hle/service/glue/manager.h')
-rw-r--r--src/core/hle/service/glue/manager.h46
1 files changed, 46 insertions, 0 deletions
diff --git a/src/core/hle/service/glue/manager.h b/src/core/hle/service/glue/manager.h
new file mode 100644
index 000000000..561ebf4e0
--- /dev/null
+++ b/src/core/hle/service/glue/manager.h
@@ -0,0 +1,46 @@
+// Copyright 2019 yuzu emulator team
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include "core/file_sys/control_metadata.h"
+#include "core/file_sys/romfs_factory.h"
+#include "core/hle/result.h"
+
+namespace Service::Glue {
+
+struct ApplicationLaunchProperty {
+ u64 title_id;
+ u32 version;
+ FileSys::StorageId base_game_storage_id;
+ FileSys::StorageId update_storage_id;
+ INSERT_PADDING_BYTES(0x2);
+};
+static_assert(sizeof(ApplicationLaunchProperty) == 0x10,
+ "ApplicationLaunchProperty has incorrect size.");
+
+class ARPManager {
+public:
+ ARPManager();
+ ~ARPManager();
+
+ ResultVal<ApplicationLaunchProperty> GetLaunchProperty(u64 title_id) const;
+ ResultVal<std::vector<u8>> GetControlProperty(u64 title_id) const;
+
+ ResultCode Register(u64 title_id, ApplicationLaunchProperty launch, std::vector<u8> control);
+
+ ResultCode Unregister(u64 title_id);
+
+ void ResetAll();
+
+private:
+ struct MapEntry {
+ ApplicationLaunchProperty launch;
+ std::vector<u8> control;
+ };
+
+ std::map<u64, MapEntry> entries;
+};
+
+} // namespace Service::Glue