summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/core/hle/kernel/server_session.cpp8
-rw-r--r--src/core/hle/service/friend/friend.cpp97
2 files changed, 103 insertions, 2 deletions
diff --git a/src/core/hle/kernel/server_session.cpp b/src/core/hle/kernel/server_session.cpp
index 93560152f..d09ca5992 100644
--- a/src/core/hle/kernel/server_session.cpp
+++ b/src/core/hle/kernel/server_session.cpp
@@ -71,6 +71,14 @@ ResultCode ServerSession::HandleDomainSyncRequest(Kernel::HLERequestContext& con
71 const u32 object_id{context.GetDomainMessageHeader()->object_id}; 71 const u32 object_id{context.GetDomainMessageHeader()->object_id};
72 switch (domain_message_header->command) { 72 switch (domain_message_header->command) {
73 case IPC::DomainMessageHeader::CommandType::SendMessage: 73 case IPC::DomainMessageHeader::CommandType::SendMessage:
74 if (object_id > domain_request_handlers.size()) {
75 LOG_CRITICAL(IPC,
76 "object_id {} is too big! This probably means a recent service call "
77 "to {} needed to return a new interface!",
78 object_id, name);
79 UNREACHABLE();
80 return RESULT_SUCCESS; // Ignore error if asserts are off
81 }
74 return domain_request_handlers[object_id - 1]->HandleSyncRequest(context); 82 return domain_request_handlers[object_id - 1]->HandleSyncRequest(context);
75 83
76 case IPC::DomainMessageHeader::CommandType::CloseVirtualHandle: { 84 case IPC::DomainMessageHeader::CommandType::CloseVirtualHandle: {
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp
index fb4d89068..2b642c32f 100644
--- a/src/core/hle/service/friend/friend.cpp
+++ b/src/core/hle/service/friend/friend.cpp
@@ -9,10 +9,103 @@
9 9
10namespace Service::Friend { 10namespace Service::Friend {
11 11
12class IFriendService final : public ServiceFramework<IFriendService> {
13public:
14 IFriendService() : ServiceFramework("IFriendService") {
15 static const FunctionInfo functions[] = {
16 {0, nullptr, "GetCompletionEvent"},
17 {1, nullptr, "Cancel"},
18 {10100, nullptr, "GetFriendListIds"},
19 {10101, nullptr, "GetFriendList"},
20 {10102, nullptr, "UpdateFriendInfo"},
21 {10110, nullptr, "GetFriendProfileImage"},
22 {10200, nullptr, "SendFriendRequestForApplication"},
23 {10211, nullptr, "AddFacedFriendRequestForApplication"},
24 {10400, nullptr, "GetBlockedUserListIds"},
25 {10500, nullptr, "GetProfileList"},
26 {10600, nullptr, "DeclareOpenOnlinePlaySession"},
27 {10601, &IFriendService::DeclareCloseOnlinePlaySession,
28 "DeclareCloseOnlinePlaySession"},
29 {10610, nullptr, "UpdateUserPresence"},
30 {10700, nullptr, "GetPlayHistoryRegistrationKey"},
31 {10701, nullptr, "GetPlayHistoryRegistrationKeyWithNetworkServiceAccountId"},
32 {10702, nullptr, "AddPlayHistory"},
33 {11000, nullptr, "GetProfileImageUrl"},
34 {20100, nullptr, "GetFriendCount"},
35 {20101, nullptr, "GetNewlyFriendCount"},
36 {20102, nullptr, "GetFriendDetailedInfo"},
37 {20103, nullptr, "SyncFriendList"},
38 {20104, nullptr, "RequestSyncFriendList"},
39 {20110, nullptr, "LoadFriendSetting"},
40 {20200, nullptr, "GetReceivedFriendRequestCount"},
41 {20201, nullptr, "GetFriendRequestList"},
42 {20300, nullptr, "GetFriendCandidateList"},
43 {20301, nullptr, "GetNintendoNetworkIdInfo"},
44 {20302, nullptr, "GetSnsAccountLinkage"},
45 {20303, nullptr, "GetSnsAccountProfile"},
46 {20304, nullptr, "GetSnsAccountFriendList"},
47 {20400, nullptr, "GetBlockedUserList"},
48 {20401, nullptr, "SyncBlockedUserList"},
49 {20500, nullptr, "GetProfileExtraList"},
50 {20501, nullptr, "GetRelationship"},
51 {20600, nullptr, "GetUserPresenceView"},
52 {20700, nullptr, "GetPlayHistoryList"},
53 {20701, nullptr, "GetPlayHistoryStatistics"},
54 {20800, nullptr, "LoadUserSetting"},
55 {20801, nullptr, "SyncUserSetting"},
56 {20900, nullptr, "RequestListSummaryOverlayNotification"},
57 {21000, nullptr, "GetExternalApplicationCatalog"},
58 {30100, nullptr, "DropFriendNewlyFlags"},
59 {30101, nullptr, "DeleteFriend"},
60 {30110, nullptr, "DropFriendNewlyFlag"},
61 {30120, nullptr, "ChangeFriendFavoriteFlag"},
62 {30121, nullptr, "ChangeFriendOnlineNotificationFlag"},
63 {30200, nullptr, "SendFriendRequest"},
64 {30201, nullptr, "SendFriendRequestWithApplicationInfo"},
65 {30202, nullptr, "CancelFriendRequest"},
66 {30203, nullptr, "AcceptFriendRequest"},
67 {30204, nullptr, "RejectFriendRequest"},
68 {30205, nullptr, "ReadFriendRequest"},
69 {30210, nullptr, "GetFacedFriendRequestRegistrationKey"},
70 {30211, nullptr, "AddFacedFriendRequest"},
71 {30212, nullptr, "CancelFacedFriendRequest"},
72 {30213, nullptr, "GetFacedFriendRequestProfileImage"},
73 {30214, nullptr, "GetFacedFriendRequestProfileImageFromPath"},
74 {30215, nullptr, "SendFriendRequestWithExternalApplicationCatalogId"},
75 {30216, nullptr, "ResendFacedFriendRequest"},
76 {30217, nullptr, "SendFriendRequestWithNintendoNetworkIdInfo"},
77 {30300, nullptr, "GetSnsAccountLinkPageUrl"},
78 {30301, nullptr, "UnlinkSnsAccount"},
79 {30400, nullptr, "BlockUser"},
80 {30401, nullptr, "BlockUserWithApplicationInfo"},
81 {30402, nullptr, "UnblockUser"},
82 {30500, nullptr, "GetProfileExtraFromFriendCode"},
83 {30700, nullptr, "DeletePlayHistory"},
84 {30810, nullptr, "ChangePresencePermission"},
85 {30811, nullptr, "ChangeFriendRequestReception"},
86 {30812, nullptr, "ChangePlayLogPermission"},
87 {30820, nullptr, "IssueFriendCode"},
88 {30830, nullptr, "ClearPlayLog"},
89 {49900, nullptr, "DeleteNetworkServiceAccountCache"},
90 };
91
92 RegisterHandlers(functions);
93 }
94
95private:
96 void DeclareCloseOnlinePlaySession(Kernel::HLERequestContext& ctx) {
97 // Stub used by Splatoon 2
98 LOG_WARNING(Service_ACC, "(STUBBED) called");
99 IPC::ResponseBuilder rb{ctx, 2};
100 rb.Push(RESULT_SUCCESS);
101 }
102};
103
12void Module::Interface::CreateFriendService(Kernel::HLERequestContext& ctx) { 104void Module::Interface::CreateFriendService(Kernel::HLERequestContext& ctx) {
13 IPC::ResponseBuilder rb{ctx, 2}; 105 IPC::ResponseBuilder rb{ctx, 2, 0, 1};
14 rb.Push(RESULT_SUCCESS); 106 rb.Push(RESULT_SUCCESS);
15 LOG_WARNING(Service_Friend, "(STUBBED) called"); 107 rb.PushIpcInterface<IFriendService>();
108 LOG_DEBUG(Service_ACC, "called");
16} 109}
17 110
18Module::Interface::Interface(std::shared_ptr<Module> module, const char* name) 111Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)