stratosphere: all in on enum class CommandId

This commit is contained in:
Michael Scire 2019-06-27 23:34:26 -07:00
parent 67c0f4527e
commit 18ca8aaf5b
38 changed files with 665 additions and 658 deletions

View file

@ -18,14 +18,13 @@
#include <switch.h>
#include <stratosphere.hpp>
enum InformationCmd {
Information_Cmd_GetTitleId = 0,
Information_Cmd_AtmosphereGetProcessId = 65000,
Information_Cmd_AtmosphereHasCreatedTitle = 65001,
};
class InformationService final : public IServiceObject {
private:
enum class CommandId {
GetTitleId = 0,
AtmosphereGetProcessId = 65000,
AtmosphereHasLaunchedTitle = 65001,
};
private:
/* Actual commands. */
Result GetTitleId(Out<u64> tid, u64 pid);
@ -35,8 +34,8 @@ class InformationService final : public IServiceObject {
Result AtmosphereHasLaunchedTitle(Out<bool> out, u64 tid);
public:
DEFINE_SERVICE_DISPATCH_TABLE {
MakeServiceCommandMeta<Information_Cmd_GetTitleId, &InformationService::GetTitleId>(),
MakeServiceCommandMeta<Information_Cmd_AtmosphereGetProcessId, &InformationService::AtmosphereGetProcessId>(),
MakeServiceCommandMeta<Information_Cmd_AtmosphereHasCreatedTitle, &InformationService::AtmosphereHasLaunchedTitle>(),
MAKE_SERVICE_COMMAND_META(InformationService, GetTitleId),
MAKE_SERVICE_COMMAND_META(InformationService, AtmosphereGetProcessId),
MAKE_SERVICE_COMMAND_META(InformationService, AtmosphereHasLaunchedTitle),
};
};