Changes

1,077 bytes added ,  05:56, 7 November 2019
Line 852: Line 852:  
| 2012 || [4.0.0+] GetReceiveApplicationProgress
 
| 2012 || [4.0.0+] GetReceiveApplicationProgress
 
|-
 
|-
| 2013 || [4.0.0+] RequestSendApplication
+
| 2013 || [4.0.0+] [[#RequestSendApplication]]
 
|-
 
|-
 
| 2014 || [4.0.0+] GetSendApplicationProgress
 
| 2014 || [4.0.0+] GetSendApplicationProgress
Line 1,011: Line 1,011:     
An error is thrown if any bit is set in ApplicationDeliveryAttributeTag besides bit1. The output array-count must be at least 1: only 1 entry will be written to this array (hence on success total_out will also only be 1 on success).
 
An error is thrown if any bit is set in ApplicationDeliveryAttributeTag besides bit1. The output array-count must be at least 1: only 1 entry will be written to this array (hence on success total_out will also only be 1 on success).
 +
 +
=== 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]].
 +
 +
The [[NCM_services#ContentMetaType|ContentMetaType]] must match Patch.
 +
 +
This does various setup and selects a ContentMetaKey to use from the input, then creates the [[#IAsyncResult]] + the async thread which handles the [[#IAsyncResult]] operation. Then the thread does:
 +
 +
* Calls a func which does:
 +
** Throws an error if a state flag is set.
 +
** Uses [[NIM_services|nim]] cmd60, returning the Result on failure.
 +
** Uses [[NIM_services|nim]] cmd61, returning the Result on failure. Waits for the IAsyncResult operation from this to finish, then uses the Get cmd to get the output Result.
 +
** Handles cleanup and returns.
 +
* On success, this loads various data which is then used for saving a SystemPlayReport when a state flag is set.
 +
** The EventId is "send_app_contents" with ApplicationId <NS ProgramId>.
    
=== IApplicationVersionInterface ===
 
=== IApplicationVersionInterface ===