mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
btm: Added the aruid cmds.
This commit is contained in:
parent
070e959609
commit
8789077bb8
@ -515,3 +515,25 @@ Result btmRegisterBleGattDataPath(const BtmBleDataPath *path);
|
|||||||
*/
|
*/
|
||||||
Result btmUnregisterBleGattDataPath(const BtmBleDataPath *path);
|
Result btmUnregisterBleGattDataPath(const BtmBleDataPath *path);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief RegisterAppletResourceUserId
|
||||||
|
* @note Only available on [5.0.0+].
|
||||||
|
* @param[in] AppletResourceUserId AppletResourceUserId
|
||||||
|
* @param[in] unk Unknown
|
||||||
|
*/
|
||||||
|
Result btmRegisterAppletResourceUserId(u64 AppletResourceUserId, u32 unk);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief UnregisterAppletResourceUserId
|
||||||
|
* @note Only available on [5.0.0+].
|
||||||
|
* @param[in] AppletResourceUserId AppletResourceUserId
|
||||||
|
*/
|
||||||
|
Result btmUnregisterAppletResourceUserId(u64 AppletResourceUserId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SetAppletResourceUserId
|
||||||
|
* @note Only available on [5.0.0+].
|
||||||
|
* @param[in] AppletResourceUserId AppletResourceUserId
|
||||||
|
*/
|
||||||
|
Result btmSetAppletResourceUserId(u64 AppletResourceUserId);
|
||||||
|
|
||||||
|
@ -58,6 +58,10 @@ static Result _btmCmdInU32NoOut(u32 inval, u32 cmd_id) {
|
|||||||
return serviceDispatchIn(&g_btmSrv, cmd_id, inval);
|
return serviceDispatchIn(&g_btmSrv, cmd_id, inval);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static Result _btmCmdInU64NoOut(u64 inval, u32 cmd_id) {
|
||||||
|
return serviceDispatchIn(&g_btmSrv, cmd_id, inval);
|
||||||
|
}
|
||||||
|
|
||||||
static Result _btmCmdNoInOutU8(u8 *out, u32 cmd_id) {
|
static Result _btmCmdNoInOutU8(u8 *out, u32 cmd_id) {
|
||||||
return serviceDispatchOut(&g_btmSrv, cmd_id, *out);
|
return serviceDispatchOut(&g_btmSrv, cmd_id, *out);
|
||||||
}
|
}
|
||||||
@ -559,3 +563,32 @@ Result btmUnregisterBleGattDataPath(const BtmBleDataPath *path) {
|
|||||||
return _btmRegisterBleGattDataPath(path, cmd_id);
|
return _btmRegisterBleGattDataPath(path, cmd_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result btmRegisterAppletResourceUserId(u64 AppletResourceUserId, u32 unk) {
|
||||||
|
if (hosversionBefore(5,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
u32 cmd_id = hosversionBefore(5,1,0) ? 40 : 57;
|
||||||
|
|
||||||
|
const struct {
|
||||||
|
u32 unk;
|
||||||
|
u64 AppletResourceUserId;
|
||||||
|
} in = { unk, AppletResourceUserId };
|
||||||
|
|
||||||
|
return serviceDispatchIn(&g_btmSrv, cmd_id, in);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result btmUnregisterAppletResourceUserId(u64 AppletResourceUserId) {
|
||||||
|
if (hosversionBefore(5,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
u32 cmd_id = hosversionBefore(5,1,0) ? 41 : 58;
|
||||||
|
|
||||||
|
return _btmCmdInU64NoOut(AppletResourceUserId, cmd_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result btmSetAppletResourceUserId(u64 AppletResourceUserId) {
|
||||||
|
if (hosversionBefore(5,0,0))
|
||||||
|
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
u32 cmd_id = hosversionBefore(5,1,0) ? 42 : 59;
|
||||||
|
|
||||||
|
return _btmCmdInU64NoOut(AppletResourceUserId, cmd_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user