summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/common/logging/backend.cpp1
-rw-r--r--src/common/logging/log.h1
-rw-r--r--src/core/CMakeLists.txt4
-rw-r--r--src/core/hle/service/acc/acc_u0.cpp11
-rw-r--r--src/core/hle/service/acc/acc_u0.h1
-rw-r--r--src/core/hle/service/friend/friend.cpp28
-rw-r--r--src/core/hle/service/friend/friend.h29
-rw-r--r--src/core/hle/service/friend/friend_a.cpp19
-rw-r--r--src/core/hle/service/friend/friend_a.h18
-rw-r--r--src/core/hle/service/service.cpp2
10 files changed, 113 insertions, 1 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 3a9a15a36..7f3ae1a4e 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -37,6 +37,7 @@ namespace Log {
37 SUB(Service, AM) \ 37 SUB(Service, AM) \
38 SUB(Service, AOC) \ 38 SUB(Service, AOC) \
39 SUB(Service, APM) \ 39 SUB(Service, APM) \
40 SUB(Service, Friend) \
40 SUB(Service, FS) \ 41 SUB(Service, FS) \
41 SUB(Service, HID) \ 42 SUB(Service, HID) \
42 SUB(Service, LM) \ 43 SUB(Service, LM) \
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index 498569c5c..3cf13fcb0 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -54,6 +54,7 @@ enum class Class : ClassType {
54 Service_AOC, ///< The AOC (AddOn Content) service 54 Service_AOC, ///< The AOC (AddOn Content) service
55 Service_APM, ///< The APM (Performance) service 55 Service_APM, ///< The APM (Performance) service
56 Service_Audio, ///< The Audio (Audio control) service 56 Service_Audio, ///< The Audio (Audio control) service
57 Service_Friend, ///< The friend service
57 Service_FS, ///< The FS (Filesystem) service 58 Service_FS, ///< The FS (Filesystem) service
58 Service_HID, ///< The HID (Human interface device) service 59 Service_HID, ///< The HID (Human interface device) service
59 Service_LM, ///< The LM (Logger) service 60 Service_LM, ///< The LM (Logger) service
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 76f70a844..ec011787e 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -112,6 +112,10 @@ add_library(core STATIC
112 hle/service/filesystem/filesystem.h 112 hle/service/filesystem/filesystem.h
113 hle/service/filesystem/fsp_srv.cpp 113 hle/service/filesystem/fsp_srv.cpp
114 hle/service/filesystem/fsp_srv.h 114 hle/service/filesystem/fsp_srv.h
115 hle/service/friend/friend.cpp
116 hle/service/friend/friend.h
117 hle/service/friend/friend_a.cpp
118 hle/service/friend/friend_a.h
115 hle/service/hid/hid.cpp 119 hle/service/hid/hid.cpp
116 hle/service/hid/hid.h 120 hle/service/hid/hid.h
117 hle/service/lm/lm.cpp 121 hle/service/lm/lm.cpp
diff --git a/src/core/hle/service/acc/acc_u0.cpp b/src/core/hle/service/acc/acc_u0.cpp
index 7955f726b..52c3491d5 100644
--- a/src/core/hle/service/acc/acc_u0.cpp
+++ b/src/core/hle/service/acc/acc_u0.cpp
@@ -65,11 +65,19 @@ void ACC_U0::GetUserExistence(Kernel::HLERequestContext& ctx) {
65} 65}
66 66
67void ACC_U0::ListAllUsers(Kernel::HLERequestContext& ctx) { 67void ACC_U0::ListAllUsers(Kernel::HLERequestContext& ctx) {
68 LOG_WARNING(Service_ACC, "(STUBBED) called");
69 constexpr std::array<u128, 10> user_ids{DEFAULT_USER_ID};
70 ctx.WriteBuffer(user_ids.data(), user_ids.size());
71 IPC::ResponseBuilder rb{ctx, 2};
72 rb.Push(RESULT_SUCCESS);
73}
74
75void ACC_U0::ListOpenUsers(Kernel::HLERequestContext& ctx) {
76 LOG_WARNING(Service_ACC, "(STUBBED) called");
68 constexpr std::array<u128, 10> user_ids{DEFAULT_USER_ID}; 77 constexpr std::array<u128, 10> user_ids{DEFAULT_USER_ID};
69 ctx.WriteBuffer(user_ids.data(), user_ids.size()); 78 ctx.WriteBuffer(user_ids.data(), user_ids.size());
70 IPC::ResponseBuilder rb{ctx, 2}; 79 IPC::ResponseBuilder rb{ctx, 2};
71 rb.Push(RESULT_SUCCESS); 80 rb.Push(RESULT_SUCCESS);
72 LOG_DEBUG(Service_ACC, "called");
73} 81}
74 82
75void ACC_U0::GetProfile(Kernel::HLERequestContext& ctx) { 83void ACC_U0::GetProfile(Kernel::HLERequestContext& ctx) {
@@ -103,6 +111,7 @@ ACC_U0::ACC_U0() : ServiceFramework("acc:u0") {
103 static const FunctionInfo functions[] = { 111 static const FunctionInfo functions[] = {
104 {1, &ACC_U0::GetUserExistence, "GetUserExistence"}, 112 {1, &ACC_U0::GetUserExistence, "GetUserExistence"},
105 {2, &ACC_U0::ListAllUsers, "ListAllUsers"}, 113 {2, &ACC_U0::ListAllUsers, "ListAllUsers"},
114 {3, &ACC_U0::ListOpenUsers, "ListOpenUsers"},
106 {4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"}, 115 {4, &ACC_U0::GetLastOpenedUser, "GetLastOpenedUser"},
107 {5, &ACC_U0::GetProfile, "GetProfile"}, 116 {5, &ACC_U0::GetProfile, "GetProfile"},
108 {100, &ACC_U0::InitializeApplicationInfo, "InitializeApplicationInfo"}, 117 {100, &ACC_U0::InitializeApplicationInfo, "InitializeApplicationInfo"},
diff --git a/src/core/hle/service/acc/acc_u0.h b/src/core/hle/service/acc/acc_u0.h
index d7732e75b..222f37282 100644
--- a/src/core/hle/service/acc/acc_u0.h
+++ b/src/core/hle/service/acc/acc_u0.h
@@ -29,6 +29,7 @@ public:
29private: 29private:
30 void GetUserExistence(Kernel::HLERequestContext& ctx); 30 void GetUserExistence(Kernel::HLERequestContext& ctx);
31 void ListAllUsers(Kernel::HLERequestContext& ctx); 31 void ListAllUsers(Kernel::HLERequestContext& ctx);
32 void ListOpenUsers(Kernel::HLERequestContext& ctx);
32 void GetLastOpenedUser(Kernel::HLERequestContext& ctx); 33 void GetLastOpenedUser(Kernel::HLERequestContext& ctx);
33 void GetProfile(Kernel::HLERequestContext& ctx); 34 void GetProfile(Kernel::HLERequestContext& ctx);
34 void InitializeApplicationInfo(Kernel::HLERequestContext& ctx); 35 void InitializeApplicationInfo(Kernel::HLERequestContext& ctx);
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp
new file mode 100644
index 000000000..26593bb0c
--- /dev/null
+++ b/src/core/hle/service/friend/friend.cpp
@@ -0,0 +1,28 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "common/logging/log.h"
6#include "core/hle/ipc_helpers.h"
7#include "core/hle/service/friend/friend.h"
8#include "core/hle/service/friend/friend_a.h"
9
10namespace Service {
11namespace Friend {
12
13void Module::Interface::Unknown(Kernel::HLERequestContext& ctx) {
14 IPC::ResponseBuilder rb{ctx, 2};
15 rb.Push(RESULT_SUCCESS);
16 LOG_WARNING(Service_Friend, "(STUBBED) called");
17}
18
19Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
20 : ServiceFramework(name), module(std::move(module)) {}
21
22void InstallInterfaces(SM::ServiceManager& service_manager) {
23 auto module = std::make_shared<Module>();
24 std::make_shared<Friend_A>(module)->InstallAsService(service_manager);
25}
26
27} // namespace Friend
28} // namespace Service
diff --git a/src/core/hle/service/friend/friend.h b/src/core/hle/service/friend/friend.h
new file mode 100644
index 000000000..ffa498397
--- /dev/null
+++ b/src/core/hle/service/friend/friend.h
@@ -0,0 +1,29 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/service.h"
8
9namespace Service {
10namespace Friend {
11
12class Module final {
13public:
14 class Interface : public ServiceFramework<Interface> {
15 public:
16 Interface(std::shared_ptr<Module> module, const char* name);
17
18 void Unknown(Kernel::HLERequestContext& ctx);
19
20 protected:
21 std::shared_ptr<Module> module;
22 };
23};
24
25/// Registers all Friend services with the specified service manager.
26void InstallInterfaces(SM::ServiceManager& service_manager);
27
28} // namespace Friend
29} // namespace Service
diff --git a/src/core/hle/service/friend/friend_a.cpp b/src/core/hle/service/friend/friend_a.cpp
new file mode 100644
index 000000000..e1f2397c2
--- /dev/null
+++ b/src/core/hle/service/friend/friend_a.cpp
@@ -0,0 +1,19 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#include "core/hle/service/friend/friend_a.h"
6
7namespace Service {
8namespace Friend {
9
10Friend_A::Friend_A(std::shared_ptr<Module> module)
11 : Module::Interface(std::move(module), "friend:a") {
12 static const FunctionInfo functions[] = {
13 {0, &Friend_A::Unknown, "Unknown"},
14 };
15 RegisterHandlers(functions);
16}
17
18} // namespace Friend
19} // namespace Service
diff --git a/src/core/hle/service/friend/friend_a.h b/src/core/hle/service/friend/friend_a.h
new file mode 100644
index 000000000..68fa58297
--- /dev/null
+++ b/src/core/hle/service/friend/friend_a.h
@@ -0,0 +1,18 @@
1// Copyright 2018 yuzu emulator team
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include "core/hle/service/friend/friend.h"
8
9namespace Service {
10namespace Friend {
11
12class Friend_A final : public Module::Interface {
13public:
14 explicit Friend_A(std::shared_ptr<Module> module);
15};
16
17} // namespace Friend
18} // namespace Service
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 5e6d83729..6a2d6a4ef 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -20,6 +20,7 @@
20#include "core/hle/service/apm/apm.h" 20#include "core/hle/service/apm/apm.h"
21#include "core/hle/service/audio/audio.h" 21#include "core/hle/service/audio/audio.h"
22#include "core/hle/service/filesystem/filesystem.h" 22#include "core/hle/service/filesystem/filesystem.h"
23#include "core/hle/service/friend/friend.h"
23#include "core/hle/service/hid/hid.h" 24#include "core/hle/service/hid/hid.h"
24#include "core/hle/service/lm/lm.h" 25#include "core/hle/service/lm/lm.h"
25#include "core/hle/service/nifm/nifm.h" 26#include "core/hle/service/nifm/nifm.h"
@@ -180,6 +181,7 @@ void Init() {
180 APM::InstallInterfaces(*SM::g_service_manager); 181 APM::InstallInterfaces(*SM::g_service_manager);
181 Audio::InstallInterfaces(*SM::g_service_manager); 182 Audio::InstallInterfaces(*SM::g_service_manager);
182 FileSystem::InstallInterfaces(*SM::g_service_manager); 183 FileSystem::InstallInterfaces(*SM::g_service_manager);
184 Friend::InstallInterfaces(*SM::g_service_manager);
183 HID::InstallInterfaces(*SM::g_service_manager); 185 HID::InstallInterfaces(*SM::g_service_manager);
184 LM::InstallInterfaces(*SM::g_service_manager); 186 LM::InstallInterfaces(*SM::g_service_manager);
185 NIFM::InstallInterfaces(*SM::g_service_manager); 187 NIFM::InstallInterfaces(*SM::g_service_manager);