mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 20:42:44 +02:00
ns: Added nsGetDynamicRightsInterface, nsGetReadOnlyApplicationRecordInterface, nsGetApplicationVersionInterface, nsGetAccountProxyInterface, nsGetDocumentInterface.
This commit is contained in:
parent
f589c95214
commit
c85dd5fe2f
@ -244,18 +244,34 @@ Service* nsGetServiceSession_GetterInterface(void);
|
||||
/// Gets the Service object for IApplicationManagerInterface. Only initialized on pre-3.0.0, on [3.0.0+] use \ref nsGetApplicationManagerInterface.
|
||||
Service* nsGetServiceSession_ApplicationManagerInterface(void);
|
||||
|
||||
/// Gets the Service object for IDynamicRightsInterface via the cmd for that.
|
||||
/// Only available on [6.0.0+].
|
||||
Result nsGetDynamicRightsInterface(Service* srv_out);
|
||||
|
||||
/// Gets the Service object for IReadOnlyApplicationControlDataInterface via the cmd for that.
|
||||
/// Only available on [5.1.0+].
|
||||
Result nsGetReadOnlyApplicationControlDataInterface(Service* srv_out);
|
||||
|
||||
/// Gets the Service object for IReadOnlyApplicationRecordInterface via the cmd for that.
|
||||
/// Only available on [5.0.0+].
|
||||
Result nsGetReadOnlyApplicationRecordInterface(Service* srv_out);
|
||||
|
||||
/// Gets the Service object for IECommerceInterface via the cmd for that.
|
||||
/// Only available on [4.0.0+].
|
||||
Result nsGetECommerceInterface(Service* srv_out);
|
||||
|
||||
/// Gets the Service object for IApplicationVersionInterface via the cmd for that.
|
||||
/// Only available on [4.0.0+].
|
||||
Result nsGetApplicationVersionInterface(Service* srv_out);
|
||||
|
||||
/// Gets the Service object for IFactoryResetInterface via the cmd for that.
|
||||
/// Only available on [3.0.0+].
|
||||
Result nsGetFactoryResetInterface(Service* srv_out);
|
||||
|
||||
/// Gets the Service object for IAccountProxyInterface via the cmd for that.
|
||||
/// Only available on [3.0.0+].
|
||||
Result nsGetAccountProxyInterface(Service* srv_out);
|
||||
|
||||
/// Gets the Service object for IApplicationManagerInterface via the cmd for that.
|
||||
/// Only available on [3.0.0+], on prior sysvers use \ref nsGetServiceSession_ApplicationManagerInterface.
|
||||
Result nsGetApplicationManagerInterface(Service* srv_out);
|
||||
@ -268,6 +284,10 @@ Result nsGetDownloadTaskInterface(Service* srv_out);
|
||||
/// Only available on [3.0.0+].
|
||||
Result nsGetContentManagementInterface(Service* srv_out);
|
||||
|
||||
/// Gets the Service object for IDocumentInterface via the cmd for that.
|
||||
/// Only available on [3.0.0+].
|
||||
Result nsGetDocumentInterface(Service* srv_out);
|
||||
|
||||
///@}
|
||||
|
||||
///@name IReadOnlyApplicationControlDataInterface
|
||||
|
@ -47,6 +47,13 @@ Service* nsGetServiceSession_ApplicationManagerInterface(void) {
|
||||
return &g_nsAppManSrv;
|
||||
}
|
||||
|
||||
Result nsGetDynamicRightsInterface(Service* srv_out) {
|
||||
if (hosversionBefore(6,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
return _nsGetSession(&g_nsGetterSrv, srv_out, 7988);
|
||||
}
|
||||
|
||||
Result nsGetReadOnlyApplicationControlDataInterface(Service* srv_out) {
|
||||
if (hosversionBefore(5,1,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
@ -54,6 +61,13 @@ Result nsGetReadOnlyApplicationControlDataInterface(Service* srv_out) {
|
||||
return _nsGetSession(&g_nsGetterSrv, srv_out, 7989);
|
||||
}
|
||||
|
||||
Result nsGetReadOnlyApplicationRecordInterface(Service* srv_out) {
|
||||
if (hosversionBefore(5,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
return _nsGetSession(&g_nsGetterSrv, srv_out, 7991);
|
||||
}
|
||||
|
||||
Result nsGetECommerceInterface(Service* srv_out) {
|
||||
if (hosversionBefore(4,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
@ -61,6 +75,13 @@ Result nsGetECommerceInterface(Service* srv_out) {
|
||||
return _nsGetSession(&g_nsGetterSrv, srv_out, 7992);
|
||||
}
|
||||
|
||||
Result nsGetApplicationVersionInterface(Service* srv_out) {
|
||||
if (hosversionBefore(4,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
return _nsGetSession(&g_nsGetterSrv, srv_out, 7993);
|
||||
}
|
||||
|
||||
Result nsGetFactoryResetInterface(Service* srv_out) {
|
||||
if (hosversionBefore(3,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
@ -68,6 +89,13 @@ Result nsGetFactoryResetInterface(Service* srv_out) {
|
||||
return _nsGetSession(&g_nsGetterSrv, srv_out, 7994);
|
||||
}
|
||||
|
||||
Result nsGetAccountProxyInterface(Service* srv_out) {
|
||||
if (hosversionBefore(3,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
return _nsGetSession(&g_nsGetterSrv, srv_out, 7995);
|
||||
}
|
||||
|
||||
Result nsGetApplicationManagerInterface(Service* srv_out) {
|
||||
if (hosversionBefore(3,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
@ -89,6 +117,13 @@ Result nsGetContentManagementInterface(Service* srv_out) {
|
||||
return _nsGetSession(&g_nsGetterSrv, srv_out, 7998);
|
||||
}
|
||||
|
||||
Result nsGetDocumentInterface(Service* srv_out) {
|
||||
if (hosversionBefore(3,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
return _nsGetSession(&g_nsGetterSrv, srv_out, 7999);
|
||||
}
|
||||
|
||||
static Result _nsGetSession(Service* srv, Service* srv_out, u32 cmd_id) {
|
||||
return serviceDispatch(srv, cmd_id,
|
||||
.out_num_objects = 1,
|
||||
|
Loading…
Reference in New Issue
Block a user