Applet Manager services: Difference between revisions
No edit summary |
|||
Line 146: | Line 146: | ||
==== PopRequestLaunchApplicationForDebug ==== | ==== PopRequestLaunchApplicationForDebug ==== | ||
Takes a type-0x6 output buffer containing an array of u128 userIDs, returns an output | Takes a type-0x6 output buffer containing an array of u128 userIDs, returns an output [[NCM_services#ApplicationId|ApplicationId]] and an output s32 '''total_userIDs'''. | ||
The total entries in the userID buffer must be >= {total userIDs in state}. | The total entries in the userID buffer must be >= {total userIDs in state}. | ||
Line 290: | Line 290: | ||
==== CreateApplication ==== | ==== CreateApplication ==== | ||
Takes an input | Takes an input [[NCM_services#ApplicationId|ApplicationId]], returns an [[#IApplicationAccessor]]. | ||
==== PopLaunchRequestedApplication ==== | ==== PopLaunchRequestedApplication ==== | ||
Line 296: | Line 296: | ||
==== CreateSystemApplication ==== | ==== CreateSystemApplication ==== | ||
Takes an input | Takes an input [[NCM_services#ApplicationId|SystemApplicationId]], returns an [[#IApplicationAccessor]]. | ||
[[qlaunch]] only uses this with a hard-coded | [[qlaunch]] only uses this with a hard-coded id for the "starter" title. | ||
==== PopFloatingApplicationForDevelopment ==== | ==== PopFloatingApplicationForDevelopment ==== | ||
Line 368: | Line 368: | ||
===== GetApplicationId ===== | ===== GetApplicationId ===== | ||
No input, returns an output | No input, returns an output [[NCM_services#ApplicationId|ApplicationId]]. | ||
===== PushLaunchParameter ===== | ===== PushLaunchParameter ===== | ||
Line 421: | Line 419: | ||
===== HasSaveDataAccessPermission ===== | ===== HasSaveDataAccessPermission ===== | ||
Takes an input | Takes an input [[NCM_services#ApplicationId|ApplicationId]], returns an output u8 bool flag. | ||
Gets whether the savedata specified by the input | Gets whether the savedata specified by the input ApplicationId is accessible. The output flag indicates whether it's accessible. | ||
If the | If the ApplicationId matches the current application, this immediately returns success with flag=1. | ||
===== PushToFriendInvitationStorageChannel ===== | ===== PushToFriendInvitationStorageChannel ===== | ||
Line 714: | Line 712: | ||
==== GetCurrentApplicationId ==== | ==== GetCurrentApplicationId ==== | ||
No input, returns an output | No input, returns an output [[NCM_services#ApplicationId|ApplicationId]]. | ||
Gets the | Gets the [[NCM_services#ApplicationId|ApplicationId]] for the currently running Application. ApplicationId=0 when no Application is running. | ||
==== RequestExitToSelf ==== | ==== RequestExitToSelf ==== | ||
Line 724: | Line 722: | ||
==== CreateApplicationAndPushAndRequestToLaunch ==== | ==== CreateApplicationAndPushAndRequestToLaunch ==== | ||
Takes an input | Takes an input [[NCM_services#ApplicationId|ApplicationId]] and an input #IStorage, no output. | ||
This is is similar to [[#CreateApplicationAndPushAndRequestToStart]]. | This is is similar to [[#CreateApplicationAndPushAndRequestToStart]]. | ||
Line 819: | Line 817: | ||
==== GetApplicationIdForLogo ==== | ==== GetApplicationIdForLogo ==== | ||
No input, returns an output | No input, returns an output [[NCM_services#ApplicationId|ApplicationId]]. | ||
Gets the | Gets the ApplicationId for displaying the logo screen during application launch. | ||
When no application is running, this returns success with | When no application is running, this returns success with ApplicationId=0. | ||
==== SetGpuTimeSliceBoost ==== | ==== SetGpuTimeSliceBoost ==== | ||
Line 1,010: | Line 1,008: | ||
==== CreateApplicationAndPushAndRequestToStart ==== | ==== CreateApplicationAndPushAndRequestToStart ==== | ||
Takes an input | Takes an input [[NCM_services#ApplicationId|ApplicationId]] and an input [[#IStorage]], no output. ApplicationId=0 can be used to relaunch the current application. | ||
==== CreateApplicationAndPushAndRequestToStartForQuest ==== | ==== CreateApplicationAndPushAndRequestToStartForQuest ==== | ||
Takes 2 input u32s (loaded from struct [[#ApplicationAttributeForQuest]]), an input | Takes 2 input u32s (loaded from struct [[#ApplicationAttributeForQuest]]), an input [[NCM_services#ApplicationId|ApplicationId]], and an input [[#IStorage]], no output. | ||
==== CreateApplicationAndRequestToStart ==== | ==== CreateApplicationAndRequestToStart ==== | ||
Takes an input | Takes an input [[NCM_services#ApplicationId|ApplicationId]], no output. | ||
Same as [[#CreateApplicationAndPushAndRequestToStart]] except without the input storage, official sw uses this when no input storage is specified. | Same as [[#CreateApplicationAndPushAndRequestToStart]] except without the input storage, official sw uses this when no input storage is specified. | ||
==== CreateApplicationAndRequestToStartForQuest ==== | ==== CreateApplicationAndRequestToStartForQuest ==== | ||
Takes 2 input u32s (loaded from struct [[#ApplicationAttributeForQuest]]) and an input | Takes 2 input u32s (loaded from struct [[#ApplicationAttributeForQuest]]) and an input [[NCM_services#ApplicationId|ApplicationId]], no output. | ||
Same as [[#CreateApplicationAndPushAndRequestToStartForQuest]] except without the input storage, official sw uses this when no input storage is specified. | Same as [[#CreateApplicationAndPushAndRequestToStartForQuest]] except without the input storage, official sw uses this when no input storage is specified. | ||
==== CreateApplicationWithAttributeAndPushAndRequestToStartForQuest ==== | ==== CreateApplicationWithAttributeAndPushAndRequestToStartForQuest ==== | ||
Takes an input | Takes an input [[NCM_services#ApplicationId|ApplicationId]], a type-0x15 input buffer containing an [[#ApplicationAttribute]], an input [[#IStorage]], no output. | ||
Same as [[#CreateApplicationAndPushAndRequestToStartForQuest]] except the entire attributes structure is directly specified via the input buffer. This command replaces [[#CreateApplicationAndPushAndRequestToStartForQuest]], official user-processes no longer use [[#CreateApplicationAndPushAndRequestToStartForQuest]]. | Same as [[#CreateApplicationAndPushAndRequestToStartForQuest]] except the entire attributes structure is directly specified via the input buffer. This command replaces [[#CreateApplicationAndPushAndRequestToStartForQuest]], official user-processes no longer use [[#CreateApplicationAndPushAndRequestToStartForQuest]]. | ||
==== CreateApplicationWithAttributeAndRequestToStartForQuest ==== | ==== CreateApplicationWithAttributeAndRequestToStartForQuest ==== | ||
Takes an input | Takes an input [[NCM_services#ApplicationId|ApplicationId]] and a type-0x15 input buffer containing an [[#ApplicationAttribute]], no output. | ||
Same as [[#CreateApplicationAndRequestToStartForQuest]] except the entire attributes structure is directly specified via the input buffer. This command replaces [[#CreateApplicationAndRequestToStartForQuest]], official user-processes no longer use [[#CreateApplicationAndPushAndRequestToStartForQuest]]. | Same as [[#CreateApplicationAndRequestToStartForQuest]] except the entire attributes structure is directly specified via the input buffer. This command replaces [[#CreateApplicationAndRequestToStartForQuest]], official user-processes no longer use [[#CreateApplicationAndPushAndRequestToStartForQuest]]. | ||
Line 1,151: | Line 1,149: | ||
==== QueryApplicationPlayStatistics ==== | ==== QueryApplicationPlayStatistics ==== | ||
Takes a type-0x6 output buffer containing an array of [[Shared_Database_services|ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of | Takes a type-0x6 output buffer containing an array of [[Shared_Database_services|ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of [[NCM_services#ApplicationId|ApplicationId]]. Returns an output s32 for actual total output entries. | ||
The number of entries in each array is the same. | The number of entries in each array is the same. | ||
Line 1,160: | Line 1,158: | ||
==== QueryApplicationPlayStatisticsByUid ==== | ==== QueryApplicationPlayStatisticsByUid ==== | ||
Takes a u128 userID, a type-0x6 output buffer containing an array of [[Shared_Database_services|ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of | Takes a u128 userID, a type-0x6 output buffer containing an array of [[Shared_Database_services|ApplicationPlayStatistics]] and a type-0x5 input buffer containing an array of [[NCM_services#ApplicationId|ApplicationId]]. Returns an output s32 for actual total output entries. | ||
Same as [[#QueryApplicationPlayStatistics]] except this uses [[Shared_Database_services|pdm:qry]] cmd16, to get playstats specific to userIDs. | Same as [[#QueryApplicationPlayStatistics]] except this uses [[Shared_Database_services|pdm:qry]] cmd16, to get playstats specific to userIDs. | ||
Line 1,602: | Line 1,600: | ||
=== GetApplicationIdByContentActionName === | === GetApplicationIdByContentActionName === | ||
Takes a type-0x5 input buffer containing a string, returns an output | Takes a type-0x5 input buffer containing a string, returns an output [[NCM_services#ApplicationId|ApplicationId]]. | ||
Gets the | Gets the ApplicationId for the specified ContentActionName string. Returns an error when the current [[#AppletId]] isn't 0x04 (when the current applet isn't a SystemApplication). | ||
=== SetCpuBoostMode === | === SetCpuBoostMode === | ||
Line 2,350: | Line 2,348: | ||
=== RequestLaunchApplicationWithUserAndArgumentForDebug === | === RequestLaunchApplicationWithUserAndArgumentForDebug === | ||
Takes an input u8 bool flag, an | Takes an input u8 bool flag, an [[NCM_services#ApplicationId|ApplicationId]], a type-0x5 input buffer containing an array of u128 userIDs, and a type-0x5 input buffer, no output. | ||
Requests to launch the specified Application, with the specified users. When the bool flag is true, the content of the second input buffer is used to create a storage which is pushed to the UserChannel for this Application (see [[#LaunchParameterKind]]). | Requests to launch the specified Application, with the specified users. When the bool flag is true, the content of the second input buffer is used to create a storage which is pushed to the UserChannel for this Application (see [[#LaunchParameterKind]]). | ||
Line 2,377: | Line 2,375: | ||
=== AlarmSettingNotificationEnableAppEventReserve === | === AlarmSettingNotificationEnableAppEventReserve === | ||
Takes an input [[#IStorage]] and an | Takes an input [[#IStorage]] and an [[NCM_services#ApplicationId|ApplicationId]], no output. | ||
Clears a StorageChannel, pushes the input storage there, and writes the ApplicationId into state. | Clears a StorageChannel, pushes the input storage there, and writes the ApplicationId into state. | ||
Line 2,392: | Line 2,390: | ||
=== FriendInvitationSetApplicationParameter === | === FriendInvitationSetApplicationParameter === | ||
Takes an input [[#IStorage]] and an | Takes an input [[#IStorage]] and an [[NCM_services#ApplicationId|ApplicationId]], no output. | ||
Clears a StorageChannel, pushes the input storage there, and writes the ApplicationId into state. | Clears a StorageChannel, pushes the input storage there, and writes the ApplicationId into state. | ||
Line 2,904: | Line 2,902: | ||
! Description | ! Description | ||
|- | |- | ||
| 0 || u8 ProgramIndex. "ExecuteProgram". [[NS_Services|NS]] handles ProgramIndex by launching | | 0 || u8 ProgramIndex. "ExecuteProgram". [[NS_Services|NS]] handles ProgramIndex by launching ApplicationId+ProgramIndex. After using [[#ExecuteProgram]] with this successfully, official user-processes will enter an infinite loop with sleep-thread value 86400000000000. | ||
|- | |- | ||
| 1 || | | 1 || [[NCM_services#ApplicationId|ApplicationId]]. "JumpToSubApplicationProgramForDevelopment". Only available when [[Settings_services#GetDebugModeFlag|DebugMode]] is 1. | ||
|- | |- | ||
| 2 || u64 = value 0. "RestartProgram" | | 2 || u64 = value 0. "RestartProgram" | ||
Line 2,984: | Line 2,982: | ||
| 0x4 || 0x4 || Padding | | 0x4 || 0x4 || Padding | ||
|- | |- | ||
| 0x8 || 0x8 || | | 0x8 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]] | ||
|} | |} | ||
Line 3,028: | Line 3,026: | ||
! Offset || Size || Description | ! Offset || Size || Description | ||
|- | |- | ||
| 0x0 || 0x8 || | | 0x0 || 0x8 || [[NCM_services#ApplicationId|ApplicationId]] | ||
|- | |- | ||
| 0x8 || 0x4 || Application title-version. | | 0x8 || 0x4 || Application title-version. |