mirror of
https://github.com/ndeadly/MissionControl
synced 2024-11-23 04:43:10 +00:00
btdrv-mitm: rename Service* parameter to srv in btdrv_shim functions
This commit is contained in:
parent
904ce908bf
commit
afc3fe3ac5
2 changed files with 45 additions and 45 deletions
|
@ -1,49 +1,49 @@
|
|||
#include "btdrv_shim.h"
|
||||
#include <stratosphere/sf/sf_mitm_dispatch.h>
|
||||
|
||||
Result btdrvInitializeBluetoothFwd(Service* s, Handle *out_handle) {
|
||||
return serviceMitmDispatch(s, 1,
|
||||
Result btdrvInitializeBluetoothFwd(Service* srv, Handle *out_handle) {
|
||||
return serviceMitmDispatch(srv, 1,
|
||||
.out_handle_attrs = { SfOutHandleAttr_HipcCopy },
|
||||
.out_handles = out_handle,
|
||||
);
|
||||
}
|
||||
|
||||
Result btdrvFinalizeBluetoothFwd(Service* s) {
|
||||
return serviceMitmDispatch(s, 4);
|
||||
Result btdrvFinalizeBluetoothFwd(Service* srv) {
|
||||
return serviceMitmDispatch(srv, 4);
|
||||
}
|
||||
|
||||
/*
|
||||
Result btdrvCancelBondFwd(Service* s, const BluetoothAddress *address) {
|
||||
Result btdrvCancelBondFwd(Service* srv, const BluetoothAddress *address) {
|
||||
const struct {
|
||||
BluetoothAddress address;
|
||||
} in = { *address };
|
||||
|
||||
return serviceMitmDispatchIn(s, 12, in);
|
||||
return serviceMitmDispatchIn(srv, 12, in);
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
Result btdrvGetEventInfoFwd(Service* s, BluetoothEventType *type, u8 *buffer, size_t size) {
|
||||
return serviceMitmDispatchOut(s, 15, *type,
|
||||
Result btdrvGetEventInfoFwd(Service* srv, BluetoothEventType *type, u8 *buffer, size_t size) {
|
||||
return serviceMitmDispatchOut(srv, 15, *type,
|
||||
.buffer_attrs = { SfBufferAttr_HipcPointer | SfBufferAttr_Out },
|
||||
.buffers = { {buffer, size} }
|
||||
);
|
||||
}
|
||||
*/
|
||||
|
||||
Result btdrvInitializeHidFwd(Service* s, Handle *out_handle, u16 version) {
|
||||
return serviceMitmDispatchIn(s, 16, version,
|
||||
Result btdrvInitializeHidFwd(Service* srv, Handle *out_handle, u16 version) {
|
||||
return serviceMitmDispatchIn(srv, 16, version,
|
||||
.out_handle_attrs = { SfOutHandleAttr_HipcCopy },
|
||||
.out_handles = out_handle,
|
||||
);
|
||||
}
|
||||
|
||||
Result btdrvWriteHidDataFwd(Service* s, const BluetoothAddress *address, const BluetoothHidData *data) {
|
||||
Result btdrvWriteHidDataFwd(Service* srv, const BluetoothAddress *address, const BluetoothHidData *data) {
|
||||
const struct {
|
||||
BluetoothAddress address;
|
||||
} in = { *address };
|
||||
|
||||
return serviceMitmDispatchIn(s, 19, in,
|
||||
return serviceMitmDispatchIn(srv, 19, in,
|
||||
.buffer_attrs = { SfBufferAttr_FixedSize | SfBufferAttr_HipcPointer | SfBufferAttr_In },
|
||||
.buffers = { {data, sizeof(BluetoothHidData)} }
|
||||
);
|
||||
|
@ -51,12 +51,12 @@ Result btdrvWriteHidDataFwd(Service* s, const BluetoothAddress *address, const B
|
|||
|
||||
|
||||
/*
|
||||
Result btdrvGetPairedDeviceInfoFwd(Service* s, const BluetoothAddress *address, BluetoothDevicesSettings *device) {
|
||||
Result btdrvGetPairedDeviceInfoFwd(Service* srv, const BluetoothAddress *address, BluetoothDevicesSettings *device) {
|
||||
const struct {
|
||||
BluetoothAddress address;
|
||||
} in = { *address };
|
||||
|
||||
return serviceMitmDispatchIn(s, 25, in,
|
||||
return serviceMitmDispatchIn(srv, 25, in,
|
||||
.buffer_attrs = { SfBufferAttr_FixedSize | SfBufferAttr_HipcPointer | SfBufferAttr_Out },
|
||||
.buffers = { {device, sizeof(BluetoothDevicesSettings)} }
|
||||
);
|
||||
|
@ -64,57 +64,57 @@ Result btdrvGetPairedDeviceInfoFwd(Service* s, const BluetoothAddress *address,
|
|||
*/
|
||||
|
||||
|
||||
Result btdrvFinalizeHidFwd(Service* s) {
|
||||
return serviceMitmDispatch(s, 26);
|
||||
Result btdrvFinalizeHidFwd(Service* srv) {
|
||||
return serviceMitmDispatch(srv, 26);
|
||||
}
|
||||
|
||||
/*
|
||||
Result btdrvGetHidEventInfoFwd(Service* s, HidEventType *type, u8 *buffer, size_t size) {
|
||||
return serviceMitmDispatchOut(s, 27, *type,
|
||||
Result btdrvGetHidEventInfoFwd(Service* srv, HidEventType *type, u8 *buffer, size_t size) {
|
||||
return serviceMitmDispatchOut(srv, 27, *type,
|
||||
.buffer_attrs = { SfBufferAttr_HipcPointer | SfBufferAttr_Out },
|
||||
.buffers = { {buffer, size} }
|
||||
);
|
||||
}
|
||||
*/
|
||||
|
||||
Result btdrvRegisterHidReportEventFwd(Service* s, Handle *out_handle) {
|
||||
return serviceMitmDispatch(s, hosversionBefore(4, 0, 0) ? 36 : 37,
|
||||
Result btdrvRegisterHidReportEventFwd(Service* srv, Handle *out_handle) {
|
||||
return serviceMitmDispatch(srv, hosversionBefore(4, 0, 0) ? 36 : 37,
|
||||
.out_handle_attrs = { SfOutHandleAttr_HipcCopy },
|
||||
.out_handles = out_handle,
|
||||
);
|
||||
}
|
||||
|
||||
Result btdrvGetHidReportEventInfoDeprecatedFwd(Service* s, HidEventType *type, u8 *buffer, size_t size) {
|
||||
return serviceMitmDispatchOut(s, hosversionBefore(4, 0, 0) ? 37 : 38, *type,
|
||||
Result btdrvGetHidReportEventInfoDeprecatedFwd(Service* srv, HidEventType *type, u8 *buffer, size_t size) {
|
||||
return serviceMitmDispatchOut(srv, hosversionBefore(4, 0, 0) ? 37 : 38, *type,
|
||||
.buffer_attrs = { SfBufferAttr_HipcPointer | SfBufferAttr_Out },
|
||||
.buffers = { {buffer, size} }
|
||||
);
|
||||
}
|
||||
|
||||
Result btdrvGetHidReportEventInfoFwd(Service* s, Handle *out_handle) {
|
||||
return serviceMitmDispatch(s, 38,
|
||||
Result btdrvGetHidReportEventInfoFwd(Service* srv, Handle *out_handle) {
|
||||
return serviceMitmDispatch(srv, 38,
|
||||
.out_handle_attrs = { SfOutHandleAttr_HipcCopy },
|
||||
.out_handles = out_handle,
|
||||
);
|
||||
}
|
||||
|
||||
Result btdrvInitializeBleFwd(Service* s, Handle *out_handle) {
|
||||
return serviceMitmDispatch(s, 46,
|
||||
Result btdrvInitializeBleFwd(Service* srv, Handle *out_handle) {
|
||||
return serviceMitmDispatch(srv, 46,
|
||||
.out_handle_attrs = { SfOutHandleAttr_HipcCopy },
|
||||
.out_handles = out_handle,
|
||||
);
|
||||
}
|
||||
|
||||
Result btdrvFinalizeBleFwd(Service* s) {
|
||||
return serviceMitmDispatch(s, 49);
|
||||
Result btdrvFinalizeBleFwd(Service* srv) {
|
||||
return serviceMitmDispatch(srv, 49);
|
||||
}
|
||||
|
||||
/*
|
||||
Result btdrvGetBleManagedEventInfoFwd(Service* s, BleEventType *type, u8 *buffer, u16 length) {
|
||||
Result btdrvGetBleManagedEventInfoFwd(Service* srv, BleEventType *type, u8 *buffer, u16 length) {
|
||||
if (hosversionBefore(5, 0, 0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
return serviceDispatchOut(s, hosversionBefore(5, 1, 0) ? 78 : 79, *type,
|
||||
return serviceDispatchOut(srv, hosversionBefore(5, 1, 0) ? 78 : 79, *type,
|
||||
.buffer_attrs = { SfBufferAttr_HipcPointer | SfBufferAttr_Out },
|
||||
.buffers = { {buffer, length} }
|
||||
);
|
||||
|
|
|
@ -5,25 +5,25 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
Result btdrvInitializeBluetoothFwd(Service* s, Handle *out_handle);
|
||||
Result btdrvFinalizeBluetoothFwd(Service* s);
|
||||
Result btdrvInitializeBluetoothFwd(Service* srv, Handle *out_handle);
|
||||
Result btdrvFinalizeBluetoothFwd(Service* srv);
|
||||
|
||||
Result btdrvCancelBondFwd(Service* s, const BluetoothAddress *address);
|
||||
//Result btdrvCancelBondFwd(Service* srv, const BluetoothAddress *address);
|
||||
|
||||
//Result btdrvGetEventInfoFwd(Service* s, BluetoothEventType *type, u8 *buffer, size_t size);
|
||||
Result btdrvInitializeHidFwd(Service* s, Handle *out_handle, u16 version);
|
||||
Result btdrvWriteHidDataFwd(Service* s, const BluetoothAddress *address, const BluetoothHidData *data);
|
||||
//Result btdrvGetEventInfoFwd(Service* srv, BluetoothEventType *type, u8 *buffer, size_t size);
|
||||
Result btdrvInitializeHidFwd(Service* srv, Handle *out_handle, u16 version);
|
||||
Result btdrvWriteHidDataFwd(Service* srv, const BluetoothAddress *address, const BluetoothHidData *data);
|
||||
|
||||
//Result btdrvGetPairedDeviceInfoFwd(Service* s, const BluetoothAddress *address, BluetoothDevicesSettings *device);
|
||||
//Result btdrvGetPairedDeviceInfoFwd(Service* srv, const BluetoothAddress *address, BluetoothDevicesSettings *device);
|
||||
|
||||
Result btdrvFinalizeHidFwd(Service* s);
|
||||
//Result btdrvGetHidEventInfoFwd(Service* s, HidEventType *type, u8 *buffer, size_t size);
|
||||
Result btdrvRegisterHidReportEventFwd(Service* s, Handle *out_handle);
|
||||
Result btdrvGetHidReportEventInfoDeprecatedFwd(Service* s, HidEventType *type, u8 *buffer, size_t size);
|
||||
Result btdrvGetHidReportEventInfoFwd(Service* s, Handle *out_handle);
|
||||
Result btdrvInitializeBleFwd(Service* s, Handle *out_handle);
|
||||
Result btdrvFinalizeBleFwd(Service* s);
|
||||
//Result btdrvGetBleManagedEventInfoFwd(Service* s, BleEventType *type, u8 *buffer, u16 length)
|
||||
Result btdrvFinalizeHidFwd(Service* srv);
|
||||
//Result btdrvGetHidEventInfoFwd(Service* srv, HidEventType *type, u8 *buffer, size_t size);
|
||||
Result btdrvRegisterHidReportEventFwd(Service* srv, Handle *out_handle);
|
||||
Result btdrvGetHidReportEventInfoDeprecatedFwd(Service* srv, HidEventType *type, u8 *buffer, size_t size);
|
||||
Result btdrvGetHidReportEventInfoFwd(Service* srv, Handle *out_handle);
|
||||
Result btdrvInitializeBleFwd(Service* srv, Handle *out_handle);
|
||||
Result btdrvFinalizeBleFwd(Service* srv);
|
||||
//Result btdrvGetBleManagedEventInfoFwd(Service* srv, BleEventType *type, u8 *buffer, u16 length)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue