summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/logging/backend.cpp1
-rw-r--r--src/common/logging/log.h1
-rw-r--r--src/core/CMakeLists.txt2
-rw-r--r--src/core/hle/service/btm/btm.cpp87
-rw-r--r--src/core/hle/service/btm/btm.h15
-rw-r--r--src/core/hle/service/service.cpp2
6 files changed, 108 insertions, 0 deletions
diff --git a/src/common/logging/backend.cpp b/src/common/logging/backend.cpp
index 38cc85e23..c663b6358 100644
--- a/src/common/logging/backend.cpp
+++ b/src/common/logging/backend.cpp
@@ -169,6 +169,7 @@ void FileBackend::Write(const Entry& entry) {
169 SUB(Service, AOC) \ 169 SUB(Service, AOC) \
170 SUB(Service, APM) \ 170 SUB(Service, APM) \
171 SUB(Service, BCAT) \ 171 SUB(Service, BCAT) \
172 SUB(Service, BTM) \
172 SUB(Service, Fatal) \ 173 SUB(Service, Fatal) \
173 SUB(Service, Friend) \ 174 SUB(Service, Friend) \
174 SUB(Service, FS) \ 175 SUB(Service, FS) \
diff --git a/src/common/logging/log.h b/src/common/logging/log.h
index db4a80d0a..e7fd986d5 100644
--- a/src/common/logging/log.h
+++ b/src/common/logging/log.h
@@ -56,6 +56,7 @@ enum class Class : ClassType {
56 Service_APM, ///< The APM (Performance) service 56 Service_APM, ///< The APM (Performance) service
57 Service_Audio, ///< The Audio (Audio control) service 57 Service_Audio, ///< The Audio (Audio control) service
58 Service_BCAT, ///< The BCAT service 58 Service_BCAT, ///< The BCAT service
59 Service_BTM, ///< The BTM service
59 Service_Fatal, ///< The Fatal service 60 Service_Fatal, ///< The Fatal service
60 Service_Friend, ///< The friend service 61 Service_Friend, ///< The friend service
61 Service_FS, ///< The FS (Filesystem) service 62 Service_FS, ///< The FS (Filesystem) service
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index f1e7e2593..2b9e3a6ce 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -142,6 +142,8 @@ add_library(core STATIC
142 hle/service/bcat/module.h 142 hle/service/bcat/module.h
143 hle/service/btdrv/btdrv.cpp 143 hle/service/btdrv/btdrv.cpp
144 hle/service/btdrv/btdrv.h 144 hle/service/btdrv/btdrv.h
145 hle/service/btm/btm.cpp
146 hle/service/btm/btm.h
145 hle/service/erpt/erpt.cpp 147 hle/service/erpt/erpt.cpp
146 hle/service/erpt/erpt.h 148 hle/service/erpt/erpt.h
147 hle/service/es/es.cpp 149 hle/service/es/es.cpp
diff --git a/src/core/hle/service/btm/btm.cpp b/src/core/hle/service/btm/btm.cpp
new file mode 100644
index 000000000..f6c0fb8d9
--- /dev/null
+++ b/src/core/hle/service/btm/btm.cpp
@@ -0,0 +1,87 @@
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 <memory>
6
7#include "core/hle/service/btm/btm.h"
8#include "core/hle/service/service.h"
9#include "core/hle/service/sm/sm.h"
10
11namespace Service::BTM {
12
13class BTM final : public ServiceFramework<BTM> {
14public:
15 explicit BTM() : ServiceFramework{"btm"} {
16 // clang-format off
17 static const FunctionInfo functions[] = {
18 {0, nullptr, "Unknown1"},
19 {1, nullptr, "Unknown2"},
20 {2, nullptr, "RegisterSystemEventForConnectedDeviceConditionImpl"},
21 {3, nullptr, "Unknown3"},
22 {4, nullptr, "Unknown4"},
23 {5, nullptr, "Unknown5"},
24 {6, nullptr, "Unknown6"},
25 {7, nullptr, "Unknown7"},
26 {8, nullptr, "RegisterSystemEventForRegisteredDeviceInfoImpl"},
27 {9, nullptr, "Unknown8"},
28 {10, nullptr, "Unknown9"},
29 {11, nullptr, "Unknown10"},
30 {12, nullptr, "Unknown11"},
31 {13, nullptr, "Unknown12"},
32 {14, nullptr, "EnableRadioImpl"},
33 {15, nullptr, "DisableRadioImpl"},
34 {16, nullptr, "Unknown13"},
35 {17, nullptr, "Unknown14"},
36 {18, nullptr, "Unknown15"},
37 {19, nullptr, "Unknown16"},
38 {20, nullptr, "Unknown17"},
39 {21, nullptr, "Unknown18"},
40 };
41 // clang-format on
42
43 RegisterHandlers(functions);
44 }
45};
46
47class BTM_DBG final : public ServiceFramework<BTM_DBG> {
48public:
49 explicit BTM_DBG() : ServiceFramework{"btm:dbg"} {
50 // clang-format off
51 static const FunctionInfo functions[] = {
52 {0, nullptr, "RegisterSystemEventForDiscoveryImpl"},
53 {1, nullptr, "Unknown1"},
54 {2, nullptr, "Unknown2"},
55 {3, nullptr, "Unknown3"},
56 {4, nullptr, "Unknown4"},
57 {5, nullptr, "Unknown5"},
58 {6, nullptr, "Unknown6"},
59 {7, nullptr, "Unknown7"},
60 {8, nullptr, "Unknown8"},
61 };
62 // clang-format on
63
64 RegisterHandlers(functions);
65 }
66};
67
68class BTM_SYS final : public ServiceFramework<BTM_SYS> {
69public:
70 explicit BTM_SYS() : ServiceFramework{"btm:sys"} {
71 // clang-format off
72 static const FunctionInfo functions[] = {
73 {0, nullptr, "GetCoreImpl"},
74 };
75 // clang-format on
76
77 RegisterHandlers(functions);
78 }
79};
80
81void InstallInterfaces(SM::ServiceManager& sm) {
82 std::make_shared<BTM>()->InstallAsService(sm);
83 std::make_shared<BTM_DBG>()->InstallAsService(sm);
84 std::make_shared<BTM_SYS>()->InstallAsService(sm);
85}
86
87} // namespace Service::BTM
diff --git a/src/core/hle/service/btm/btm.h b/src/core/hle/service/btm/btm.h
new file mode 100644
index 000000000..e6425a7e3
--- /dev/null
+++ b/src/core/hle/service/btm/btm.h
@@ -0,0 +1,15 @@
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
7namespace Service::SM {
8class ServiceManager;
9}
10
11namespace Service::BTM {
12
13void InstallInterfaces(SM::ServiceManager& sm);
14
15} // namespace Service::BTM
diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp
index 5180a0c93..61a81f564 100644
--- a/src/core/hle/service/service.cpp
+++ b/src/core/hle/service/service.cpp
@@ -22,6 +22,7 @@
22#include "core/hle/service/audio/audio.h" 22#include "core/hle/service/audio/audio.h"
23#include "core/hle/service/bcat/bcat.h" 23#include "core/hle/service/bcat/bcat.h"
24#include "core/hle/service/btdrv/btdrv.h" 24#include "core/hle/service/btdrv/btdrv.h"
25#include "core/hle/service/btm/btm.h"
25#include "core/hle/service/erpt/erpt.h" 26#include "core/hle/service/erpt/erpt.h"
26#include "core/hle/service/es/es.h" 27#include "core/hle/service/es/es.h"
27#include "core/hle/service/eupld/eupld.h" 28#include "core/hle/service/eupld/eupld.h"
@@ -201,6 +202,7 @@ void Init(std::shared_ptr<SM::ServiceManager>& sm) {
201 Audio::InstallInterfaces(*sm); 202 Audio::InstallInterfaces(*sm);
202 BCAT::InstallInterfaces(*sm); 203 BCAT::InstallInterfaces(*sm);
203 BtDrv::InstallInterfaces(*sm); 204 BtDrv::InstallInterfaces(*sm);
205 BTM::InstallInterfaces(*sm);
204 ERPT::InstallInterfaces(*sm); 206 ERPT::InstallInterfaces(*sm);
205 ES::InstallInterfaces(*sm); 207 ES::InstallInterfaces(*sm);
206 EUPLD::InstallInterfaces(*sm); 208 EUPLD::InstallInterfaces(*sm);