ReXGlue SDK
Toggle main menu visibility
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
>
35
#include <
rex/memory/mapped_ptr.h
>
36
#include <
rex/xam/title_lifecycle.h
>
37
#include <
rex/kernel/types/status.h
>
38
#include <
rex/memory/stream.h
>
39
#include <
rex/kernel/types/content.h
>
40
#include <
rex/result.h
>
41
#include <
rex/filesystem/xdbf.h
>
42
#include <
rex/utility.h
>
43
#include <
rex/title.h
>
44
45
namespace
rex::xam {
46
48
class
REX_XAM_API
XAMApplet
{
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
69
XAMKernelInterfaces
title_;
71
rex::memory::GuestMembase
membase_
;
72
u32 app_id_;
73
};
74
75
class
AppManager
{
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
rex::memory::GuestMembase
Definition
mapped_ptr.h:412
rex::xam::AppManager
Definition
app_manager.h:75
rex::xam::AppManager::DispatchMessageSync
REX_XAM_API rex::kernel::X_HRESULT DispatchMessageSync(u32 app_id, u32 message, u32 buffer_ptr, u32 buffer_length)
rex::xam::AppManager::RegisterApp
REX_XAM_API void RegisterApp(std::unique_ptr< XAMApplet > app)
rex::xam::AppManager::DispatchMessageAsync
REX_XAM_API rex::kernel::X_HRESULT DispatchMessageAsync(u32 app_id, u32 message, u32 buffer_ptr, u32 buffer_length)
rex::xam::XAMApplet::membase_
rex::memory::GuestMembase membase_
Definition
app_manager.h:71
rex::xam::XAMApplet::DispatchMessageSync
virtual rex::kernel::X_HRESULT DispatchMessageSync(u32 message, u32 buffer_ptr, u32 buffer_length)=0
rex::xam::XAMApplet::XAMApplet
XAMApplet(const XAMKernelInterfaces &title, u32 app_id)
content.h
Content package and language IDs.
mapped_ptr.h
memory.h
platform.h
Platform flags, packing macros and export markers.
REX_XAM_API
#define REX_XAM_API
Definition
platform.h:314
result.h
status.h
stream.h
Bit, byte and ring buffer streams over memory.
rex::xam::XAMKernelInterfaces
Definition
title_lifecycle.h:50
title.h
title_lifecycle.h
Kernel interfaces and lifecycle calls XAM receives for a title.
types.h
Integer types, byte order wrappers and size literals.
utility.h
Move only function, const propagating pointer and scope guard.
xdbf.h
rex
xam
app_manager.h
Generated by
1.18.0