aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.HLE/HOS/Services/BluetoothManager/BtmUser/IBtmUserCore.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2023-01-04 19:15:45 -0300
committerGitHub <noreply@github.com>2023-01-04 23:15:45 +0100
commit08831eecf77cedd3c4192ebab5a9c485fb15d51e (patch)
tree6d95b921a18e9cfa477579fcecb9d041e03d682e /Ryujinx.HLE/HOS/Services/BluetoothManager/BtmUser/IBtmUserCore.cs
parentc6a139a6e7e3ffe1591bc14dafafed60b9bef0dc (diff)
IPC refactor part 3+4: New server HIPC message processor (#4188)
* IPC refactor part 3 + 4: New server HIPC message processor with source generator based serialization * Make types match on calls to AlignUp/AlignDown * Formatting * Address some PR feedback * Move BitfieldExtensions to Ryujinx.Common.Utilities and consolidate implementations * Rename Reader/Writer to SpanReader/SpanWriter and move to Ryujinx.Common.Memory * Implement EventType * Address more PR feedback * Log request processing errors since they are not normal * Rename waitable to multiwait and add missing lock * PR feedback * Ac_K PR feedback
Diffstat (limited to 'Ryujinx.HLE/HOS/Services/BluetoothManager/BtmUser/IBtmUserCore.cs')
-rw-r--r--Ryujinx.HLE/HOS/Services/BluetoothManager/BtmUser/IBtmUserCore.cs26
1 files changed, 13 insertions, 13 deletions
diff --git a/Ryujinx.HLE/HOS/Services/BluetoothManager/BtmUser/IBtmUserCore.cs b/Ryujinx.HLE/HOS/Services/BluetoothManager/BtmUser/IBtmUserCore.cs
index 8f138652..026b5bf1 100644
--- a/Ryujinx.HLE/HOS/Services/BluetoothManager/BtmUser/IBtmUserCore.cs
+++ b/Ryujinx.HLE/HOS/Services/BluetoothManager/BtmUser/IBtmUserCore.cs
@@ -1,7 +1,7 @@
using Ryujinx.Common.Logging;
using Ryujinx.HLE.HOS.Ipc;
-using Ryujinx.HLE.HOS.Kernel.Common;
using Ryujinx.HLE.HOS.Kernel.Threading;
+using Ryujinx.Horizon.Common;
namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
{
@@ -25,7 +25,7 @@ namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
// AcquireBleScanEvent() -> (byte<1>, handle<copy>)
public ResultCode AcquireBleScanEvent(ServiceCtx context)
{
- KernelResult result = KernelResult.Success;
+ Result result = Result.Success;
if (_bleScanEventHandle == 0)
{
@@ -33,7 +33,7 @@ namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
result = context.Process.HandleTable.GenerateHandle(_bleScanEvent.ReadableEvent, out _bleScanEventHandle);
- if (result != KernelResult.Success)
+ if (result != Result.Success)
{
// NOTE: We use a Logging instead of an exception because the call return a boolean if succeed or not.
Logger.Error?.Print(LogClass.ServiceBsd, "Out of handles!");
@@ -42,7 +42,7 @@ namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_bleScanEventHandle);
- context.ResponseData.Write(result == KernelResult.Success ? 1 : 0);
+ context.ResponseData.Write(result == Result.Success ? 1 : 0);
return ResultCode.Success;
}
@@ -51,7 +51,7 @@ namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
// AcquireBleConnectionEvent() -> (byte<1>, handle<copy>)
public ResultCode AcquireBleConnectionEvent(ServiceCtx context)
{
- KernelResult result = KernelResult.Success;
+ Result result = Result.Success;
if (_bleConnectionEventHandle == 0)
{
@@ -59,7 +59,7 @@ namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
result = context.Process.HandleTable.GenerateHandle(_bleConnectionEvent.ReadableEvent, out _bleConnectionEventHandle);
- if (result != KernelResult.Success)
+ if (result != Result.Success)
{
// NOTE: We use a Logging instead of an exception because the call return a boolean if succeed or not.
Logger.Error?.Print(LogClass.ServiceBsd, "Out of handles!");
@@ -68,7 +68,7 @@ namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_bleConnectionEventHandle);
- context.ResponseData.Write(result == KernelResult.Success ? 1 : 0);
+ context.ResponseData.Write(result == Result.Success ? 1 : 0);
return ResultCode.Success;
}
@@ -77,7 +77,7 @@ namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
// AcquireBleServiceDiscoveryEvent() -> (byte<1>, handle<copy>)
public ResultCode AcquireBleServiceDiscoveryEvent(ServiceCtx context)
{
- KernelResult result = KernelResult.Success;
+ Result result = Result.Success;
if (_bleServiceDiscoveryEventHandle == 0)
{
@@ -85,7 +85,7 @@ namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
result = context.Process.HandleTable.GenerateHandle(_bleServiceDiscoveryEvent.ReadableEvent, out _bleServiceDiscoveryEventHandle);
- if (result != KernelResult.Success)
+ if (result != Result.Success)
{
// NOTE: We use a Logging instead of an exception because the call return a boolean if succeed or not.
Logger.Error?.Print(LogClass.ServiceBsd, "Out of handles!");
@@ -94,7 +94,7 @@ namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_bleServiceDiscoveryEventHandle);
- context.ResponseData.Write(result == KernelResult.Success ? 1 : 0);
+ context.ResponseData.Write(result == Result.Success ? 1 : 0);
return ResultCode.Success;
}
@@ -103,7 +103,7 @@ namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
// AcquireBleMtuConfigEvent() -> (byte<1>, handle<copy>)
public ResultCode AcquireBleMtuConfigEvent(ServiceCtx context)
{
- KernelResult result = KernelResult.Success;
+ Result result = Result.Success;
if (_bleMtuConfigEventHandle == 0)
{
@@ -111,7 +111,7 @@ namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
result = context.Process.HandleTable.GenerateHandle(_bleMtuConfigEvent.ReadableEvent, out _bleMtuConfigEventHandle);
- if (result != KernelResult.Success)
+ if (result != Result.Success)
{
// NOTE: We use a Logging instead of an exception because the call return a boolean if succeed or not.
Logger.Error?.Print(LogClass.ServiceBsd, "Out of handles!");
@@ -120,7 +120,7 @@ namespace Ryujinx.HLE.HOS.Services.BluetoothManager.BtmUser
context.Response.HandleDesc = IpcHandleDesc.MakeCopy(_bleMtuConfigEventHandle);
- context.ResponseData.Write(result == KernelResult.Success ? 1 : 0);
+ context.ResponseData.Write(result == Result.Success ? 1 : 0);
return ResultCode.Success;
}