summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZephyron <zephyron@citron-emu.org>2025-02-09 11:40:46 +1000
committerZephyron <zephyron@citron-emu.org>2025-02-09 11:40:46 +1000
commit384a18927bf7200630e940026367f6d3106f60d6 (patch)
tree1f3e3ae38726f2ccd3000f4d5983e22a449c3005 /src
parent76716b52481e4061939cc08bf6da5446b7c20507 (diff)
service/friend: Clean up friend service implementation
- Remove unused function stubs - Improve GetCompletionEvent implementation - Clean up response builder naming
Diffstat (limited to 'src')
-rw-r--r--src/core/hle/service/friend/friend.cpp52
1 files changed, 8 insertions, 44 deletions
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp
index 651abcd36..38e62761b 100644
--- a/src/core/hle/service/friend/friend.cpp
+++ b/src/core/hle/service/friend/friend.cpp
@@ -22,7 +22,7 @@ public:
// clang-format off
static const FunctionInfo functions[] = {
{0, &IFriendService::GetCompletionEvent, "GetCompletionEvent"},
- {1, &IFriendService::Cancel, "Cancel"},
+ {1, nullptr, "Cancel"},
{10100, nullptr, "GetFriendListIds"},
{10101, &IFriendService::GetFriendList, "GetFriendList"},
{10102, nullptr, "UpdateFriendInfo"},
@@ -46,7 +46,7 @@ public:
{20101, &IFriendService::GetNewlyFriendCount, "GetNewlyFriendCount"},
{20102, nullptr, "GetFriendDetailedInfo"},
{20103, nullptr, "SyncFriendList"},
- {20104, &IFriendService::RequestSyncFriendList, "RequestSyncFriendList"},
+ {20104, nullptr, "RequestSyncFriendList"},
{20110, nullptr, "LoadFriendSetting"},
{20200, &IFriendService::GetReceivedFriendRequestCount, "GetReceivedFriendRequestCount"},
{20201, nullptr, "GetFriendRequestList"},
@@ -59,10 +59,10 @@ public:
{20401, nullptr, "SyncBlockedUserList"},
{20500, nullptr, "GetProfileExtraList"},
{20501, nullptr, "GetRelationship"},
- {20600, &IFriendService::GetUserPresenceView, "GetUserPresenceView"},
+ {20600, nullptr, "GetUserPresenceView"},
{20700, nullptr, "GetPlayHistoryList"},
{20701, &IFriendService::GetPlayHistoryStatistics, "GetPlayHistoryStatistics"},
- {20800, &IFriendService::LoadUserSetting, "LoadUserSetting"},
+ {20800, nullptr, "LoadUserSetting"},
{20801, nullptr, "SyncUserSetting"},
{20900, nullptr, "RequestListSummaryOverlayNotification"},
{21000, nullptr, "GetExternalApplicationCatalog"},
@@ -137,23 +137,11 @@ private:
static_assert(sizeof(SizedFriendFilter) == 0x10, "SizedFriendFilter is an invalid size");
void GetCompletionEvent(HLERequestContext& ctx) {
- LOG_DEBUG(Service_Friend, "Retrieving completion event");
-
- const auto& event = completion_event->GetReadableEvent();
-
- IPC::ResponseBuilder response{ctx, 2, 1};
- response.Push(event.Signal());
- response.PushCopyObjects(event);
- }
-
- void Cancel(HLERequestContext& ctx) {
- LOG_DEBUG(Service_Friend, "Cancelling friend service operation");
-
- const auto& event = completion_event->GetReadableEvent();
+ LOG_DEBUG(Service_Friend, "called");
- IPC::ResponseBuilder response{ctx, 2};
- response.Push(ResultSuccess);
- response.PushCopyObjects(event);
+ IPC::ResponseBuilder rb{ctx, 2, 1};
+ rb.Push(ResultSuccess);
+ rb.PushCopyObjects(completion_event->GetReadableEvent());
}
void GetFriendList(HLERequestContext& ctx) {
@@ -245,13 +233,6 @@ private:
rb.Push(0);
}
- void RequestSyncFriendList(HLERequestContext& ctx) {
- LOG_DEBUG(Service_Friend, "Friend list sync requested");
-
- IPC::ResponseBuilder response{ctx, 2};
- response.Push(ResultSuccess);
- }
-
void GetReceivedFriendRequestCount(HLERequestContext& ctx) {
LOG_DEBUG(Service_Friend, "(STUBBED) called");
@@ -260,16 +241,6 @@ private:
rb.Push(0);
}
- void GetUserPresenceView(HLERequestContext& ctx) {
- IPC::RequestParser request{ctx};
- const auto user_id = request.PopRaw<Common::UUID>();
-
- LOG_DEBUG(Service_Friend, "Getting presence view for user {}", user_id.RawString());
-
- IPC::ResponseBuilder response{ctx, 2};
- response.Push(ResultSuccess);
- }
-
void GetPlayHistoryStatistics(HLERequestContext& ctx) {
LOG_ERROR(Service_Friend, "(STUBBED) called, check in out");
@@ -277,13 +248,6 @@ private:
rb.Push(ResultSuccess);
}
- void LoadUserSetting(HLERequestContext& ctx) {
- LOG_DEBUG(Service_Friend, "Loading friend service user settings");
-
- IPC::ResponseBuilder response{ctx, 2};
- response.Push(ResultSuccess);
- }
-
void GetReceivedFriendInvitationCountCache(HLERequestContext& ctx) {
LOG_DEBUG(Service_Friend, "(STUBBED) called, check in out");