sf: implement service framework enough for ro to work.
This completely re-does the whole interface for ipc servers.
This commit is contained in:
1 parent
bd341d5c00
commit
f4dcd1db9b
47 files changed
+3545
-166
No files matched your search
@@ -25,7 +25,7 @@ namespace sts::sm::mitm {
|
||||
Result InstallMitm(Handle *out_port, Handle *out_query, ServiceName name);
|
||||
Result UninstallMitm(ServiceName name);
|
||||
Result DeclareFutureMitm(ServiceName name);
|
||||
Result AcknowledgeSession(Service *out_service, u64 *out_pid, ncm::TitleId *out_tid, ServiceName name);
|
||||
Result AcknowledgeSession(Service *out_service, os::ProcessId *out_pid, ncm::TitleId *out_tid, ServiceName name);
|
||||
Result HasMitm(bool *out, ServiceName name);
|
||||
Result WaitMitm(ServiceName name);
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
#include <switch.h>
|
||||
#include "../defines.hpp"
|
||||
#include "../results.hpp"
|
||||
#include "../os.hpp"
|
||||
|
||||
namespace sts::sm {
|
||||
|
||||
@@ -60,18 +61,15 @@ namespace sts::sm {
|
||||
/* For Debug Monitor extensions. */
|
||||
struct ServiceRecord {
|
||||
ServiceName service;
|
||||
u64 owner_pid;
|
||||
os::ProcessId owner_pid;
|
||||
u64 max_sessions;
|
||||
u64 mitm_pid;
|
||||
u64 mitm_waiting_ack_pid;
|
||||
os::ProcessId mitm_pid;
|
||||
os::ProcessId mitm_waiting_ack_pid;
|
||||
bool is_light;
|
||||
bool mitm_waiting_ack;
|
||||
};
|
||||
static_assert(sizeof(ServiceRecord) == 0x30, "ServiceRecord definition!");
|
||||
|
||||
/* For process validation. */
|
||||
static constexpr u64 InvalidProcessId = static_cast<u64>(-1ull);
|
||||
|
||||
/* Utility, for scoped access to libnx services. */
|
||||
template<Result Initializer(), void Finalizer()>
|
||||
class ScopedServiceHolder {
|
||||
|
||||
Reference in new issue
Block a user