summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar bunnei2018-07-24 17:42:16 -0700
committerGravatar GitHub2018-07-24 17:42:16 -0700
commit340771ccd7b113313f5031df6b84d33a0c058c19 (patch)
tree35f0b3ebb4b77919f8d556eef6bd59ddfefabea9 /src
parentMerge pull request #810 from Subv/r16 (diff)
parentfriend: Add friend:m, friend:s, and friend:v services (diff)
downloadyuzu-340771ccd7b113313f5031df6b84d33a0c058c19.tar.gz
yuzu-340771ccd7b113313f5031df6b84d33a0c058c19.tar.xz
yuzu-340771ccd7b113313f5031df6b84d33a0c058c19.zip
Merge pull request #806 from lioncash/friend
friend: Deduplicate interfaces
Diffstat (limited to 'src')
-rw-r--r--src/core/CMakeLists.txt6
-rw-r--r--src/core/hle/service/friend/friend.cpp10
-rw-r--r--src/core/hle/service/friend/friend_u.cpp18
-rw-r--r--src/core/hle/service/friend/friend_u.h16
-rw-r--r--src/core/hle/service/friend/interface.cpp (renamed from src/core/hle/service/friend/friend_a.cpp)9
-rw-r--r--src/core/hle/service/friend/interface.h (renamed from src/core/hle/service/friend/friend_a.h)4
6 files changed, 15 insertions, 48 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index 6b6efbc00..b7d52babc 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -146,10 +146,8 @@ add_library(core STATIC
146 hle/service/filesystem/fsp_srv.h 146 hle/service/filesystem/fsp_srv.h
147 hle/service/friend/friend.cpp 147 hle/service/friend/friend.cpp
148 hle/service/friend/friend.h 148 hle/service/friend/friend.h
149 hle/service/friend/friend_a.cpp 149 hle/service/friend/interface.cpp
150 hle/service/friend/friend_a.h 150 hle/service/friend/interface.h
151 hle/service/friend/friend_u.cpp
152 hle/service/friend/friend_u.h
153 hle/service/hid/hid.cpp 151 hle/service/hid/hid.cpp
154 hle/service/hid/hid.h 152 hle/service/hid/hid.h
155 hle/service/lm/lm.cpp 153 hle/service/lm/lm.cpp
diff --git a/src/core/hle/service/friend/friend.cpp b/src/core/hle/service/friend/friend.cpp
index c98a46e05..fb4d89068 100644
--- a/src/core/hle/service/friend/friend.cpp
+++ b/src/core/hle/service/friend/friend.cpp
@@ -5,8 +5,7 @@
5#include "common/logging/log.h" 5#include "common/logging/log.h"
6#include "core/hle/ipc_helpers.h" 6#include "core/hle/ipc_helpers.h"
7#include "core/hle/service/friend/friend.h" 7#include "core/hle/service/friend/friend.h"
8#include "core/hle/service/friend/friend_a.h" 8#include "core/hle/service/friend/interface.h"
9#include "core/hle/service/friend/friend_u.h"
10 9
11namespace Service::Friend { 10namespace Service::Friend {
12 11
@@ -21,8 +20,11 @@ Module::Interface::Interface(std::shared_ptr<Module> module, const char* name)
21 20
22void InstallInterfaces(SM::ServiceManager& service_manager) { 21void InstallInterfaces(SM::ServiceManager& service_manager) {
23 auto module = std::make_shared<Module>(); 22 auto module = std::make_shared<Module>();
24 std::make_shared<Friend_A>(module)->InstallAsService(service_manager); 23 std::make_shared<Friend>(module, "friend:a")->InstallAsService(service_manager);
25 std::make_shared<Friend_U>(module)->InstallAsService(service_manager); 24 std::make_shared<Friend>(module, "friend:m")->InstallAsService(service_manager);
25 std::make_shared<Friend>(module, "friend:s")->InstallAsService(service_manager);
26 std::make_shared<Friend>(module, "friend:u")->InstallAsService(service_manager);
27 std::make_shared<Friend>(module, "friend:v")->InstallAsService(service_manager);
26} 28}
27 29
28} // namespace Service::Friend 30} // namespace Service::Friend
diff --git a/src/core/hle/service/friend/friend_u.cpp b/src/core/hle/service/friend/friend_u.cpp
deleted file mode 100644
index 90b30883f..000000000
--- a/src/core/hle/service/friend/friend_u.cpp
+++ /dev/null
@@ -1,18 +0,0 @@
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_u.h"
6
7namespace Service::Friend {
8
9Friend_U::Friend_U(std::shared_ptr<Module> module)
10 : Module::Interface(std::move(module), "friend:u") {
11 static const FunctionInfo functions[] = {
12 {0, &Friend_U::CreateFriendService, "CreateFriendService"},
13 {1, nullptr, "CreateNotificationService"},
14 };
15 RegisterHandlers(functions);
16}
17
18} // namespace Service::Friend
diff --git a/src/core/hle/service/friend/friend_u.h b/src/core/hle/service/friend/friend_u.h
deleted file mode 100644
index 0d953d807..000000000
--- a/src/core/hle/service/friend/friend_u.h
+++ /dev/null
@@ -1,16 +0,0 @@
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::Friend {
10
11class Friend_U final : public Module::Interface {
12public:
13 explicit Friend_U(std::shared_ptr<Module> module);
14};
15
16} // namespace Service::Friend
diff --git a/src/core/hle/service/friend/friend_a.cpp b/src/core/hle/service/friend/interface.cpp
index a2cc81926..27c6a09e2 100644
--- a/src/core/hle/service/friend/friend_a.cpp
+++ b/src/core/hle/service/friend/interface.cpp
@@ -2,15 +2,16 @@
2// Licensed under GPLv2 or any later version 2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included. 3// Refer to the license.txt file included.
4 4
5#include "core/hle/service/friend/friend_a.h" 5#include "core/hle/service/friend/interface.h"
6 6
7namespace Service::Friend { 7namespace Service::Friend {
8 8
9Friend_A::Friend_A(std::shared_ptr<Module> module) 9Friend::Friend(std::shared_ptr<Module> module, const char* name)
10 : Module::Interface(std::move(module), "friend:a") { 10 : Interface(std::move(module), name) {
11 static const FunctionInfo functions[] = { 11 static const FunctionInfo functions[] = {
12 {0, &Friend_A::CreateFriendService, "CreateFriendService"}, 12 {0, &Friend::CreateFriendService, "CreateFriendService"},
13 {1, nullptr, "CreateNotificationService"}, 13 {1, nullptr, "CreateNotificationService"},
14 {2, nullptr, "CreateDaemonSuspendSessionService"},
14 }; 15 };
15 RegisterHandlers(functions); 16 RegisterHandlers(functions);
16} 17}
diff --git a/src/core/hle/service/friend/friend_a.h b/src/core/hle/service/friend/interface.h
index 81257583b..89dae8471 100644
--- a/src/core/hle/service/friend/friend_a.h
+++ b/src/core/hle/service/friend/interface.h
@@ -8,9 +8,9 @@
8 8
9namespace Service::Friend { 9namespace Service::Friend {
10 10
11class Friend_A final : public Module::Interface { 11class Friend final : public Module::Interface {
12public: 12public:
13 explicit Friend_A(std::shared_ptr<Module> module); 13 explicit Friend(std::shared_ptr<Module> module, const char* name);
14}; 14};
15 15
16} // namespace Service::Friend 16} // namespace Service::Friend