mirror of
https://github.com/PabloMK7/citra.git
synced 2025-09-11 21:30:05 +00:00
hle: Eliminate need to specify command headers for IPC. (#6678)
This commit is contained in:
parent
0bedb28bdc
commit
e043caac27
96 changed files with 2691 additions and 2707 deletions
|
@ -26,7 +26,7 @@ Module::Interface::Interface(std::shared_ptr<Module> frd, const char* name, u32
|
|||
Module::Interface::~Interface() = default;
|
||||
|
||||
void Module::Interface::GetMyPresence(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x08, 0, 0);
|
||||
IPC::RequestParser rp(ctx);
|
||||
|
||||
std::vector<u8> buffer(sizeof(MyPresence));
|
||||
std::memcpy(buffer.data(), &frd->my_presence, buffer.size());
|
||||
|
@ -39,7 +39,7 @@ void Module::Interface::GetMyPresence(Kernel::HLERequestContext& ctx) {
|
|||
}
|
||||
|
||||
void Module::Interface::GetFriendKeyList(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x11, 2, 0);
|
||||
IPC::RequestParser rp(ctx);
|
||||
const u32 unknown = rp.Pop<u32>();
|
||||
const u32 frd_count = rp.Pop<u32>();
|
||||
|
||||
|
@ -54,7 +54,7 @@ void Module::Interface::GetFriendKeyList(Kernel::HLERequestContext& ctx) {
|
|||
}
|
||||
|
||||
void Module::Interface::GetFriendProfile(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x15, 1, 2);
|
||||
IPC::RequestParser rp(ctx);
|
||||
const u32 count = rp.Pop<u32>();
|
||||
const std::vector<u8> frd_keys = rp.PopStaticBuffer();
|
||||
ASSERT(frd_keys.size() == count * sizeof(FriendKey));
|
||||
|
@ -69,7 +69,7 @@ void Module::Interface::GetFriendProfile(Kernel::HLERequestContext& ctx) {
|
|||
}
|
||||
|
||||
void Module::Interface::GetFriendAttributeFlags(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x17, 1, 2);
|
||||
IPC::RequestParser rp(ctx);
|
||||
const u32 count = rp.Pop<u32>();
|
||||
const std::vector<u8> frd_keys = rp.PopStaticBuffer();
|
||||
ASSERT(frd_keys.size() == count * sizeof(FriendKey));
|
||||
|
@ -84,7 +84,7 @@ void Module::Interface::GetFriendAttributeFlags(Kernel::HLERequestContext& ctx)
|
|||
}
|
||||
|
||||
void Module::Interface::GetMyFriendKey(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x5, 0, 0);
|
||||
IPC::RequestParser rp(ctx);
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(5, 0);
|
||||
rb.Push(RESULT_SUCCESS);
|
||||
rb.PushRaw(frd->my_friend_key);
|
||||
|
@ -93,7 +93,7 @@ void Module::Interface::GetMyFriendKey(Kernel::HLERequestContext& ctx) {
|
|||
}
|
||||
|
||||
void Module::Interface::GetMyScreenName(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x9, 0, 0);
|
||||
IPC::RequestParser rp(ctx);
|
||||
IPC::RequestBuilder rb = rp.MakeBuilder(7, 0);
|
||||
|
||||
struct ScreenName {
|
||||
|
@ -119,7 +119,7 @@ void Module::Interface::UnscrambleLocalFriendCode(Kernel::HLERequestContext& ctx
|
|||
const std::size_t scrambled_friend_code_size = 12;
|
||||
const std::size_t friend_code_size = 8;
|
||||
|
||||
IPC::RequestParser rp(ctx, 0x1C, 1, 2);
|
||||
IPC::RequestParser rp(ctx);
|
||||
const u32 friend_code_count = rp.Pop<u32>();
|
||||
const std::vector<u8> scrambled_friend_codes = rp.PopStaticBuffer();
|
||||
ASSERT_MSG(scrambled_friend_codes.size() == (friend_code_count * scrambled_friend_code_size),
|
||||
|
@ -147,7 +147,7 @@ void Module::Interface::UnscrambleLocalFriendCode(Kernel::HLERequestContext& ctx
|
|||
}
|
||||
|
||||
void Module::Interface::SetClientSdkVersion(Kernel::HLERequestContext& ctx) {
|
||||
IPC::RequestParser rp(ctx, 0x32, 1, 2);
|
||||
IPC::RequestParser rp(ctx);
|
||||
u32 version = rp.Pop<u32>();
|
||||
rp.PopPID();
|
||||
|
||||
|
|
|
@ -11,59 +11,59 @@ namespace Service::FRD {
|
|||
|
||||
FRD_A::FRD_A(std::shared_ptr<Module> frd) : Module::Interface(std::move(frd), "frd:a", 8) {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0x00010000, nullptr, "HasLoggedIn"},
|
||||
{0x00020000, nullptr, "IsOnline"},
|
||||
{0x00030000, nullptr, "Login"},
|
||||
{0x00040000, nullptr, "Logout"},
|
||||
{0x00050000, &FRD_A::GetMyFriendKey, "GetMyFriendKey"},
|
||||
{0x00060000, nullptr, "GetMyPreference"},
|
||||
{0x00070000, nullptr, "GetMyProfile"},
|
||||
{0x00080000, &FRD_A::GetMyPresence, "GetMyPresence"},
|
||||
{0x00090000, &FRD_A::GetMyScreenName, "GetMyScreenName"},
|
||||
{0x000A0000, nullptr, "GetMyMii"},
|
||||
{0x000B0000, nullptr, "GetMyLocalAccountId"},
|
||||
{0x000C0000, nullptr, "GetMyPlayingGame"},
|
||||
{0x000D0000, nullptr, "GetMyFavoriteGame"},
|
||||
{0x000E0000, nullptr, "GetMyNcPrincipalId"},
|
||||
{0x000F0000, nullptr, "GetMyComment"},
|
||||
{0x00100040, nullptr, "GetMyPassword"},
|
||||
{0x00110080, &FRD_A::GetFriendKeyList, "GetFriendKeyList"},
|
||||
{0x00120042, nullptr, "GetFriendPresence"},
|
||||
{0x00130142, nullptr, "GetFriendScreenName"},
|
||||
{0x00140044, nullptr, "GetFriendMii"},
|
||||
{0x00150042, &FRD_A::GetFriendProfile, "GetFriendProfile"},
|
||||
{0x00160042, nullptr, "GetFriendRelationship"},
|
||||
{0x00170042, &FRD_A::GetFriendAttributeFlags, "GetFriendAttributeFlags"},
|
||||
{0x00180044, nullptr, "GetFriendPlayingGame"},
|
||||
{0x00190042, nullptr, "GetFriendFavoriteGame"},
|
||||
{0x001A00C4, nullptr, "GetFriendInfo"},
|
||||
{0x001B0080, nullptr, "IsIncludedInFriendList"},
|
||||
{0x001C0042, &FRD_A::UnscrambleLocalFriendCode, "UnscrambleLocalFriendCode"},
|
||||
{0x001D0002, nullptr, "UpdateGameModeDescription"},
|
||||
{0x001E02C2, nullptr, "UpdateGameMode"},
|
||||
{0x001F0042, nullptr, "SendInvitation"},
|
||||
{0x00200002, nullptr, "AttachToEventNotification"},
|
||||
{0x00210040, nullptr, "SetNotificationMask"},
|
||||
{0x00220040, nullptr, "GetEventNotification"},
|
||||
{0x00230000, nullptr, "GetLastResponseResult"},
|
||||
{0x00240040, nullptr, "PrincipalIdToFriendCode"},
|
||||
{0x00250080, nullptr, "FriendCodeToPrincipalId"},
|
||||
{0x00260080, nullptr, "IsValidFriendCode"},
|
||||
{0x00270040, nullptr, "ResultToErrorCode"},
|
||||
{0x00280244, nullptr, "RequestGameAuthentication"},
|
||||
{0x00290000, nullptr, "GetGameAuthenticationData"},
|
||||
{0x002A0204, nullptr, "RequestServiceLocator"},
|
||||
{0x002B0000, nullptr, "GetServiceLocatorData"},
|
||||
{0x002C0002, nullptr, "DetectNatProperties"},
|
||||
{0x002D0000, nullptr, "GetNatProperties"},
|
||||
{0x002E0000, nullptr, "GetServerTimeInterval"},
|
||||
{0x002F0040, nullptr, "AllowHalfAwake"},
|
||||
{0x00300000, nullptr, "GetServerTypes"},
|
||||
{0x00310082, nullptr, "GetFriendComment"},
|
||||
{0x00320042, &FRD_A::SetClientSdkVersion, "SetClientSdkVersion"},
|
||||
{0x00330000, nullptr, "GetMyApproachContext"},
|
||||
{0x00340046, nullptr, "AddFriendWithApproach"},
|
||||
{0x00350082, nullptr, "DecryptApproachContext"},
|
||||
{0x0001, nullptr, "HasLoggedIn"},
|
||||
{0x0002, nullptr, "IsOnline"},
|
||||
{0x0003, nullptr, "Login"},
|
||||
{0x0004, nullptr, "Logout"},
|
||||
{0x0005, &FRD_A::GetMyFriendKey, "GetMyFriendKey"},
|
||||
{0x0006, nullptr, "GetMyPreference"},
|
||||
{0x0007, nullptr, "GetMyProfile"},
|
||||
{0x0008, &FRD_A::GetMyPresence, "GetMyPresence"},
|
||||
{0x0009, &FRD_A::GetMyScreenName, "GetMyScreenName"},
|
||||
{0x000A, nullptr, "GetMyMii"},
|
||||
{0x000B, nullptr, "GetMyLocalAccountId"},
|
||||
{0x000C, nullptr, "GetMyPlayingGame"},
|
||||
{0x000D, nullptr, "GetMyFavoriteGame"},
|
||||
{0x000E, nullptr, "GetMyNcPrincipalId"},
|
||||
{0x000F, nullptr, "GetMyComment"},
|
||||
{0x0010, nullptr, "GetMyPassword"},
|
||||
{0x0011, &FRD_A::GetFriendKeyList, "GetFriendKeyList"},
|
||||
{0x0012, nullptr, "GetFriendPresence"},
|
||||
{0x0013, nullptr, "GetFriendScreenName"},
|
||||
{0x0014, nullptr, "GetFriendMii"},
|
||||
{0x0015, &FRD_A::GetFriendProfile, "GetFriendProfile"},
|
||||
{0x0016, nullptr, "GetFriendRelationship"},
|
||||
{0x0017, &FRD_A::GetFriendAttributeFlags, "GetFriendAttributeFlags"},
|
||||
{0x0018, nullptr, "GetFriendPlayingGame"},
|
||||
{0x0019, nullptr, "GetFriendFavoriteGame"},
|
||||
{0x001A, nullptr, "GetFriendInfo"},
|
||||
{0x001B, nullptr, "IsIncludedInFriendList"},
|
||||
{0x001C, &FRD_A::UnscrambleLocalFriendCode, "UnscrambleLocalFriendCode"},
|
||||
{0x001D, nullptr, "UpdateGameModeDescription"},
|
||||
{0x001E, nullptr, "UpdateGameMode"},
|
||||
{0x001F, nullptr, "SendInvitation"},
|
||||
{0x0020, nullptr, "AttachToEventNotification"},
|
||||
{0x0021, nullptr, "SetNotificationMask"},
|
||||
{0x0022, nullptr, "GetEventNotification"},
|
||||
{0x0023, nullptr, "GetLastResponseResult"},
|
||||
{0x0024, nullptr, "PrincipalIdToFriendCode"},
|
||||
{0x0025, nullptr, "FriendCodeToPrincipalId"},
|
||||
{0x0026, nullptr, "IsValidFriendCode"},
|
||||
{0x0027, nullptr, "ResultToErrorCode"},
|
||||
{0x0028, nullptr, "RequestGameAuthentication"},
|
||||
{0x0029, nullptr, "GetGameAuthenticationData"},
|
||||
{0x002A, nullptr, "RequestServiceLocator"},
|
||||
{0x002B, nullptr, "GetServiceLocatorData"},
|
||||
{0x002C, nullptr, "DetectNatProperties"},
|
||||
{0x002D, nullptr, "GetNatProperties"},
|
||||
{0x002E, nullptr, "GetServerTimeInterval"},
|
||||
{0x002F, nullptr, "AllowHalfAwake"},
|
||||
{0x0030, nullptr, "GetServerTypes"},
|
||||
{0x0031, nullptr, "GetFriendComment"},
|
||||
{0x0032, &FRD_A::SetClientSdkVersion, "SetClientSdkVersion"},
|
||||
{0x0033, nullptr, "GetMyApproachContext"},
|
||||
{0x0034, nullptr, "AddFriendWithApproach"},
|
||||
{0x0035, nullptr, "DecryptApproachContext"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
|
|
@ -11,59 +11,59 @@ namespace Service::FRD {
|
|||
|
||||
FRD_U::FRD_U(std::shared_ptr<Module> frd) : Module::Interface(std::move(frd), "frd:u", 8) {
|
||||
static const FunctionInfo functions[] = {
|
||||
{0x00010000, nullptr, "HasLoggedIn"},
|
||||
{0x00020000, nullptr, "IsOnline"},
|
||||
{0x00030000, nullptr, "Login"},
|
||||
{0x00040000, nullptr, "Logout"},
|
||||
{0x00050000, &FRD_U::GetMyFriendKey, "GetMyFriendKey"},
|
||||
{0x00060000, nullptr, "GetMyPreference"},
|
||||
{0x00070000, nullptr, "GetMyProfile"},
|
||||
{0x00080000, &FRD_U::GetMyPresence, "GetMyPresence"},
|
||||
{0x00090000, &FRD_U::GetMyScreenName, "GetMyScreenName"},
|
||||
{0x000A0000, nullptr, "GetMyMii"},
|
||||
{0x000B0000, nullptr, "GetMyLocalAccountId"},
|
||||
{0x000C0000, nullptr, "GetMyPlayingGame"},
|
||||
{0x000D0000, nullptr, "GetMyFavoriteGame"},
|
||||
{0x000E0000, nullptr, "GetMyNcPrincipalId"},
|
||||
{0x000F0000, nullptr, "GetMyComment"},
|
||||
{0x00100040, nullptr, "GetMyPassword"},
|
||||
{0x00110080, &FRD_U::GetFriendKeyList, "GetFriendKeyList"},
|
||||
{0x00120042, nullptr, "GetFriendPresence"},
|
||||
{0x00130142, nullptr, "GetFriendScreenName"},
|
||||
{0x00140044, nullptr, "GetFriendMii"},
|
||||
{0x00150042, &FRD_U::GetFriendProfile, "GetFriendProfile"},
|
||||
{0x00160042, nullptr, "GetFriendRelationship"},
|
||||
{0x00170042, &FRD_U::GetFriendAttributeFlags, "GetFriendAttributeFlags"},
|
||||
{0x00180044, nullptr, "GetFriendPlayingGame"},
|
||||
{0x00190042, nullptr, "GetFriendFavoriteGame"},
|
||||
{0x001A00C4, nullptr, "GetFriendInfo"},
|
||||
{0x001B0080, nullptr, "IsIncludedInFriendList"},
|
||||
{0x001C0042, &FRD_U::UnscrambleLocalFriendCode, "UnscrambleLocalFriendCode"},
|
||||
{0x001D0002, nullptr, "UpdateGameModeDescription"},
|
||||
{0x001E02C2, nullptr, "UpdateGameMode"},
|
||||
{0x001F0042, nullptr, "SendInvitation"},
|
||||
{0x00200002, nullptr, "AttachToEventNotification"},
|
||||
{0x00210040, nullptr, "SetNotificationMask"},
|
||||
{0x00220040, nullptr, "GetEventNotification"},
|
||||
{0x00230000, nullptr, "GetLastResponseResult"},
|
||||
{0x00240040, nullptr, "PrincipalIdToFriendCode"},
|
||||
{0x00250080, nullptr, "FriendCodeToPrincipalId"},
|
||||
{0x00260080, nullptr, "IsValidFriendCode"},
|
||||
{0x00270040, nullptr, "ResultToErrorCode"},
|
||||
{0x00280244, nullptr, "RequestGameAuthentication"},
|
||||
{0x00290000, nullptr, "GetGameAuthenticationData"},
|
||||
{0x002A0204, nullptr, "RequestServiceLocator"},
|
||||
{0x002B0000, nullptr, "GetServiceLocatorData"},
|
||||
{0x002C0002, nullptr, "DetectNatProperties"},
|
||||
{0x002D0000, nullptr, "GetNatProperties"},
|
||||
{0x002E0000, nullptr, "GetServerTimeInterval"},
|
||||
{0x002F0040, nullptr, "AllowHalfAwake"},
|
||||
{0x00300000, nullptr, "GetServerTypes"},
|
||||
{0x00310082, nullptr, "GetFriendComment"},
|
||||
{0x00320042, &FRD_U::SetClientSdkVersion, "SetClientSdkVersion"},
|
||||
{0x00330000, nullptr, "GetMyApproachContext"},
|
||||
{0x00340046, nullptr, "AddFriendWithApproach"},
|
||||
{0x00350082, nullptr, "DecryptApproachContext"},
|
||||
{0x0001, nullptr, "HasLoggedIn"},
|
||||
{0x0002, nullptr, "IsOnline"},
|
||||
{0x0003, nullptr, "Login"},
|
||||
{0x0004, nullptr, "Logout"},
|
||||
{0x0005, &FRD_U::GetMyFriendKey, "GetMyFriendKey"},
|
||||
{0x0006, nullptr, "GetMyPreference"},
|
||||
{0x0007, nullptr, "GetMyProfile"},
|
||||
{0x0008, &FRD_U::GetMyPresence, "GetMyPresence"},
|
||||
{0x0009, &FRD_U::GetMyScreenName, "GetMyScreenName"},
|
||||
{0x000A, nullptr, "GetMyMii"},
|
||||
{0x000B, nullptr, "GetMyLocalAccountId"},
|
||||
{0x000C, nullptr, "GetMyPlayingGame"},
|
||||
{0x000D, nullptr, "GetMyFavoriteGame"},
|
||||
{0x000E, nullptr, "GetMyNcPrincipalId"},
|
||||
{0x000F, nullptr, "GetMyComment"},
|
||||
{0x0010, nullptr, "GetMyPassword"},
|
||||
{0x0011, &FRD_U::GetFriendKeyList, "GetFriendKeyList"},
|
||||
{0x0012, nullptr, "GetFriendPresence"},
|
||||
{0x0013, nullptr, "GetFriendScreenName"},
|
||||
{0x0014, nullptr, "GetFriendMii"},
|
||||
{0x0015, &FRD_U::GetFriendProfile, "GetFriendProfile"},
|
||||
{0x0016, nullptr, "GetFriendRelationship"},
|
||||
{0x0017, &FRD_U::GetFriendAttributeFlags, "GetFriendAttributeFlags"},
|
||||
{0x0018, nullptr, "GetFriendPlayingGame"},
|
||||
{0x0019, nullptr, "GetFriendFavoriteGame"},
|
||||
{0x001A, nullptr, "GetFriendInfo"},
|
||||
{0x001B, nullptr, "IsIncludedInFriendList"},
|
||||
{0x001C, &FRD_U::UnscrambleLocalFriendCode, "UnscrambleLocalFriendCode"},
|
||||
{0x001D, nullptr, "UpdateGameModeDescription"},
|
||||
{0x001E, nullptr, "UpdateGameMode"},
|
||||
{0x001F, nullptr, "SendInvitation"},
|
||||
{0x0020, nullptr, "AttachToEventNotification"},
|
||||
{0x0021, nullptr, "SetNotificationMask"},
|
||||
{0x0022, nullptr, "GetEventNotification"},
|
||||
{0x0023, nullptr, "GetLastResponseResult"},
|
||||
{0x0024, nullptr, "PrincipalIdToFriendCode"},
|
||||
{0x0025, nullptr, "FriendCodeToPrincipalId"},
|
||||
{0x0026, nullptr, "IsValidFriendCode"},
|
||||
{0x0027, nullptr, "ResultToErrorCode"},
|
||||
{0x0028, nullptr, "RequestGameAuthentication"},
|
||||
{0x0029, nullptr, "GetGameAuthenticationData"},
|
||||
{0x002A, nullptr, "RequestServiceLocator"},
|
||||
{0x002B, nullptr, "GetServiceLocatorData"},
|
||||
{0x002C, nullptr, "DetectNatProperties"},
|
||||
{0x002D, nullptr, "GetNatProperties"},
|
||||
{0x002E, nullptr, "GetServerTimeInterval"},
|
||||
{0x002F, nullptr, "AllowHalfAwake"},
|
||||
{0x0030, nullptr, "GetServerTypes"},
|
||||
{0x0031, nullptr, "GetFriendComment"},
|
||||
{0x0032, &FRD_U::SetClientSdkVersion, "SetClientSdkVersion"},
|
||||
{0x0033, nullptr, "GetMyApproachContext"},
|
||||
{0x0034, nullptr, "AddFriendWithApproach"},
|
||||
{0x0035, nullptr, "DecryptApproachContext"},
|
||||
};
|
||||
RegisterHandlers(functions);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue