Implement Bluetooth, Btm, Hid and Nsd services and calls. (#761)
- Implement `btdrv` service (IBluetoothDriver).
Implement call `InitializeBluetoothLe` for initialize events of `bt` service according to RE.
- Implement `bt` service (IBluetoothUser).
Implement call `RegisterBleEvent` according to RE.
- Add a placeholder for the `btm` service (close #750).
- Implement `btm:u` service (IBtmUser) (close #751).
Implement call `GetCore` according to RE (close #752).
- Implement `IBtmUserCore` and calls `AcquireBleScanEvent`, `AcquireBleConnectionEvent`, `AcquireBleServiceDiscoveryEvent` and `AcquireBleMtuConfigEvent` according to RE.
- Implement `SetPalmaBoostMode` in `IHidServer` according to RE.
- Add stub for `SetIsPalmaAllConnectable` in `IHidServer` because we will not support Palma devices soon.
- Implement `nsd:a` and `nsd:u` service (IManager) (close #755).
Implement call `ResolveEx` according to RE (close #756).
Implement calls `GetSettingName`, `GetEnvironmentIdentifier`, `GetDeviceId`, `DeleteSettings`, `Resolve`, `ReadSaveDataFromFsForTest`, `WriteSaveDataToFsForTest` and `DeleteSaveDataOfFsForTest` according to RE.
2019-09-06 07:58:50 -07:00
|
|
|
|
using Ryujinx.HLE.HOS.Ipc;
|
2019-09-18 17:45:11 -07:00
|
|
|
|
using Ryujinx.HLE.HOS.Services.Bluetooth.BluetoothDriver;
|
|
|
|
|
using Ryujinx.HLE.HOS.Services.Settings;
|
Implement Bluetooth, Btm, Hid and Nsd services and calls. (#761)
- Implement `btdrv` service (IBluetoothDriver).
Implement call `InitializeBluetoothLe` for initialize events of `bt` service according to RE.
- Implement `bt` service (IBluetoothUser).
Implement call `RegisterBleEvent` according to RE.
- Add a placeholder for the `btm` service (close #750).
- Implement `btm:u` service (IBtmUser) (close #751).
Implement call `GetCore` according to RE (close #752).
- Implement `IBtmUserCore` and calls `AcquireBleScanEvent`, `AcquireBleConnectionEvent`, `AcquireBleServiceDiscoveryEvent` and `AcquireBleMtuConfigEvent` according to RE.
- Implement `SetPalmaBoostMode` in `IHidServer` according to RE.
- Add stub for `SetIsPalmaAllConnectable` in `IHidServer` because we will not support Palma devices soon.
- Implement `nsd:a` and `nsd:u` service (IManager) (close #755).
Implement call `ResolveEx` according to RE (close #756).
Implement calls `GetSettingName`, `GetEnvironmentIdentifier`, `GetDeviceId`, `DeleteSettings`, `Resolve`, `ReadSaveDataFromFsForTest`, `WriteSaveDataToFsForTest` and `DeleteSaveDataOfFsForTest` according to RE.
2019-09-06 07:58:50 -07:00
|
|
|
|
|
|
|
|
|
namespace Ryujinx.HLE.HOS.Services.Bluetooth
|
|
|
|
|
{
|
|
|
|
|
[Service("bt")]
|
|
|
|
|
class IBluetoothUser : IpcService
|
|
|
|
|
{
|
|
|
|
|
public IBluetoothUser(ServiceCtx context) { }
|
|
|
|
|
|
2021-04-13 15:01:24 -07:00
|
|
|
|
[CommandHipc(9)]
|
Implement Bluetooth, Btm, Hid and Nsd services and calls. (#761)
- Implement `btdrv` service (IBluetoothDriver).
Implement call `InitializeBluetoothLe` for initialize events of `bt` service according to RE.
- Implement `bt` service (IBluetoothUser).
Implement call `RegisterBleEvent` according to RE.
- Add a placeholder for the `btm` service (close #750).
- Implement `btm:u` service (IBtmUser) (close #751).
Implement call `GetCore` according to RE (close #752).
- Implement `IBtmUserCore` and calls `AcquireBleScanEvent`, `AcquireBleConnectionEvent`, `AcquireBleServiceDiscoveryEvent` and `AcquireBleMtuConfigEvent` according to RE.
- Implement `SetPalmaBoostMode` in `IHidServer` according to RE.
- Add stub for `SetIsPalmaAllConnectable` in `IHidServer` because we will not support Palma devices soon.
- Implement `nsd:a` and `nsd:u` service (IManager) (close #755).
Implement call `ResolveEx` according to RE (close #756).
Implement calls `GetSettingName`, `GetEnvironmentIdentifier`, `GetDeviceId`, `DeleteSettings`, `Resolve`, `ReadSaveDataFromFsForTest`, `WriteSaveDataToFsForTest` and `DeleteSaveDataOfFsForTest` according to RE.
2019-09-06 07:58:50 -07:00
|
|
|
|
// RegisterBleEvent(pid) -> handle<copy>
|
|
|
|
|
public ResultCode RegisterBleEvent(ServiceCtx context)
|
|
|
|
|
{
|
|
|
|
|
NxSettings.Settings.TryGetValue("bluetooth_debug!skip_boot", out object debugMode);
|
|
|
|
|
|
|
|
|
|
if ((bool)debugMode)
|
|
|
|
|
{
|
|
|
|
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(BluetoothEventManager.RegisterBleDebugEventHandle);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(BluetoothEventManager.RegisterBleEventHandle);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return ResultCode.Success;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|