summaryrefslogtreecommitdiff
path: root/src/core/hle/service/btm
diff options
context:
space:
mode:
authorGravatar Lioncash2018-07-28 20:59:09 -0400
committerGravatar Lioncash2018-07-28 21:09:07 -0400
commitca7655be3a0502e991471ab062b7a481e4a7ed05 (patch)
tree8dd0eda87e1d51b9bd10cf1ff83599c8491f8bd5 /src/core/hle/service/btm
parentMerge pull request #847 from lioncash/ncm (diff)
downloadyuzu-ca7655be3a0502e991471ab062b7a481e4a7ed05.tar.gz
yuzu-ca7655be3a0502e991471ab062b7a481e4a7ed05.tar.xz
yuzu-ca7655be3a0502e991471ab062b7a481e4a7ed05.zip
service: Add btm services
Adds the skeleton for the btm services based off the information on Switch Brew.
Diffstat (limited to 'src/core/hle/service/btm')
-rw-r--r--src/core/hle/service/btm/btm.cpp87
-rw-r--r--src/core/hle/service/btm/btm.h15
2 files changed, 102 insertions, 0 deletions
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