ReXGlue SDK
Loading...
Searching...
No Matches
app_manager.h
Go to the documentation of this file.
1
17
18#pragma once
19
20#include <cstddef>
21#include <memory>
22#include <unordered_map>
23#include <vector>
24#include <format>
25#include <string>
26#include <filesystem>
27#include <optional>
28#include <string_view>
29#include <functional>
30#include <span>
31
32#include <rex/platform.h>
33#include <rex/types.h>
34#include <rex/memory.h>
38#include <rex/memory/stream.h>
40#include <rex/result.h>
41#include <rex/filesystem/xdbf.h>
42#include <rex/utility.h>
43#include <rex/title.h>
44
45namespace rex::xam {
46
49 public:
50 u32 GetAppID() const { return app_id_; }
51
57 virtual rex::kernel::X_HRESULT DispatchMessageSync(u32 message, u32 buffer_ptr,
58 u32 buffer_length) = 0;
59
60 virtual ~XAMApplet() = default;
61
62 protected:
67 XAMApplet(const XAMKernelInterfaces& title, u32 app_id);
68
72 u32 app_id_;
73};
74
76 public:
82 REX_XAM_API void RegisterApp(std::unique_ptr<XAMApplet> app);
83
91 REX_XAM_API rex::kernel::X_HRESULT DispatchMessageSync(u32 app_id, u32 message, u32 buffer_ptr,
92 u32 buffer_length);
101 REX_XAM_API rex::kernel::X_HRESULT DispatchMessageAsync(u32 app_id, u32 message, u32 buffer_ptr,
102 u32 buffer_length);
103
104 private:
105 std::vector<std::unique_ptr<XAMApplet>> apps_;
106 std::unordered_map<u32, XAMApplet*> app_lookup_;
107};
108
109} // namespace rex::xam
Definition mapped_ptr.h:412
Definition app_manager.h:75
REX_XAM_API rex::kernel::X_HRESULT DispatchMessageSync(u32 app_id, u32 message, u32 buffer_ptr, u32 buffer_length)
REX_XAM_API void RegisterApp(std::unique_ptr< XAMApplet > app)
REX_XAM_API rex::kernel::X_HRESULT DispatchMessageAsync(u32 app_id, u32 message, u32 buffer_ptr, u32 buffer_length)
rex::memory::GuestMembase membase_
Definition app_manager.h:71
virtual rex::kernel::X_HRESULT DispatchMessageSync(u32 message, u32 buffer_ptr, u32 buffer_length)=0
XAMApplet(const XAMKernelInterfaces &title, u32 app_id)
Content package and language IDs.
Platform flags, packing macros and export markers.
#define REX_XAM_API
Definition platform.h:314
Bit, byte and ring buffer streams over memory.
Definition title_lifecycle.h:50
Kernel interfaces and lifecycle calls XAM receives for a title.
Integer types, byte order wrappers and size literals.
Move only function, const propagating pointer and scope guard.