diff options
author | liamwhite <[email protected]> | 2024-02-23 20:32:32 -0500 |
---|---|---|
committer | GitHub <[email protected]> | 2024-02-23 20:32:32 -0500 |
commit | 6c40d75e47c7dc2d8ab5e11664cd40906f846de9 (patch) | |
tree | b3af659a01c967e1a3082447a9ada02e5b055717 /src/core/hle/service/friend/friend.cpp | |
parent | 975d6f1ec457f6c0e7bb6c667850099593b27e02 (diff) | |
parent | 0a0c257206b384fc9576d38d1904687a1a393f7f (diff) | |
download | yuzu-mainline-6c40d75e47c7dc2d8ab5e11664cd40906f846de9.tar.gz yuzu-mainline-6c40d75e47c7dc2d8ab5e11664cd40906f846de9.zip |
Merge pull request #13140 from german77/yet-more-qlaunch
service: Stub multiple function for qlaunch
Diffstat (limited to 'src/core/hle/service/friend/friend.cpp')
-rw-r--r-- | src/core/hle/service/friend/friend.cpp | 91 |
1 files changed, 65 insertions, 26 deletions
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index aeb849efa..38e62761b 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp @@ -42,13 +42,13 @@ public: {10701, nullptr, "GetPlayHistoryRegistrationKeyWithNetworkServiceAccountId"}, {10702, nullptr, "AddPlayHistory"}, {11000, nullptr, "GetProfileImageUrl"}, - {20100, nullptr, "GetFriendCount"}, - {20101, nullptr, "GetNewlyFriendCount"}, + {20100, &IFriendService::GetFriendCount, "GetFriendCount"}, + {20101, &IFriendService::GetNewlyFriendCount, "GetNewlyFriendCount"}, {20102, nullptr, "GetFriendDetailedInfo"}, {20103, nullptr, "SyncFriendList"}, {20104, nullptr, "RequestSyncFriendList"}, {20110, nullptr, "LoadFriendSetting"}, - {20200, nullptr, "GetReceivedFriendRequestCount"}, + {20200, &IFriendService::GetReceivedFriendRequestCount, "GetReceivedFriendRequestCount"}, {20201, nullptr, "GetFriendRequestList"}, {20300, nullptr, "GetFriendCandidateList"}, {20301, nullptr, "GetNintendoNetworkIdInfo"}, @@ -61,14 +61,14 @@ public: {20501, nullptr, "GetRelationship"}, {20600, nullptr, "GetUserPresenceView"}, {20700, nullptr, "GetPlayHistoryList"}, - {20701, nullptr, "GetPlayHistoryStatistics"}, + {20701, &IFriendService::GetPlayHistoryStatistics, "GetPlayHistoryStatistics"}, {20800, nullptr, "LoadUserSetting"}, {20801, nullptr, "SyncUserSetting"}, {20900, nullptr, "RequestListSummaryOverlayNotification"}, {21000, nullptr, "GetExternalApplicationCatalog"}, {22000, nullptr, "GetReceivedFriendInvitationList"}, {22001, nullptr, "GetReceivedFriendInvitationDetailedInfo"}, - {22010, nullptr, "GetReceivedFriendInvitationCountCache"}, + {22010, &IFriendService::GetReceivedFriendInvitationCountCache, "GetReceivedFriendInvitationCountCache"}, {30100, nullptr, "DropFriendNewlyFlags"}, {30101, nullptr, "DeleteFriend"}, {30110, nullptr, "DropFriendNewlyFlag"}, @@ -144,6 +144,33 @@ private: rb.PushCopyObjects(completion_event->GetReadableEvent()); } + void GetFriendList(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto friend_offset = rp.Pop<u32>(); + const auto uuid = rp.PopRaw<Common::UUID>(); + [[maybe_unused]] const auto filter = rp.PopRaw<SizedFriendFilter>(); + const auto pid = rp.Pop<u64>(); + LOG_WARNING(Service_Friend, "(STUBBED) called, offset={}, uuid=0x{}, pid={}", friend_offset, + uuid.RawString(), pid); + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(ResultSuccess); + + rb.Push<u32>(0); // Friend count + // TODO(ogniK): Return a buffer of u64s which are the "NetworkServiceAccountId" + } + + void CheckFriendListAvailability(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto uuid{rp.PopRaw<Common::UUID>()}; + + LOG_WARNING(Service_Friend, "(STUBBED) called, uuid=0x{}", uuid.RawString()); + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(ResultSuccess); + rb.Push(true); + } + void GetBlockedUserListIds(HLERequestContext& ctx) { // This is safe to stub, as there should be no adverse consequences from reporting no // blocked users. @@ -153,6 +180,17 @@ private: rb.Push<u32>(0); // Indicates there are no blocked users } + void CheckBlockedUserListAvailability(HLERequestContext& ctx) { + IPC::RequestParser rp{ctx}; + const auto uuid{rp.PopRaw<Common::UUID>()}; + + LOG_WARNING(Service_Friend, "(STUBBED) called, uuid=0x{}", uuid.RawString()); + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(ResultSuccess); + rb.Push(true); + } + void DeclareCloseOnlinePlaySession(HLERequestContext& ctx) { // Stub used by Splatoon 2 LOG_WARNING(Service_Friend, "(STUBBED) called"); @@ -179,42 +217,43 @@ private: rb.Push(ResultSuccess); } - void GetFriendList(HLERequestContext& ctx) { - IPC::RequestParser rp{ctx}; - const auto friend_offset = rp.Pop<u32>(); - const auto uuid = rp.PopRaw<Common::UUID>(); - [[maybe_unused]] const auto filter = rp.PopRaw<SizedFriendFilter>(); - const auto pid = rp.Pop<u64>(); - LOG_WARNING(Service_Friend, "(STUBBED) called, offset={}, uuid=0x{}, pid={}", friend_offset, - uuid.RawString(), pid); + void GetFriendCount(HLERequestContext& ctx) { + LOG_DEBUG(Service_Friend, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(ResultSuccess); - - rb.Push<u32>(0); // Friend count - // TODO(ogniK): Return a buffer of u64s which are the "NetworkServiceAccountId" + rb.Push(0); } - void CheckFriendListAvailability(HLERequestContext& ctx) { - IPC::RequestParser rp{ctx}; - const auto uuid{rp.PopRaw<Common::UUID>()}; + void GetNewlyFriendCount(HLERequestContext& ctx) { + LOG_DEBUG(Service_Friend, "(STUBBED) called"); - LOG_WARNING(Service_Friend, "(STUBBED) called, uuid=0x{}", uuid.RawString()); + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(ResultSuccess); + rb.Push(0); + } + + void GetReceivedFriendRequestCount(HLERequestContext& ctx) { + LOG_DEBUG(Service_Friend, "(STUBBED) called"); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(ResultSuccess); - rb.Push(true); + rb.Push(0); } - void CheckBlockedUserListAvailability(HLERequestContext& ctx) { - IPC::RequestParser rp{ctx}; - const auto uuid{rp.PopRaw<Common::UUID>()}; + void GetPlayHistoryStatistics(HLERequestContext& ctx) { + LOG_ERROR(Service_Friend, "(STUBBED) called, check in out"); - LOG_WARNING(Service_Friend, "(STUBBED) called, uuid=0x{}", uuid.RawString()); + IPC::ResponseBuilder rb{ctx, 2}; + rb.Push(ResultSuccess); + } + + void GetReceivedFriendInvitationCountCache(HLERequestContext& ctx) { + LOG_DEBUG(Service_Friend, "(STUBBED) called, check in out"); IPC::ResponseBuilder rb{ctx, 3}; rb.Push(ResultSuccess); - rb.Push(true); + rb.Push(0); } KernelHelpers::ServiceContext service_context; |