diff options
author | David Marcec <dmarcecguzman@gmail.com> | 2019-07-09 10:20:58 +0200 |
---|---|---|
committer | David Marcec <dmarcecguzman@gmail.com> | 2019-07-09 10:20:58 +0200 |
commit | 0330f5d6f825a38a6a73843c304fc7abef2c45c7 (patch) | |
tree | 7aebb42cdbf10329005721de8cd3755df8118ac8 /src | |
parent | Merge pull request #2661 from ogniK5377/audren-loop (diff) | |
download | yuzu-0330f5d6f825a38a6a73843c304fc7abef2c45c7.tar yuzu-0330f5d6f825a38a6a73843c304fc7abef2c45c7.tar.gz yuzu-0330f5d6f825a38a6a73843c304fc7abef2c45c7.tar.bz2 yuzu-0330f5d6f825a38a6a73843c304fc7abef2c45c7.tar.lz yuzu-0330f5d6f825a38a6a73843c304fc7abef2c45c7.tar.xz yuzu-0330f5d6f825a38a6a73843c304fc7abef2c45c7.tar.zst yuzu-0330f5d6f825a38a6a73843c304fc7abef2c45c7.zip |
Diffstat (limited to 'src')
-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> { |