NS services: Difference between revisions

 
(7 intermediate revisions by 3 users not shown)
Line 359: Line 359:


== GetApplicationContentPath ==
== GetApplicationContentPath ==
Takes a 0x16-type output buffer, an u8 [[NCM_services#ContentMetaType|ContentMetaType]], and an [[NCM_services#ApplicationId|ApplicationId]].
Takes a 0x16-type output buffer, an u8 [[NCM_services#ContentType|ContentType]], and an [[NCM_services#ApplicationId|ApplicationId]].


The input [[NCM_services#ApplicationId|ApplicationId]] is used with the application-title table like various other cmds, anything not in that table can't be used with this.
The input [[NCM_services#ApplicationId|ApplicationId]] is used with the application-title table like various other cmds, anything not in that table can't be used with this.
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 likely a permissions check for service+command.
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]] || 10
|-
| 7989 || [5.1.0+] [[#IReadOnlyApplicationControlDataInterface|GetReadOnlyApplicationControlDataInterface]] || 9
|-
| 7991 || [5.0.0+] [[#IReadOnlyApplicationRecordInterface|GetReadOnlyApplicationRecordInterface]] || 8
|-
| 7992 || [4.0.0+] [[#IECommerceInterface|GetECommerceInterface]] || 7
|-
| 7993 || [4.0.0+] [[#IApplicationVersionInterface|GetApplicationVersionInterface]] || 6
|-
| 7994 || [[#IFactoryResetInterface|GetFactoryResetInterface]] || 5
|-
| 7995 || [[#IAccountProxyInterface|GetAccountProxyInterface]] || 4
|-
| 7996 || [[#IApplicationManagerInterface|GetApplicationManagerInterface]] || 3
|-
|-
| 7988 || [6.0.0+] [[#IDynamicRightsInterface|GetDynamicRightsInterface]]
| 7997 || [[#IDownloadTaskInterface|GetDownloadTaskInterface]] || 1
|-
|-
| 7989 || [5.1.0+] [[#IReadOnlyApplicationControlDataInterface|GetReadOnlyApplicationControlDataInterface]]
| 7998 || [[#IContentManagementInterface|GetContentManagementInterface]] || 0
|-
|-
| 7991 || [5.0.0+] [[#IReadOnlyApplicationRecordInterface|GetReadOnlyApplicationRecordInterface]]
| 7999 || [[#IDocumentInterface|GetDocumentInterface]] || 2
|}
 
Permissions state field with each service:
 
{| class="wikitable" border="1"
|-
|-
| 7992 || [4.0.0+] [[#IECommerceInterface|GetECommerceInterface]]
! Service || Permissions
|-
|-
| 7993 || [4.0.0+] [[#IApplicationVersionInterface|GetApplicationVersionInterface]]
| ns:web || 0x304
|-
|-
| 7994 || [[#IFactoryResetInterface|GetFactoryResetInterface]]
| ns:ec || 0x83
|-
|-
| 7995 || [[#IAccountProxyInterface|GetAccountProxyInterface]]
| ns:sweb || 0x387
|-
|-
| 7996 || [[#IApplicationManagerInterface|GetApplicationManagerInterface]]
| ns:rid || 0x10
|-
|-
| 7997 || [[#IDownloadTaskInterface|GetDownloadTaskInterface]]
| ns:rt || 0x20
|-
|-
| 7998 || [[#IContentManagementInterface|GetContentManagementInterface]]
| ns:ro || 0x301
|-
|-
| 7999 || [[#IDocumentInterface|GetDocumentInterface]]
| ns:am2 || 0x7FF
|}
|}


Line 709: Line 730:
|-
|-
| 427 || [20.0.0+]
| 427 || [20.0.0+]
|-
| 428 || [21.0.0+]
|-
| 429 || [21.0.0+]
|-
| 430 || [21.0.0+]
|-
|-
| 502 || [[#RequestCheckGameCardRegistration]]
| 502 || [[#RequestCheckGameCardRegistration]]
Line 737: Line 764:
|-
|-
| 515 || [20.0.0+]
| 515 || [20.0.0+]
|-
| 516 || [21.0.0+]
|-
| 517 || [21.0.0+]
|-
| 518 || [21.0.0+]
|-
| 519 || [21.0.0+]
|-
|-
| 600 || [[#CountApplicationContentMeta]]
| 600 || [[#CountApplicationContentMeta]]
Line 843: Line 878:
|-
|-
| 933 || [20.1.0+]
| 933 || [20.1.0+]
|-
| 934 || [21.0.0+]
|-
| 935 || [21.0.0+]
|-
| 936 || [21.0.0+]
|-
|-
| 1000 || [[#RequestVerifyApplicationDeprecated]]
| 1000 || [[#RequestVerifyApplicationDeprecated]]
Line 1,069: Line 1,110:
|-
|-
| 2368 || [20.0.0+]
| 2368 || [20.0.0+]
|-
| 2369 || [21.0.0+]
|-
|-
| 2400 || [8.0.0+] [[#GetPromotionInfo]]
| 2400 || [8.0.0+] [[#GetPromotionInfo]]
Line 1,333: Line 1,376:
|-
|-
| 4097 || [20.0.0+]
| 4097 || [20.0.0+]
|-
| 4099 || [21.0.0+]
|-
|-
| 5000 || [18.0.0+]  
| 5000 || [18.0.0+]  
Line 1,548: Line 1,593:


This is essentially an async wrapper for [[#GetApplicationControlData]], with support for multiple ApplicationIds.
This is essentially an async wrapper for [[#GetApplicationControlData]], with support for multiple ApplicationIds.
==== Cmd421 ====
Takes an input TransferMemory handle, a type-0x5 input buffer containing an array of u64 [[NCM_services#ApplicationId|ApplicationIds]], an u8 [[#ApplicationControlSource]], an u64 size, returns an output Event handle and an [[#IAsyncValue]].
This is essentially the same as [[#ListApplicationTitle|ListApplicationTitle]] except the ApplicationControlSource is used here (ListApplicationTitle ignores it and uses 0xF0 instead).
The async task impl code eventually compares ApplicationControlSource with 0xF0, with a separate code-path being used when it doesn't match (which also handles [[NACP|compression]] when needed).


==== RequestCheckGameCardRegistration ====
==== RequestCheckGameCardRegistration ====
Line 2,259: Line 2,311:
|-
|-
| 607 || [[#IsAnyApplicationRunning]]
| 607 || [[#IsAnyApplicationRunning]]
|-
| 608 || [21.0.0+]
|}
|}


Line 2,378: Line 2,432:
| 2 || [10.0.0+] IsDataCorruptedResult ||
| 2 || [10.0.0+] IsDataCorruptedResult ||
|-
|-
| 3 || [20.0.0+] ||
| 3 || [20.0.0+] [[#ListApplicationRecord|ListApplicationRecord]] ||
|}
|}


Line 2,400: Line 2,454:
| 4 || [9.0.0+] SelectApplicationDesiredLanguage ||
| 4 || [9.0.0+] SelectApplicationDesiredLanguage ||
|-
|-
| 5 || [19.0.0+] ||
| 5 || [19.0.0+] || Same as [[#IApplicationManagerInterface]] cmd 411
|-
|-
| 6 || [19.0.0+] ||
| 6 || [19.0.0+] || Same as [[#IApplicationManagerInterface]] cmd 416
|-
|-
| 7 || [20.0.0+] ||
| 7 || [20.0.0+] || Same as [[#IApplicationManagerInterface]] cmd 921
|-
|-
| 8 || [20.0.0+] ||
| 8 || [20.0.0+] || Same as [[#IApplicationManagerInterface]] cmd 922
|-
|-
| 9 || [20.0.0+] ||
| 9 || [20.0.0+] || Same as [[#IApplicationManagerInterface]] cmd 923
|-
|-
| 10 || [20.0.0+] ||
| 10 || [20.0.0+] || Same as [[#IApplicationManagerInterface]] cmd 421
|-
|-
| 11 || [20.0.0+] ||
| 11 || [20.0.0+] || Same as [[#IApplicationManagerInterface]] cmd 422
|-
|-
| 12 || [20.0.0+] ||
| 12 || [20.0.0+] || Same as [[#IApplicationManagerInterface]] cmd 423
|-
|-
| 13 || [20.0.0+] ||
| 13 || [20.0.0+] || Same as [[#IApplicationManagerInterface]] cmd 407
|-
|-
| 14 || [20.0.0+] ||
| 14 || [20.0.0+] || Same as [[#IApplicationManagerInterface]] cmd 408
|-
|-
| 15 || [20.0.0+] ||
| 15 || [20.0.0+] || Same as [[#IApplicationManagerInterface]] cmd 415
|-
|-
| 16 || [20.0.0+] ||
| 16 || [20.0.0+] ||
|-
|-
| 17 || [20.1.0+] ||
| 17 || [20.1.0+] || Same as [[#IApplicationManagerInterface]] cmd 933
|-
| 18 || [21.0.0+] ||
|-
| 19 || [21.0.0+] ||
|-
| 20 || [21.0.0+] ||
|-
| 21 || [21.0.0+] ||
|-
| 22 || [21.0.0+] ||
|}
|}


Line 2,489: Line 2,553:
|-
|-
| 28 || [20.0.0+]
| 28 || [20.0.0+]
|-
| 29 || [21.0.0+]
|-
| 30 || [21.0.0+]
|}
|}


Line 2,584: Line 2,652:
|-
|-
| 13 || [20.0.0+]
| 13 || [20.0.0+]
|-
| 14 || [21.0.0+]
|}
|}


Line 4,792: Line 4,862:
| 0x21 || 0x1 || [20.0.0+] ProperProgramExists. Set to whether the bit for ProperProgramExists is set from [[NCM_services|ncm]] IContentMetaDatabase GetAttributes.
| 0x21 || 0x1 || [20.0.0+] ProperProgramExists. Set to whether the bit for ProperProgramExists is set from [[NCM_services|ncm]] IContentMetaDatabase GetAttributes.
|-
|-
| 0x22 || 0xBE || Reserved
| 0x22 || 0x1 || [S2]
|-
| 0x23 || 0xBD || Reserved
|-
|-
| 0xE0 || 0x20 || HMAC-SHA256 over the previous 0xE0-bytes. Uses a different key than [[#SystemDeliveryInfo]].
| 0xE0 || 0x20 || HMAC-SHA256 over the previous 0xE0-bytes. Uses a different key than [[#SystemDeliveryInfo]].