3
0
Fork 0
forked from suyu/suyu

service/btm: Update function tables

Updates function tables based off information provided by SwitchBrew
This commit is contained in:
Lioncash 2019-01-29 21:47:25 -05:00
parent 0c59e6265f
commit c6c1c1b45f

View file

@ -20,38 +20,38 @@ public:
explicit IBtmUserCore() : ServiceFramework{"IBtmUserCore"} { explicit IBtmUserCore() : ServiceFramework{"IBtmUserCore"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, &IBtmUserCore::GetScanEvent, "GetScanEvent"}, {0, &IBtmUserCore::AcquireBleScanEvent, "AcquireBleScanEvent"},
{1, nullptr, "Unknown1"}, {1, nullptr, "GetBleScanFilterParameter"},
{2, nullptr, "Unknown2"}, {2, nullptr, "GetBleScanFilterParameter2"},
{3, nullptr, "Unknown3"}, {3, nullptr, "StartBleScanForGeneral"},
{4, nullptr, "Unknown4"}, {4, nullptr, "StopBleScanForGeneral"},
{5, nullptr, "Unknown5"}, {5, nullptr, "GetBleScanResultsForGeneral"},
{6, nullptr, "Unknown6"}, {6, nullptr, "StartBleScanForPaired"},
{7, nullptr, "Unknown7"}, {7, nullptr, "StopBleScanForPaired"},
{8, nullptr, "Unknown8"}, {8, nullptr, "StartBleScanForSmartDevice"},
{9, nullptr, "Unknown9"}, {9, nullptr, "StopBleScanForSmartDevice"},
{10, nullptr, "Unknown10"}, {10, nullptr, "GetBleScanResultsForSmartDevice"},
{17, &IBtmUserCore::GetConnectionEvent, "GetConnectionEvent"}, {17, &IBtmUserCore::AcquireBleConnectionEvent, "AcquireBleConnectionEvent"},
{18, nullptr, "Unknown18"}, {18, nullptr, "BleConnect"},
{19, nullptr, "Unknown19"}, {19, nullptr, "BleDisconnect"},
{20, nullptr, "Unknown20"}, {20, nullptr, "BleGetConnectionState"},
{21, nullptr, "Unknown21"}, {21, nullptr, "AcquireBlePairingEvent"},
{22, nullptr, "Unknown22"}, {22, nullptr, "BlePairDevice"},
{23, nullptr, "Unknown23"}, {23, nullptr, "BleUnPairDevice"},
{24, nullptr, "Unknown24"}, {24, nullptr, "BleUnPairDevice2"},
{25, nullptr, "Unknown25"}, {25, nullptr, "BleGetPairedDevices"},
{26, &IBtmUserCore::GetDiscoveryEvent, "AcquireBleServiceDiscoveryEventImpl"}, {26, &IBtmUserCore::AcquireBleServiceDiscoveryEvent, "AcquireBleServiceDiscoveryEvent"},
{27, nullptr, "Unknown27"}, {27, nullptr, "GetGattServices"},
{28, nullptr, "Unknown28"}, {28, nullptr, "GetGattService"},
{29, nullptr, "Unknown29"}, {29, nullptr, "GetGattIncludedServices"},
{30, nullptr, "Unknown30"}, {30, nullptr, "GetBelongingGattService"},
{31, nullptr, "Unknown31"}, {31, nullptr, "GetGattCharacteristics"},
{32, nullptr, "Unknown32"}, {32, nullptr, "GetGattDescriptors"},
{33, &IBtmUserCore::GetConfigEvent, "GetConfigEvent"}, {33, &IBtmUserCore::AcquireBleMtuConfigEvent, "AcquireBleMtuConfigEvent"},
{34, nullptr, "Unknown34"}, {34, nullptr, "ConfigureBleMtu"},
{35, nullptr, "Unknown35"}, {35, nullptr, "GetBleMtu"},
{36, nullptr, "Unknown36"}, {36, nullptr, "RegisterBleGattDataPath"},
{37, nullptr, "Unknown37"}, {37, nullptr, "UnregisterBleGattDataPath"},
}; };
// clang-format on // clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
@ -68,7 +68,7 @@ public:
} }
private: private:
void GetScanEvent(Kernel::HLERequestContext& ctx) { void AcquireBleScanEvent(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_BTM, "(STUBBED) called"); LOG_WARNING(Service_BTM, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2, 1}; IPC::ResponseBuilder rb{ctx, 2, 1};
@ -76,7 +76,7 @@ private:
rb.PushCopyObjects(scan_event.readable); rb.PushCopyObjects(scan_event.readable);
} }
void GetConnectionEvent(Kernel::HLERequestContext& ctx) { void AcquireBleConnectionEvent(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_BTM, "(STUBBED) called"); LOG_WARNING(Service_BTM, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2, 1}; IPC::ResponseBuilder rb{ctx, 2, 1};
@ -84,7 +84,7 @@ private:
rb.PushCopyObjects(connection_event.readable); rb.PushCopyObjects(connection_event.readable);
} }
void GetDiscoveryEvent(Kernel::HLERequestContext& ctx) { void AcquireBleServiceDiscoveryEvent(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_BTM, "(STUBBED) called"); LOG_WARNING(Service_BTM, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2, 1}; IPC::ResponseBuilder rb{ctx, 2, 1};
@ -92,7 +92,7 @@ private:
rb.PushCopyObjects(service_discovery.readable); rb.PushCopyObjects(service_discovery.readable);
} }
void GetConfigEvent(Kernel::HLERequestContext& ctx) { void AcquireBleMtuConfigEvent(Kernel::HLERequestContext& ctx) {
LOG_WARNING(Service_BTM, "(STUBBED) called"); LOG_WARNING(Service_BTM, "(STUBBED) called");
IPC::ResponseBuilder rb{ctx, 2, 1}; IPC::ResponseBuilder rb{ctx, 2, 1};
@ -111,14 +111,14 @@ public:
explicit BTM_USR() : ServiceFramework{"btm:u"} { explicit BTM_USR() : ServiceFramework{"btm:u"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, &BTM_USR::GetCoreImpl, "GetCoreImpl"}, {0, &BTM_USR::GetCore, "GetCore"},
}; };
// clang-format on // clang-format on
RegisterHandlers(functions); RegisterHandlers(functions);
} }
private: private:
void GetCoreImpl(Kernel::HLERequestContext& ctx) { void GetCore(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_BTM, "called"); LOG_DEBUG(Service_BTM, "called");
IPC::ResponseBuilder rb{ctx, 2, 0, 1}; IPC::ResponseBuilder rb{ctx, 2, 0, 1};
@ -134,26 +134,64 @@ public:
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "Unknown1"}, {0, nullptr, "Unknown1"},
{1, nullptr, "Unknown2"}, {1, nullptr, "Unknown2"},
{2, nullptr, "RegisterSystemEventForConnectedDeviceConditionImpl"}, {2, nullptr, "RegisterSystemEventForConnectedDeviceCondition"},
{3, nullptr, "Unknown3"}, {3, nullptr, "Unknown3"},
{4, nullptr, "Unknown4"}, {4, nullptr, "Unknown4"},
{5, nullptr, "Unknown5"}, {5, nullptr, "Unknown5"},
{6, nullptr, "Unknown6"}, {6, nullptr, "Unknown6"},
{7, nullptr, "Unknown7"}, {7, nullptr, "Unknown7"},
{8, nullptr, "RegisterSystemEventForRegisteredDeviceInfoImpl"}, {8, nullptr, "RegisterSystemEventForRegisteredDeviceInfo"},
{9, nullptr, "Unknown8"}, {9, nullptr, "Unknown8"},
{10, nullptr, "Unknown9"}, {10, nullptr, "Unknown9"},
{11, nullptr, "Unknown10"}, {11, nullptr, "Unknown10"},
{12, nullptr, "Unknown11"}, {12, nullptr, "Unknown11"},
{13, nullptr, "Unknown12"}, {13, nullptr, "Unknown12"},
{14, nullptr, "EnableRadioImpl"}, {14, nullptr, "EnableRadio"},
{15, nullptr, "DisableRadioImpl"}, {15, nullptr, "DisableRadio"},
{16, nullptr, "Unknown13"}, {16, nullptr, "Unknown13"},
{17, nullptr, "Unknown14"}, {17, nullptr, "Unknown14"},
{18, nullptr, "Unknown15"}, {18, nullptr, "Unknown15"},
{19, nullptr, "Unknown16"}, {19, nullptr, "Unknown16"},
{20, nullptr, "Unknown17"}, {20, nullptr, "Unknown17"},
{21, nullptr, "Unknown18"}, {21, nullptr, "Unknown18"},
{22, nullptr, "Unknown19"},
{23, nullptr, "Unknown20"},
{24, nullptr, "Unknown21"},
{25, nullptr, "Unknown22"},
{26, nullptr, "Unknown23"},
{27, nullptr, "Unknown24"},
{28, nullptr, "Unknown25"},
{29, nullptr, "Unknown26"},
{30, nullptr, "Unknown27"},
{31, nullptr, "Unknown28"},
{32, nullptr, "Unknown29"},
{33, nullptr, "Unknown30"},
{34, nullptr, "Unknown31"},
{35, nullptr, "Unknown32"},
{36, nullptr, "Unknown33"},
{37, nullptr, "Unknown34"},
{38, nullptr, "Unknown35"},
{39, nullptr, "Unknown36"},
{40, nullptr, "Unknown37"},
{41, nullptr, "Unknown38"},
{42, nullptr, "Unknown39"},
{43, nullptr, "Unknown40"},
{44, nullptr, "Unknown41"},
{45, nullptr, "Unknown42"},
{46, nullptr, "Unknown43"},
{47, nullptr, "Unknown44"},
{48, nullptr, "Unknown45"},
{49, nullptr, "Unknown46"},
{50, nullptr, "Unknown47"},
{51, nullptr, "Unknown48"},
{52, nullptr, "Unknown49"},
{53, nullptr, "Unknown50"},
{54, nullptr, "Unknown51"},
{55, nullptr, "Unknown52"},
{56, nullptr, "Unknown53"},
{57, nullptr, "Unknown54"},
{58, nullptr, "Unknown55"},
{59, nullptr, "Unknown56"},
}; };
// clang-format on // clang-format on
@ -166,7 +204,7 @@ public:
explicit BTM_DBG() : ServiceFramework{"btm:dbg"} { explicit BTM_DBG() : ServiceFramework{"btm:dbg"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "RegisterSystemEventForDiscoveryImpl"}, {0, nullptr, "RegisterSystemEventForDiscovery"},
{1, nullptr, "Unknown1"}, {1, nullptr, "Unknown1"},
{2, nullptr, "Unknown2"}, {2, nullptr, "Unknown2"},
{3, nullptr, "Unknown3"}, {3, nullptr, "Unknown3"},
@ -175,6 +213,10 @@ public:
{6, nullptr, "Unknown6"}, {6, nullptr, "Unknown6"},
{7, nullptr, "Unknown7"}, {7, nullptr, "Unknown7"},
{8, nullptr, "Unknown8"}, {8, nullptr, "Unknown8"},
{9, nullptr, "Unknown9"},
{10, nullptr, "Unknown10"},
{11, nullptr, "Unknown11"},
{12, nullptr, "Unknown11"},
}; };
// clang-format on // clang-format on
@ -187,16 +229,16 @@ public:
explicit IBtmSystemCore() : ServiceFramework{"IBtmSystemCore"} { explicit IBtmSystemCore() : ServiceFramework{"IBtmSystemCore"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "StartGamepadPairingImpl"}, {0, nullptr, "StartGamepadPairing"},
{1, nullptr, "CancelGamepadPairingImpl"}, {1, nullptr, "CancelGamepadPairing"},
{2, nullptr, "ClearGamepadPairingDatabaseImpl"}, {2, nullptr, "ClearGamepadPairingDatabase"},
{3, nullptr, "GetPairedGamepadCountImpl"}, {3, nullptr, "GetPairedGamepadCount"},
{4, nullptr, "EnableRadioImpl"}, {4, nullptr, "EnableRadio"},
{5, nullptr, "DisableRadioImpl"}, {5, nullptr, "DisableRadio"},
{6, nullptr, "GetRadioOnOffImpl"}, {6, nullptr, "GetRadioOnOff"},
{7, nullptr, "AcquireRadioEventImpl"}, {7, nullptr, "AcquireRadioEvent"},
{8, nullptr, "AcquireGamepadPairingEventImpl"}, {8, nullptr, "AcquireGamepadPairingEvent"},
{9, nullptr, "IsGamepadPairingStartedImpl"}, {9, nullptr, "IsGamepadPairingStarted"},
}; };
// clang-format on // clang-format on
@ -209,7 +251,7 @@ public:
explicit BTM_SYS() : ServiceFramework{"btm:sys"} { explicit BTM_SYS() : ServiceFramework{"btm:sys"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, &BTM_SYS::GetCoreImpl, "GetCoreImpl"}, {0, &BTM_SYS::GetCore, "GetCore"},
}; };
// clang-format on // clang-format on
@ -217,7 +259,7 @@ public:
} }
private: private:
void GetCoreImpl(Kernel::HLERequestContext& ctx) { void GetCore(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_BTM, "called"); LOG_DEBUG(Service_BTM, "called");
IPC::ResponseBuilder rb{ctx, 2, 0, 1}; IPC::ResponseBuilder rb{ctx, 2, 0, 1};