mirror of
https://github.com/starr-dusT/yuzu-mainline
synced 2024-03-05 21:12:25 -08:00
service: friend: Add GetFriendCount, GetNewlyFriendCount, GetReceivedFriendRequestCount, GetPlayHistoryStatistics, GetReceivedFriendInvitationCountCache for QLaunch
This commit is contained in:
parent
98be02898b
commit
c48c182fe0
@ -42,13 +42,13 @@ public:
|
|||||||
{10701, nullptr, "GetPlayHistoryRegistrationKeyWithNetworkServiceAccountId"},
|
{10701, nullptr, "GetPlayHistoryRegistrationKeyWithNetworkServiceAccountId"},
|
||||||
{10702, nullptr, "AddPlayHistory"},
|
{10702, nullptr, "AddPlayHistory"},
|
||||||
{11000, nullptr, "GetProfileImageUrl"},
|
{11000, nullptr, "GetProfileImageUrl"},
|
||||||
{20100, nullptr, "GetFriendCount"},
|
{20100, &IFriendService::GetFriendCount, "GetFriendCount"},
|
||||||
{20101, nullptr, "GetNewlyFriendCount"},
|
{20101, &IFriendService::GetNewlyFriendCount, "GetNewlyFriendCount"},
|
||||||
{20102, nullptr, "GetFriendDetailedInfo"},
|
{20102, nullptr, "GetFriendDetailedInfo"},
|
||||||
{20103, nullptr, "SyncFriendList"},
|
{20103, nullptr, "SyncFriendList"},
|
||||||
{20104, nullptr, "RequestSyncFriendList"},
|
{20104, nullptr, "RequestSyncFriendList"},
|
||||||
{20110, nullptr, "LoadFriendSetting"},
|
{20110, nullptr, "LoadFriendSetting"},
|
||||||
{20200, nullptr, "GetReceivedFriendRequestCount"},
|
{20200, &IFriendService::GetReceivedFriendRequestCount, "GetReceivedFriendRequestCount"},
|
||||||
{20201, nullptr, "GetFriendRequestList"},
|
{20201, nullptr, "GetFriendRequestList"},
|
||||||
{20300, nullptr, "GetFriendCandidateList"},
|
{20300, nullptr, "GetFriendCandidateList"},
|
||||||
{20301, nullptr, "GetNintendoNetworkIdInfo"},
|
{20301, nullptr, "GetNintendoNetworkIdInfo"},
|
||||||
@ -61,14 +61,14 @@ public:
|
|||||||
{20501, nullptr, "GetRelationship"},
|
{20501, nullptr, "GetRelationship"},
|
||||||
{20600, nullptr, "GetUserPresenceView"},
|
{20600, nullptr, "GetUserPresenceView"},
|
||||||
{20700, nullptr, "GetPlayHistoryList"},
|
{20700, nullptr, "GetPlayHistoryList"},
|
||||||
{20701, nullptr, "GetPlayHistoryStatistics"},
|
{20701, &IFriendService::GetPlayHistoryStatistics, "GetPlayHistoryStatistics"},
|
||||||
{20800, nullptr, "LoadUserSetting"},
|
{20800, nullptr, "LoadUserSetting"},
|
||||||
{20801, nullptr, "SyncUserSetting"},
|
{20801, nullptr, "SyncUserSetting"},
|
||||||
{20900, nullptr, "RequestListSummaryOverlayNotification"},
|
{20900, nullptr, "RequestListSummaryOverlayNotification"},
|
||||||
{21000, nullptr, "GetExternalApplicationCatalog"},
|
{21000, nullptr, "GetExternalApplicationCatalog"},
|
||||||
{22000, nullptr, "GetReceivedFriendInvitationList"},
|
{22000, nullptr, "GetReceivedFriendInvitationList"},
|
||||||
{22001, nullptr, "GetReceivedFriendInvitationDetailedInfo"},
|
{22001, nullptr, "GetReceivedFriendInvitationDetailedInfo"},
|
||||||
{22010, nullptr, "GetReceivedFriendInvitationCountCache"},
|
{22010, &IFriendService::GetReceivedFriendInvitationCountCache, "GetReceivedFriendInvitationCountCache"},
|
||||||
{30100, nullptr, "DropFriendNewlyFlags"},
|
{30100, nullptr, "DropFriendNewlyFlags"},
|
||||||
{30101, nullptr, "DeleteFriend"},
|
{30101, nullptr, "DeleteFriend"},
|
||||||
{30110, nullptr, "DropFriendNewlyFlag"},
|
{30110, nullptr, "DropFriendNewlyFlag"},
|
||||||
@ -144,6 +144,33 @@ private:
|
|||||||
rb.PushCopyObjects(completion_event->GetReadableEvent());
|
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) {
|
void GetBlockedUserListIds(HLERequestContext& ctx) {
|
||||||
// This is safe to stub, as there should be no adverse consequences from reporting no
|
// This is safe to stub, as there should be no adverse consequences from reporting no
|
||||||
// blocked users.
|
// blocked users.
|
||||||
@ -153,6 +180,17 @@ private:
|
|||||||
rb.Push<u32>(0); // Indicates there are no blocked users
|
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) {
|
void DeclareCloseOnlinePlaySession(HLERequestContext& ctx) {
|
||||||
// Stub used by Splatoon 2
|
// Stub used by Splatoon 2
|
||||||
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
LOG_WARNING(Service_Friend, "(STUBBED) called");
|
||||||
@ -179,42 +217,43 @@ private:
|
|||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GetFriendList(HLERequestContext& ctx) {
|
void GetFriendCount(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
LOG_DEBUG(Service_Friend, "(STUBBED) called");
|
||||||
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};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
|
rb.Push(0);
|
||||||
rb.Push<u32>(0); // Friend count
|
|
||||||
// TODO(ogniK): Return a buffer of u64s which are the "NetworkServiceAccountId"
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckFriendListAvailability(HLERequestContext& ctx) {
|
void GetNewlyFriendCount(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
LOG_DEBUG(Service_Friend, "(STUBBED) called");
|
||||||
const auto uuid{rp.PopRaw<Common::UUID>()};
|
|
||||||
|
|
||||||
LOG_WARNING(Service_Friend, "(STUBBED) called, uuid=0x{}", uuid.RawString());
|
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(true);
|
rb.Push(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CheckBlockedUserListAvailability(HLERequestContext& ctx) {
|
void GetReceivedFriendRequestCount(HLERequestContext& ctx) {
|
||||||
IPC::RequestParser rp{ctx};
|
LOG_DEBUG(Service_Friend, "(STUBBED) called");
|
||||||
const auto uuid{rp.PopRaw<Common::UUID>()};
|
|
||||||
|
|
||||||
LOG_WARNING(Service_Friend, "(STUBBED) called, uuid=0x{}", uuid.RawString());
|
|
||||||
|
|
||||||
IPC::ResponseBuilder rb{ctx, 3};
|
IPC::ResponseBuilder rb{ctx, 3};
|
||||||
rb.Push(ResultSuccess);
|
rb.Push(ResultSuccess);
|
||||||
rb.Push(true);
|
rb.Push(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
void GetPlayHistoryStatistics(HLERequestContext& ctx) {
|
||||||
|
LOG_ERROR(Service_Friend, "(STUBBED) called, check in out");
|
||||||
|
|
||||||
|
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(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
KernelHelpers::ServiceContext service_context;
|
KernelHelpers::ServiceContext service_context;
|
||||||
|
Loading…
Reference in New Issue
Block a user