NS services: Difference between revisions
(6 intermediate revisions by the same user not shown) | |||
Line 406: | Line 406: | ||
These are "nn::ns::detail::IServiceGetterInterface". | These are "nn::ns::detail::IServiceGetterInterface". | ||
These commands check a state field for a command-specific bit and returns an error if not set, this is | These commands check a state field for a command-specific bit and returns an error if not set, this is a permissions check for service+command. | ||
[11.0.0+] ns:ro was added. | [11.0.0+] ns:ro was added. | ||
Line 414: | Line 414: | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
! Cmd || Name | ! Cmd || Name || Permission bit | ||
|- | |- | ||
| 7988 || [6.0.0+] [[#IDynamicRightsInterface|GetDynamicRightsInterface]] | | 7988 || [6.0.0+] [[#IDynamicRightsInterface|GetDynamicRightsInterface]] || 10 | ||
|- | |- | ||
| 7989 || [5.1.0+] [[#IReadOnlyApplicationControlDataInterface|GetReadOnlyApplicationControlDataInterface]] | | 7989 || [5.1.0+] [[#IReadOnlyApplicationControlDataInterface|GetReadOnlyApplicationControlDataInterface]] || 9 | ||
|- | |- | ||
| 7991 || [5.0.0+] [[#IReadOnlyApplicationRecordInterface|GetReadOnlyApplicationRecordInterface]] | | 7991 || [5.0.0+] [[#IReadOnlyApplicationRecordInterface|GetReadOnlyApplicationRecordInterface]] || 8 | ||
|- | |- | ||
| 7992 || [4.0.0+] [[#IECommerceInterface|GetECommerceInterface]] | | 7992 || [4.0.0+] [[#IECommerceInterface|GetECommerceInterface]] || 7 | ||
|- | |- | ||
| 7993 || [4.0.0+] [[#IApplicationVersionInterface|GetApplicationVersionInterface]] | | 7993 || [4.0.0+] [[#IApplicationVersionInterface|GetApplicationVersionInterface]] || 6 | ||
|- | |- | ||
| 7994 || [[#IFactoryResetInterface|GetFactoryResetInterface]] | | 7994 || [[#IFactoryResetInterface|GetFactoryResetInterface]] || 5 | ||
|- | |- | ||
| 7995 || [[#IAccountProxyInterface|GetAccountProxyInterface]] | | 7995 || [[#IAccountProxyInterface|GetAccountProxyInterface]] || 4 | ||
|- | |- | ||
| 7996 || [[#IApplicationManagerInterface|GetApplicationManagerInterface]] | | 7996 || [[#IApplicationManagerInterface|GetApplicationManagerInterface]] || 3 | ||
|- | |- | ||
| 7997 || [[#IDownloadTaskInterface|GetDownloadTaskInterface]] | | 7997 || [[#IDownloadTaskInterface|GetDownloadTaskInterface]] || 1 | ||
|- | |- | ||
| 7998 || [[#IContentManagementInterface|GetContentManagementInterface]] | | 7998 || [[#IContentManagementInterface|GetContentManagementInterface]] || 0 | ||
|- | |- | ||
| 7999 || [[#IDocumentInterface|GetDocumentInterface]] | | 7999 || [[#IDocumentInterface|GetDocumentInterface]] || 2 | ||
|} | |||
Permissions state field with each service: | |||
{| class="wikitable" border="1" | |||
|- | |||
! Service || Permissions | |||
|- | |||
| ns:web || 0x304 | |||
|- | |||
| ns:ec || 0x83 | |||
|- | |||
| ns:sweb || 0x387 | |||
|- | |||
| ns:rid || 0x10 | |||
|- | |||
| ns:rt || 0x20 | |||
|- | |||
| ns:ro || 0x301 | |||
|- | |||
| ns:am2 || 0x7FF | |||
|} | |} | ||
Line 1,148: | Line 1,169: | ||
| 3050 || [14.0.0+] ListAssignELicenseTaskResult | | 3050 || [14.0.0+] ListAssignELicenseTaskResult | ||
|- | |- | ||
| 3100 || [17.0.0+] GetSafeSystemVersionCheckInfo | | 3100 || [17.0.0+] [[#GetSafeSystemVersionCheckInfo|GetSafeSystemVersionCheckInfo]] | ||
|- | |- | ||
| 3101 || [17.0.0+] RequestUpdateSafeSystemVersionCheckInfo | | 3101 || [17.0.0+] [[#RequestUpdateSafeSystemVersionCheckInfo|RequestUpdateSafeSystemVersionCheckInfo]] | ||
|- | |- | ||
| 3102 || [17.0.0+] ResetSafeSystemVersionCheckInfo | | 3102 || [17.0.0+] [[#ResetSafeSystemVersionCheckInfo|ResetSafeSystemVersionCheckInfo]] | ||
|- | |- | ||
| 3104 || [18.0.0+] GetApplicationNintendoLogo | | 3104 || [18.0.0+] GetApplicationNintendoLogo | ||
Line 2,300: | Line 2,321: | ||
==== Cmd101 ==== | ==== Cmd101 ==== | ||
Takes a type-0x16 output buffer containing a 0x300-byte struct, an input u8, an u64. Returns | Takes a type-0x16 output buffer containing a 0x300-byte struct, an input u8, an u64. Returns an output u8, an u8 [[Filesystem_services|ContentAttributes]], and a [[NCM_services#ProgramId|ProgramId]]. | ||
This is similar to Cmd2524. On [S2] this is used instead of Cmd2524. | |||
==== Cmd2524 ==== | ==== Cmd2524 ==== | ||
Takes a type-0x16 output buffer containing a 0x300-byte struct, an input u8, an u64. Returns an output u8 and | Takes a type-0x16 output buffer containing a 0x300-byte struct, an input u8, an u64. Returns an output u8 [[Filesystem_services|ContentAttributes]] and a [[NCM_services#ProgramId|ProgramId]]. | ||
The user-process uses the output from this as the input for [[Filesystem_services|OpenFileSystemWithId]] (out-buffer is used as the [[Filesystem_services|FspPath]]). | |||
=== IDownloadTaskInterface === | === IDownloadTaskInterface === | ||
Line 2,374: | Line 2,399: | ||
| 2 || [10.0.0+] IsDataCorruptedResult || | | 2 || [10.0.0+] IsDataCorruptedResult || | ||
|- | |- | ||
| 3 || [20.0.0+] || | | 3 || [20.0.0+] [[#ListApplicationRecord|ListApplicationRecord]] || | ||
|} | |} | ||
Line 2,707: | Line 2,732: | ||
| 1202 || [4.0.0+] [[#GetSafeSystemVersion]] | | 1202 || [4.0.0+] [[#GetSafeSystemVersion]] | ||
|- | |- | ||
| 3100 || [18.0.0+] | | 3100 || [18.0.0+] [[#GetSafeSystemVersionCheckInfo|GetSafeSystemVersionCheckInfo]] | ||
|- | |- | ||
| 3101 || [18.0.0+] | | 3101 || [18.0.0+] [[#RequestUpdateSafeSystemVersionCheckInfo|RequestUpdateSafeSystemVersionCheckInfo]] | ||
|- | |- | ||
| 3102 || [18.0.0+] | | 3102 || [18.0.0+] [[#ResetSafeSystemVersionCheckInfo|ResetSafeSystemVersionCheckInfo]] | ||
|} | |} | ||
Line 2,717: | Line 2,742: | ||
No input, returns an output u8 bool flag. | No input, returns an output u8 bool flag. | ||
Web-applets use this command to check if the system needs an update. | [S1] Web-applets use this command to check if the system needs an update. | ||
== UpdateSafeSystemVersionForDebug == | == UpdateSafeSystemVersionForDebug == | ||
Line 2,731: | Line 2,756: | ||
No input, returns an output [[NCM_services#ContentMetaKey|ContentMetaKey]] with the cached contents of "ns_ssversion:/entry" ([[NCM_services#ApplicationId|ApplicationId]], u32 '''version''' and u32 '''policy''' from <code>vulnerability!needs_update_vulnerability_policy</code>). | No input, returns an output [[NCM_services#ContentMetaKey|ContentMetaKey]] with the cached contents of "ns_ssversion:/entry" ([[NCM_services#ApplicationId|ApplicationId]], u32 '''version''' and u32 '''policy''' from <code>vulnerability!needs_update_vulnerability_policy</code>). | ||
== | == GetSafeSystemVersionCheckInfo == | ||
No input, returns 0x10-bytes of output. | No input, returns 0x10-bytes of output. | ||
== | [S2] Used by web-applets via ns:vm. | ||
== RequestUpdateSafeSystemVersionCheckInfo == | |||
No input, returns an output Event handle and an [[#IAsyncResult|IAsyncResult]]. | No input, returns an output Event handle and an [[#IAsyncResult|IAsyncResult]]. | ||
== | [S2] Used by web-applets via ns:vm. | ||
The async task thread uses [[NIM_services|nim]] RequestCheckSafeSystemVersion, etc. | |||
== ResetSafeSystemVersionCheckInfo == | |||
No input/output. | No input/output. | ||
This throws an error if [[Settings_services|GetDebugModeFlag]] returns false. | |||
= ns:su = | = ns:su = |