Changes

Jump to navigation Jump to search
981 bytes added ,  22:24, 28 October 2019
Line 1,356: Line 1,356:     
== RequestSendSystemUpdate ==
 
== RequestSendSystemUpdate ==
Takes a type-0x15 input buffer containing a [[#SystemDeliveryInfo]], an u16 port, an u32 ip address, returns an output Event handle and an [[#IAsyncResult]].
+
Takes a type-0x15 input buffer containing a [[#SystemDeliveryInfo]], an u16 port, an u32 Ipv4Address, returns an output Event handle and an [[#IAsyncResult]].
    
[[qlaunch]] uses value 55556 for the port. IP is normally a local-WLAN address.
 
[[qlaunch]] uses value 55556 for the port. IP is normally a local-WLAN address.
Line 1,524: Line 1,524:     
=== RequestReceiveSystemUpdate ===
 
=== RequestReceiveSystemUpdate ===
Takes a type-0x15 input buffer containing a [[#SystemDeliveryInfo]], an u16 port, an u32 ip address, returns an output Event handle and an [[#IAsyncResult]].
+
Takes a type-0x15 input buffer containing a [[#SystemDeliveryInfo]], an u16 port, an u32 Ipv4Address, returns an output Event handle and an [[#IAsyncResult]].
    
[[qlaunch]] uses the same value for the port as [[#RequestSendSystemUpdate]].
 
[[qlaunch]] uses the same value for the port as [[#RequestSendSystemUpdate]].
 +
 +
This validates the [[#SystemDeliveryInfo]] and generates a [[NCM_services#ContentMetaKey|ContentMetaKey]], and creates the [[#IAsyncResult]] + the async thread which handles the [[#IAsyncResult]] operation. Then the thread does:
 +
 +
* Calls a func which does:
 +
** Throws an error if [[NIM_services#ListSystemUpdateTask|ListSystemUpdateTask]] returns any task.
 +
** Checks whether a sysupdate is actually required using the previously generated [[NCM_services#ContentMetaKey|ContentMetaKey]], throwing an error if not.
 +
** Uses [[NIM_services|nim]] cmd69, returning the Result on failure.
 +
** Uses [[NIM_services|nim]] cmd72, 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 "receive_system_update" with ApplicationId <NS ProgramId>.
    
=== GetReceiveProgress ===
 
=== GetReceiveProgress ===

Navigation menu