Changes

Jump to navigation Jump to search
4,112 bytes added ,  23:03, 9 November 2019
Line 828: Line 828:  
| 2000 || [4.0.0+] [[#GetSystemDeliveryInfo]]
 
| 2000 || [4.0.0+] [[#GetSystemDeliveryInfo]]
 
|-
 
|-
| 2001 || [4.0.0+] SelectLatestSystemDeliveryInfo
+
| 2001 || [4.0.0+] [[#SelectLatestSystemDeliveryInfo]]
 
|-
 
|-
 
| 2002 || [4.0.0+] [[#VerifyDeliveryProtocolVersion]]
 
| 2002 || [4.0.0+] [[#VerifyDeliveryProtocolVersion]]
Line 836: Line 836:  
| 2004 || [4.0.0+] [[#HasAllContentsToDeliver]]
 
| 2004 || [4.0.0+] [[#HasAllContentsToDeliver]]
 
|-
 
|-
| 2005 || [4.0.0+] CompareApplicationDeliveryInfo
+
| 2005 || [4.0.0+] [[#CompareApplicationDeliveryInfo]]
 
|-
 
|-
| 2006 || [4.0.0+] CanDeliverApplication
+
| 2006 || [4.0.0+] [[#CanDeliverApplication]]
 
|-
 
|-
| 2007 || [4.0.0+] ListContentMetaKeyToDeliverApplication
+
| 2007 || [4.0.0+] [[#ListContentMetaKeyToDeliverApplication]]
 
|-
 
|-
| 2008 || [4.0.0+] NeedsSystemUpdateToDeliverApplication
+
| 2008 || [4.0.0+] [[#NeedsSystemUpdateToDeliverApplication]]
 
|-
 
|-
| 2009 || [4.0.0+] EstimateRequiredSize
+
| 2009 || [4.0.0+] [[#EstimateRequiredSize]]
 
|-
 
|-
 
| 2010 || [4.0.0+] [[#RequestReceiveApplication]]
 
| 2010 || [4.0.0+] [[#RequestReceiveApplication]]
Line 856: Line 856:  
| 2014 || [4.0.0+] [[#GetSendApplicationProgress]]
 
| 2014 || [4.0.0+] [[#GetSendApplicationProgress]]
 
|-
 
|-
| 2015 || [4.0.0+] CompareSystemDeliveryInfo
+
| 2015 || [4.0.0+] [[#CompareSystemDeliveryInfo]]
 
|-
 
|-
| 2016 || [4.0.0+] ListNotCommittedContentMeta
+
| 2016 || [4.0.0+] [[#ListNotCommittedContentMeta]]
 
|-
 
|-
| 2017 || [4.0.0+] RecoverDownloadTask
+
| 2017 || [4.0.0+] [[#RecoverDownloadTask]]
 
|-
 
|-
| 2018 || [5.0.0+] GetApplicationDeliveryInfoHash
+
| 2018 || [5.0.0+] [[#GetApplicationDeliveryInfoHash]]
 
|-
 
|-
 
| 2050 || [6.0.0+] GetApplicationRightsOnClient
 
| 2050 || [6.0.0+] GetApplicationRightsOnClient
Line 1,001: Line 1,001:     
This generates a [[#SystemDeliveryInfo]] using the currently installed SystemUpdate meta title.
 
This generates a [[#SystemDeliveryInfo]] using the currently installed SystemUpdate meta title.
 +
 +
==== SelectLatestSystemDeliveryInfo ====
 +
Takes a type-0x15 input buffer containing a [[#SystemDeliveryInfo]], a type-0x5 input buffer containing an array of [[#SystemDeliveryInfo]], a type-0x5 input buffer containing an array of [[#ApplicationDeliveryInfo]], and returns an output s32.
 +
 +
This determines the latest version from the input [[#ApplicationDeliveryInfo]] array, using value 0 if the array is empty. If this value is less than a state field, the state field value is used instead. Then this selects a [[#SystemDeliveryInfo]] with the latest version from the input array, where the minimum version is the previously mentioned value. The version must also be also be at least the version value from the type-0x15 [[#SystemDeliveryInfo]] buffer. This also does various validation, etc. The output s32 is an index in that array for the selected entry, -1 if none found.
    
==== VerifyDeliveryProtocolVersion ====
 
==== VerifyDeliveryProtocolVersion ====
Line 1,016: Line 1,021:     
The array-count must match 1. After validating the [[#ApplicationDeliveryInfo]], the output bool is set to u32 [[#ApplicationDeliveryInfo]]+0x1C & 0x10000002 != 0x2, then this returns 0.
 
The array-count must match 1. After validating the [[#ApplicationDeliveryInfo]], the output bool is set to u32 [[#ApplicationDeliveryInfo]]+0x1C & 0x10000002 != 0x2, then this returns 0.
 +
 +
==== CompareApplicationDeliveryInfo ====
 +
Takes two type-0x5 input buffers containing an array of [[#ApplicationDeliveryInfo]], returns an output s32.
 +
 +
The array-count for both buffers must be 1, otherwise an error is returned.
 +
 +
Both [[#ApplicationDeliveryInfo]] are validated, then the application-version in the first/second buffer are compared. The output s32 is set to the comparison result: 0 for less than, -1 for equal, and 1 for higher than.
 +
 +
==== CanDeliverApplication ====
 +
Takes two type-0x5 input buffers containing an array of [[#ApplicationDeliveryInfo]], returns an output u8 bool.
 +
 +
The array-count for the second buffer must be 1 and the array-count for the first buffer must be <=1, otherwise an error is returned. If the array-count for the first buffer is 0, this will return 0 with the output bool set to 0.
 +
 +
==== ListContentMetaKeyToDeliverApplication ====
 +
Takes a type-0x6 output buffer containing an array of [[NCM_services#ContentMetaKey|ContentMetaKey]], a type-0x5 input buffer containing an array of [[#ApplicationDeliveryInfo]], a s32, and returns an output s32 total_out.
 +
 +
The array-count for ContentMetaKey must be at least 1, and for ApplicationDeliveryInfo it must match 1.
 +
 +
This will only return 1 ContentMetaKey entry. This will not output the entry when the input s32 is larger than 0. This also does other validation, etc.
 +
 +
==== NeedsSystemUpdateToDeliverApplication ====
 +
Takes a type-0x15 input buffer containing a [[#SystemDeliveryInfo]], a type-0x5 input buffer containing an array of [[#ApplicationDeliveryInfo]], and returns an output u8 bool.
 +
 +
The array-count must match 1.
 +
 +
After validation etc, this sets the output bool by comparing system-version fields in the [[#SystemDeliveryInfo]]/[[#ApplicationDeliveryInfo]] and with a state field.
 +
 +
==== EstimateRequiredSize ====
 +
Takes a type-0x5 input buffer containing an array of [[NCM_services#ContentMetaKey|ContentMetaKey]], returns an output s64.
 +
 +
When the array-count is less than 1, this will return 0 with the s64 set to 0.
    
==== RequestReceiveApplication ====
 
==== RequestReceiveApplication ====
Takes a type-0x5 input buffer containing an array of [[NCM_services#ContentMetaKey|ContentMetaKey]], an u8 [[Filesystem_services#StorageId|StorageId]], an u16 port, an u32 Ipv4Address, an u64 <code>nn::ncm::ApplicationId</code>, returns an output Event handle and an [[#IAsyncResult]].
+
Takes a type-0x5 input buffer containing an array of [[NCM_services#ContentMetaKey|ContentMetaKey]], an u8 <code>nn::ncm::StorageId</code>, an u16 port, an u32 Ipv4Address, an u64 <code>nn::ncm::ApplicationId</code>, returns an output Event handle and an [[#IAsyncResult]].
 +
 
 +
[[qlaunch]] uses value 6 for the StorageId, and value 55556 for the port.
    
An error is thrown if a state flag is not set. An error is thrown if [[NIM_services|nim]] ListApplicationApplyDeltaTask returns a task.
 
An error is thrown if a state flag is not set. An error is thrown if [[NIM_services|nim]] ListApplicationApplyDeltaTask returns a task.
Line 1,046: Line 1,084:  
==== RequestSendApplication ====
 
==== RequestSendApplication ====
 
Takes a type-0x5 input buffer containing an array of [[NCM_services#ContentMetaKey|ContentMetaKey]], an u16 port, an u32 Ipv4Address, an u64 <code>nn::ncm::ApplicationId</code>, returns an output Event handle and an [[#IAsyncResult]].
 
Takes a type-0x5 input buffer containing an array of [[NCM_services#ContentMetaKey|ContentMetaKey]], an u16 port, an u32 Ipv4Address, an u64 <code>nn::ncm::ApplicationId</code>, returns an output Event handle and an [[#IAsyncResult]].
 +
 +
[[qlaunch]] uses value 55556 for the port.
    
An error is thrown if a state flag is not set. An error is thrown if [[NIM_services|nim]] ListApplicationApplyDeltaTask returns a task.
 
An error is thrown if a state flag is not set. An error is thrown if [[NIM_services|nim]] ListApplicationApplyDeltaTask returns a task.
Line 1,065: Line 1,105:     
Same as [[#GetReceiveApplicationProgress]] except this is the Send version, and uses [[NIM_services|nim]] cmd68/cmd63 instead.
 
Same as [[#GetReceiveApplicationProgress]] except this is the Send version, and uses [[NIM_services|nim]] cmd68/cmd63 instead.
 +
 +
==== CompareSystemDeliveryInfo ====
 +
Takes two type-0x15 input buffers containing a [[#SystemDeliveryInfo]], returns an output s32.
 +
 +
This is essentially the same as [[#CompareApplicationDeliveryInfo]], except this compares the [[#SystemDeliveryInfo]] SystemUpdate version.
 +
 +
==== ListNotCommittedContentMeta ====
 +
Takes a type-0x6 output buffer containing an array of [[NCM_services#ContentMetaKey|ContentMetaKey]], a s32, an u64 <code>nn::ncm::ApplicationId</code>, returns an output s32 total_out.
 +
 +
==== RecoverDownloadTask ====
 +
Takes a type-0x5 input buffer containing an array of {unknown} and an input u64, no output.
 +
 +
==== GetApplicationDeliveryInfoHash ====
 +
Takes a type-0x5 input buffer containing an array of [[#ApplicationDeliveryInfo]], returns an output 0x20-byte SHA256 hash.
 +
 +
This extracts data from the input array for hashing with SHA256, with validation being done when handling each entry.
    
=== IApplicationVersionInterface ===
 
=== IApplicationVersionInterface ===
Line 1,844: Line 1,900:  
! Description
 
! Description
 
|-
 
|-
| 0x0 || 0xE0 || ?
+
| 0x0 || 0x10 || ?
 +
|-
 +
| 0x10 || 0x4 || Application version.
 +
|-
 +
| 0x14 || 0x4 || ?
 +
|-
 +
| 0x18 || 0x4 || Required system version.
 +
|-
 +
| 0x1C || 0x4 || ?
 +
|-
 +
| 0x20 || 0xC0 || ?
 
|-
 
|-
 
| 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]].

Navigation menu