diff options
author | bunnei <bunneidev@gmail.com> | 2019-07-10 22:29:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-10 22:29:48 +0200 |
commit | 93eaea109d3028752d55b0ba4c29c988e236acd5 (patch) | |
tree | 0e5db4bbcbf3c323b5a4d5c87d5ef8c8454599d1 /src/core | |
parent | Merge pull request #2611 from DarkLordZach/pm-info-cmd (diff) | |
parent | IFriendService::GetFriendList (diff) | |
download | yuzu-93eaea109d3028752d55b0ba4c29c988e236acd5.tar yuzu-93eaea109d3028752d55b0ba4c29c988e236acd5.tar.gz yuzu-93eaea109d3028752d55b0ba4c29c988e236acd5.tar.bz2 yuzu-93eaea109d3028752d55b0ba4c29c988e236acd5.tar.lz yuzu-93eaea109d3028752d55b0ba4c29c988e236acd5.tar.xz yuzu-93eaea109d3028752d55b0ba4c29c988e236acd5.tar.zst yuzu-93eaea109d3028752d55b0ba4c29c988e236acd5.zip |
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/hle/service/friend/friend.cpp | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp index dec541f2e..d1ec12ef9 100644 --- a/src/core/hle/service/friend/friend.cpp +++ b/src/core/hle/service/friend/friend.cpp @@ -22,7 +22,7 @@ public: {0, nullptr, "GetCompletionEvent"}, {1, nullptr, "Cancel"}, {10100, nullptr, "GetFriendListIds"}, - {10101, nullptr, "GetFriendList"}, + {10101, &IFriendService::GetFriendList, "GetFriendList"}, {10102, nullptr, "UpdateFriendInfo"}, {10110, nullptr, "GetFriendProfileImage"}, {10200, nullptr, "SendFriendRequestForApplication"}, @@ -99,6 +99,23 @@ public: } private: + enum class PresenceFilter : u32 { + None = 0, + Online = 1, + OnlinePlay = 2, + OnlineOrOnlinePlay = 3, + }; + + struct SizedFriendFilter { + PresenceFilter presence; + u8 is_favorite; + u8 same_app; + u8 same_app_played; + u8 arbitary_app_played; + u64 group_id; + }; + static_assert(sizeof(SizedFriendFilter) == 0x10, "SizedFriendFilter is an invalid size"); + void DeclareCloseOnlinePlaySession(Kernel::HLERequestContext& ctx) { // Stub used by Splatoon 2 LOG_WARNING(Service_ACC, "(STUBBED) called"); @@ -112,6 +129,22 @@ private: IPC::ResponseBuilder rb{ctx, 2}; rb.Push(RESULT_SUCCESS); } + + void GetFriendList(Kernel::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_ACC, "(STUBBED) called, offset={}, uuid={}, pid={}", friend_offset, + uuid.Format(), pid); + + IPC::ResponseBuilder rb{ctx, 3}; + rb.Push(RESULT_SUCCESS); + + rb.Push<u32>(0); // Friend count + // TODO(ogniK): Return a buffer of u64s which are the "NetworkServiceAccountId" + } }; class INotificationService final : public ServiceFramework<INotificationService> { |