Panda3DS/include/services/service_manager.hpp
2022-09-18 03:09:35 +03:00

28 lines
No EOL
657 B
C++

#pragma once
#include <array>
#include "helpers.hpp"
#include "memory.hpp"
#include "services/apt.hpp"
#include "services/hid.hpp"
#include "services/fs.hpp"
class ServiceManager {
std::array<u32, 16>& regs;
Memory& mem;
APTService apt;
HIDService hid;
FSService fs;
// "srv:" commands
void getServiceHandle(u32 messagePointer);
void registerClient(u32 messagePointer);
public:
ServiceManager(std::array<u32, 16>& regs, Memory& mem);
void reset();
void handleSyncRequest(u32 messagePointer);
// Forward a SendSyncRequest IPC message to the service with the respective handle
void sendCommandToService(u32 messagePointer, Handle handle);
};