summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2024-02-23 19:49:45 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2024-02-24 01:58:51 +0100
commitc48c182fe0bcbbcde273517956675dc1e0f125c9 (patch)
tree376a0af1df1b65be8c44ab14a4e2e57c9dd97601 /src/core
parentservice: hid: Add IsAnyCustomButtonConfigEnabled for QLaunch (diff)
downloadyuzu-c48c182fe0bcbbcde273517956675dc1e0f125c9.tar
yuzu-c48c182fe0bcbbcde273517956675dc1e0f125c9.tar.gz
yuzu-c48c182fe0bcbbcde273517956675dc1e0f125c9.tar.bz2
yuzu-c48c182fe0bcbbcde273517956675dc1e0f125c9.tar.lz
yuzu-c48c182fe0bcbbcde273517956675dc1e0f125c9.tar.xz
yuzu-c48c182fe0bcbbcde273517956675dc1e0f125c9.tar.zst
yuzu-c48c182fe0bcbbcde273517956675dc1e0f125c9.zip
Diffstat (limited to 'src/core')
-rw-r--r--src/core/hle/service/friend/friend.cpp91
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;