From 52c4228ecfb83297c5f214eec0554a31e5b6bdfd Mon Sep 17 00:00:00 2001 From: Dima Date: Sat, 26 Nov 2022 12:31:19 +0300 Subject: [PATCH] Stub some friends service calls Needed for Diablo 3 --- .../main/cpp/skyline/services/friends/IFriendService.cpp | 4 ++++ .../main/cpp/skyline/services/friends/IFriendService.h | 5 ++++- .../cpp/skyline/services/friends/INotificationService.cpp | 4 ++++ .../cpp/skyline/services/friends/INotificationService.h | 8 +++++++- 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/src/main/cpp/skyline/services/friends/IFriendService.cpp b/app/src/main/cpp/skyline/services/friends/IFriendService.cpp index 7de1205d..6bf62c5e 100644 --- a/app/src/main/cpp/skyline/services/friends/IFriendService.cpp +++ b/app/src/main/cpp/skyline/services/friends/IFriendService.cpp @@ -27,4 +27,8 @@ namespace skyline::service::friends { Result IFriendService::UpdateUserPresence(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { return {}; } + + Result IFriendService::GetPlayHistoryRegistrationKey(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + return {}; + } } diff --git a/app/src/main/cpp/skyline/services/friends/IFriendService.h b/app/src/main/cpp/skyline/services/friends/IFriendService.h index 08350d84..9137ac19 100644 --- a/app/src/main/cpp/skyline/services/friends/IFriendService.h +++ b/app/src/main/cpp/skyline/services/friends/IFriendService.h @@ -24,12 +24,15 @@ namespace skyline::service::friends { Result UpdateUserPresence(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + Result GetPlayHistoryRegistrationKey(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + SERVICE_DECL( SFUNC(0x2775, IFriendService, GetFriendList), SFUNC(0x28A0, IFriendService, GetBlockedUserListIds), SFUNC(0x2968, IFriendService, DeclareOpenOnlinePlaySession), SFUNC(0x2969, IFriendService, DeclareCloseOnlinePlaySession), - SFUNC(0x2972, IFriendService, UpdateUserPresence) + SFUNC(0x2972, IFriendService, UpdateUserPresence), + SFUNC(0x29CC, IFriendService, GetPlayHistoryRegistrationKey) ) }; } diff --git a/app/src/main/cpp/skyline/services/friends/INotificationService.cpp b/app/src/main/cpp/skyline/services/friends/INotificationService.cpp index 89ff8f77..6515d874 100644 --- a/app/src/main/cpp/skyline/services/friends/INotificationService.cpp +++ b/app/src/main/cpp/skyline/services/friends/INotificationService.cpp @@ -16,4 +16,8 @@ namespace skyline::service::friends { response.copyHandles.push_back(handle); return {}; } + + Result INotificationService::Pop(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response) { + return result::NoNotifications; + } } diff --git a/app/src/main/cpp/skyline/services/friends/INotificationService.h b/app/src/main/cpp/skyline/services/friends/INotificationService.h index 2759feab..c87f2c5b 100644 --- a/app/src/main/cpp/skyline/services/friends/INotificationService.h +++ b/app/src/main/cpp/skyline/services/friends/INotificationService.h @@ -7,6 +7,9 @@ #include namespace skyline::service::friends { + namespace result { + constexpr Result NoNotifications{124, 15}; + } /** * @brief INotificationService is used by applications to receive notifications * @url https://switchbrew.org/wiki/Friend_services#INotificationService @@ -23,8 +26,11 @@ namespace skyline::service::friends { */ Result GetEvent(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + Result Pop(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response); + SERVICE_DECL( - SFUNC(0x0, INotificationService, GetEvent) + SFUNC(0x0, INotificationService, GetEvent), + SFUNC(0x2, INotificationService, Pop) ) }; }