Go to the documentation of this file.
10 #include "../sf/service.h"
11 #include "../services/ncm_types.h"
12 #include "../services/async.h"
13 #include "../services/acc.h"
14 #include "../services/fs.h"
15 #include "../applets/error.h"
16 #include "../kernel/event.h"
17 #include "../kernel/tmem.h"
230 #define NSSU_CARDUPDATE_TMEM_SIZE_DEFAULT 0x100000
1305 Result nsvmNeedsUpdateVulnerability(
bool *out);
1327 Result nsdevTerminateApplication(
void);
1331 Result nsdevLaunchApplicationWithStorageIdForDevelop(
u64* out_pid,
u64 application_id,
u32 flags,
u8 app_storage_id,
u8 patch_storage_id);
Result nsDeleteRedundantApplicationEntity(void)
DeleteRedundantApplicationEntity.
Result nsGetApplicationDesiredLanguage(NacpStruct *nacp, NacpLanguageEntry **langentry)
GetApplicationDesiredLanguage.
int64_t s64
64-bit signed integer.
Definition: types.h:28
Result nsListContentMetaKeyToDeliverApplication(NcmContentMetaKey *meta, s32 meta_count, s32 meta_index, const NsApplicationDeliveryInfo *info, s32 info_count, s32 *total_out)
ListContentMetaKeyToDeliverApplication.
Result nsRequestRegisterGameCard(AsyncResult *a, AccountUid uid, u64 application_id, s32 inval)
RequestRegisterGameCard.
Result nsResetToFactorySettingsWithPlatformRegionAuthentication(void)
ResetToFactorySettingsWithPlatformRegionAuthentication.
Result nssuControlGetDownloadedEulaDataSize(NsSystemUpdateControl *c, const char *path, u64 *filesize)
Gets the filesize for the specified DownloadedEulaData.
u8 meta_type
NcmContentMetaType
Definition: ns.h:84
NsApplicationControlSource
ApplicationControlSource.
Definition: ns.h:29
u64 application_id
ApplicationId.
Definition: ns.h:124
NsApplicationContentMetaStatus.
Definition: ns.h:83
Result nsvmInitialize(void)
Initialize ns:vm. On pre-3.0.0 this must be used with nsInitialize.
Service * nsGetServiceSession_ApplicationManagerInterface(void)
Gets the Service object for IApplicationManagerInterface. Only initialized on pre-3....
Result nssuControlGetReceivedEulaData(NsSystemUpdateControl *c, const char *path, void *buffer, size_t size, u64 *filesize)
Gets the specified ReceivedEulaData.
Result nssuControlSetupToReceiveSystemUpdate(NsSystemUpdateControl *c)
Does setup for ReceiveSystemUpdate by using the same nim cmds as nssuDestroySystemUpdateTask.
Result nsRequestNoDownloadRightsErrorResolution(AsyncValue *a, u64 application_id)
RequestNoDownloadRightsErrorResolution.
Result nsRequestGameCardRegistrationGoldPoint(AsyncValue *a, AccountUid uid, u64 application_id)
RequestGameCardRegistrationGoldPoint.
Result nssuControlGetReceiveProgress(NsSystemUpdateControl *c, NsSystemUpdateProgress *out)
GetReceiveProgress.
DownloadTaskStatus.
Definition: ns.h:225
ContentMetaKey.
Definition: ncm_types.h:72
@ NsBackgroundNetworkUpdateState_Downloading
Sysupdate download in progress.
Definition: ns.h:38
NcmStorageId
StorageId.
Definition: ncm_types.h:12
Result nsCompareSystemDeliveryInfo(const NsSystemDeliveryInfo *info0, const NsSystemDeliveryInfo *info1, s32 *out)
Both NsSystemDeliveryInfo are validated, then the system_update_meta_version in the first/second NsSy...
Result nsRequestDownloadTaskListData(AsyncValue *a)
RequestDownloadTaskListData.
Result nsSelectLatestSystemDeliveryInfo(const NsSystemDeliveryInfo *sys_list, s32 sys_count, const NsSystemDeliveryInfo *base_info, const NsApplicationDeliveryInfo *app_list, s32 app_count, s32 *index)
SelectLatestSystemDeliveryInfo.
Result nsGetReadOnlyApplicationControlDataInterface(Service *srv_out)
Gets the Service object for IReadOnlyApplicationControlDataInterface via the cmd for that.
u32 unk_x40
Unknown.
Definition: ns.h:133
Result nsdevPrepareLaunchProgramFromHost(NsLaunchProperties *out, const char *path, size_t path_len)
[1.0.0-9.2.0]
Result nsDeleteApplicationEntity(u64 application_id)
DeleteApplicationEntity.
Result nsNeedsSystemUpdateToFormatSdCard(bool *out)
NeedsSystemUpdateToFormatSdCard.
u8 unk_x3c
Same as NsApplicationView::unk_x44.
Definition: ns.h:118
u64 application_id
Same as NsApplicationView::application_id.
Definition: ns.h:109
void nsProgressAsyncResultClose(NsProgressAsyncResult *a)
Close a NsProgressAsyncResult.
Result nsGetApplicationRecordUpdateSystemEvent(Event *out_event)
GetApplicationRecordUpdateSystemEvent.
NsSystemUpdateProgress NsReceiveApplicationProgress
ReceiveApplicationProgress. Same as NsSystemUpdateProgress, except cmds which return this will return...
Definition: ns.h:176
Result nssuControlGetPrepareCardUpdateProgress(NsSystemUpdateControl *c, NsSystemUpdateProgress *out)
GetPrepareCardUpdateProgress.
Result nsCalculateApplicationDownloadRequiredSize(u64 application_id, NcmStorageId *storage_id, s64 *size)
CalculateApplicationApplyDeltaRequiredSize.
Result nssuClearExFatDriverStatusForDebug(void)
ClearExFatDriverStatusForDebug.
Result nsGetContentManagementInterface(Service *srv_out)
Gets the Service object for IContentManagementInterface via the cmd for that.
Result nsRequestDownloadTaskList(void)
RequestDownloadTaskList.
Result nssuControlHasPreparedCardUpdate(NsSystemUpdateControl *c, bool *out)
HasPreparedCardUpdate.
ApplicationDeliveryInfo.
Definition: ns.h:203
Result nssuGetSendSystemUpdateProgress(NsSystemUpdateProgress *out)
GetSendSystemUpdateProgress.
Result nsGetApplicationVersionInterface(Service *srv_out)
Gets the Service object for IApplicationVersionInterface via the cmd for that.
@ NsLatestSystemUpdate_Unknown0
Unknown.
Definition: ns.h:44
Result nsDeleteApplicationCompletely(u64 application_id)
DeleteApplicationCompletely.
uint8_t u8
8-bit unsigned integer.
Definition: types.h:19
Result nssuControlSetupCardUpdate(NsSystemUpdateControl *c, void *buffer, size_t size)
SetupCardUpdate.
u32 application_version
Application version.
Definition: ns.h:206
Result nsProgressAsyncResultGetDetailResult(NsProgressAsyncResult *a)
GetDetailResult.
Result nssuControlSetupCardUpdateViaSystemUpdater(NsSystemUpdateControl *c, void *buffer, size_t size)
SetupCardUpdateViaSystemUpdater.
u8 flags_x18
qlaunch uses bit0-bit4 and bit7 from here.
Definition: ns.h:219
Kernel-mode event structure.
Definition: event.h:13
Result nsListApplicationRecord(NsApplicationRecord *records, s32 count, s32 entry_offset, s32 *out_entrycount)
Gets an listing of NsApplicationRecord.
Result nsProgressMonitorForDeleteUserSaveDataAllGetSystemEvent(NsProgressMonitorForDeleteUserSaveDataAll *p, Event *out_event)
GetSystemEvent.
Result nsDisableAutoCommit(void)
DisableAutoCommit.
AsyncResult.
Definition: async.h:20
Result nsCleanupUnavailableAddOnContents(u64 application_id, AccountUid uid)
CleanupUnavailableAddOnContents.
Result nsGetApplicationViewWithPromotionInfo(NsApplicationViewWithPromotionInfo *out, const u64 *application_ids, s32 count)
GetApplicationViewWithPromotionInfo.
Result nsResetToFactorySettingsWithoutUserSaveData(void)
ResetToFactorySettingsWithoutUserSaveData.
Result nsdevGetShellEventInfo(NsShellEventInfo *out)
[1.0.0-9.2.0]
u32 includes_exfat
Whether ExFat is included. Unused by nssuRequestSendSystemUpdate / nssuControlRequestReceiveSystemUpd...
Definition: ns.h:191
Result nsVerifyDeliveryProtocolVersion(const NsSystemDeliveryInfo *info)
VerifyDeliveryProtocolVersion.
Result nsProgressAsyncResultGetErrorContext(NsProgressAsyncResult *a, ErrorContext *context)
Gets the ErrorContext.
Result nsGetDownloadTaskInterface(Service *srv_out)
Gets the Service object for IDownloadTaskInterface via the cmd for that.
s64 current_size
Current size. This value can be larger than total_size when the async operation is finishing....
Definition: ns.h:171
Result nsdevLaunchApplicationForDevelop(u64 *out_pid, u64 application_id, u32 flags)
[1.0.0-9.2.0]
Result nsdevLaunchApplicationFromHost(u64 *out_pid, const char *path, size_t path_len, u32 flags)
[10.0.0+]
u32 unk_x38
Same as NsApplicationView::unk_x40.
Definition: ns.h:117
Result nsvmGetSafeSystemVersion(NcmContentMetaKey *out)
[4.0.0+]
@ NsShellEvent_Start
Start.
Definition: ns.h:23
Result nsGetStorageSize(NcmStorageId storage_id, s64 *total_space_size, s64 *free_space_size)
Temporarily mounts the specified fs ContentStorage, then uses fs GetTotalSpaceSize/GetFreeSpaceSize w...
TransferMemory tmem
TransferMemory for SetupCardUpdate/SetupCardUpdateViaSystemUpdater.
Definition: ns.h:68
Result nsGetLastSdCardFormatUnexpectedResult(void)
GetLastSdCardFormatUnexpectedResult.
@ NsBackgroundNetworkUpdateState_Ready
Sysupdate ready, pending install.
Definition: ns.h:39
u8 padding
Padding.
Definition: ns.h:87
Account UserId.
Definition: acc.h:25
u32 unk_x14
Unknown.
Definition: ns.h:207
Result nsResumeApplicationApplyDelta(u64 application_id)
ResumeApplicationApplyDelta.
Result nssuNotifyBackgroundNetworkUpdate(const NcmContentMetaKey *key)
This checks whether a sysupdate is needed with the input NcmContentMetaKey using NCM commands,...
Result nsResumeApplicationDownload(u64 application_id)
ResumeApplicationDownload.
@ NsLatestSystemUpdate_Unknown1
Unknown.
Definition: ns.h:45
@ NsApplicationControlSource_Storage
Returns data from storage if not present in cache.
Definition: ns.h:31
u8 unk_x19
Unused by nssuRequestSendSystemUpdate / nssuControlRequestReceiveSystemUpdate, besides HMAC validatio...
Definition: ns.h:195
Result nsdevTerminateProgram(u64 tid)
[1.0.0-9.2.0]
RequestServerStopper.
Definition: ns.h:50
Transfer memory information structure.
Definition: tmem.h:13
int32_t s32
32-bit signed integer.
Definition: types.h:27
u32 system_delivery_protocol_version
Must match a system-setting.
Definition: ns.h:189
ns ApplicationControlProperty
Definition: nacp.h:34
u32 required_system_version
Required system version, see NsSystemDeliveryInfo::system_update_meta_version.
Definition: ns.h:208
Result nssuControlGetDownloadProgress(NsSystemUpdateControl *c, NsSystemUpdateProgress *out)
GetDownloadProgress.
SystemUpdateProgress. Commands which have this as output will return 0 with the output cleared,...
Definition: ns.h:170
Result nsUnregisterNetworkServiceAccountWithUserSaveDataDeletion(AccountUid uid)
UnregisterNetworkServiceAccountWithUserSaveDataDeletion.
Result nsDisableApplicationAutoDelete(u64 application_id)
DisableApplicationAutoDelete.
Result nsGetApplicationManagerInterface(Service *srv_out)
Gets the Service object for IApplicationManagerInterface via the cmd for that.
u8 unk_x44
Unknown.
Definition: ns.h:134
Result nsGetRequestServerStopper(NsRequestServerStopper *r)
Opens a NsRequestServerStopper.
Result nsGetFreeSpaceSize(NcmStorageId storage_id, s64 *size)
Returns the available storage capacity from content manager services.
Result nsProgressMonitorForDeleteUserSaveDataAllClose(NsProgressMonitorForDeleteUserSaveDataAll *p)
Close a NsProgressMonitorForDeleteUserSaveDataAll.
SystemDeliveryInfo.
Definition: ns.h:187
Result nsRequestReceiveApplication(AsyncResult *a, u32 addr, u16 port, u64 application_id, const NcmContentMetaKey *meta, s32 count, NcmStorageId storage_id)
RequestReceiveApplication.
Result nsRequestCheckGameCardRegistration(AsyncResult *a, u64 application_id)
RequestCheckGameCardRegistration.
Result nsListApplicationIdOnGameCard(u64 *application_ids, s32 count, s32 *total_out)
ListApplicationIdOnGameCard.
u64 application_id
ApplicationId.
Definition: ns.h:94
Result nsClearTaskStatusList(void)
ClearTaskStatusList.
u8 unk_x1a
Unknown.
Definition: ns.h:196
Result nsProgressMonitorForDeleteUserSaveDataAllGetResult(NsProgressMonitorForDeleteUserSaveDataAll *p)
GetResult.
Result nsRequestEnsureDownloadTask(AsyncResult *a)
RequestEnsureDownloadTask.
Result nsdevGetShellEvent(Event *out_event)
Autoclear for nsdevShellEvent is always true. [1.0.0-9.2.0].
NsShellEvent event
NsShellEvent
Definition: ns.h:165
Result nssuOpenSystemUpdateControl(NsSystemUpdateControl *c)
Opens a NsSystemUpdateControl.
Service * nsGetServiceSession_GetterInterface(void)
Gets the Service object for the actual ns:* service session. Only initialized on [3....
void nsvmExit(void)
Exit ns:vm.
FsSaveDataSpaceId
SaveDataSpaceId.
Definition: fs.h:192
Result nsDeleteSaveData(FsSaveDataSpaceId save_data_space_id, u64 save_data_id)
DeleteSaveData.
Language entry. These strings are UTF-8.
Definition: nacp.h:10
Result nsFormatSdCard(void)
FormatSdCard.
Result nsGetDocumentInterface(Service *srv_out)
Gets the Service object for IDocumentInterface via the cmd for that.
AsyncValue.
Definition: async.h:14
Result nsGetApplicationViewDeprecated(NsApplicationViewDeprecated *views, const u64 *application_ids, s32 count)
GetApplicationViewDeprecated.
Result nsGetLastGameCardMountFailureResult(void)
GetLastGameCardMountFailureResult.
Result nsCheckSdCardMountStatus(void)
CheckSdCardMountStatus.
Result nsCanDeliverApplication(const NsApplicationDeliveryInfo *info0, s32 count0, const NsApplicationDeliveryInfo *info1, s32 count1, bool *out)
CanDeliverApplication.
Service * nsvmGetServiceSession(void)
Gets the Service object for ns:vm. This is only initialized on [3.0.0+].
Result nsGetApplicationRightsOnClient(NsApplicationRightsOnClient *rights, s32 count, u64 application_id, AccountUid uid, u32 flags, s32 *total_out)
GetApplicationRightsOnClient.
Result nssuControlHasDownloaded(NsSystemUpdateControl *c, bool *out)
Gets whether a network sysupdate was downloaded, with install pending.
ApplicationRecord.
Definition: ns.h:93
Result nsCheckApplicationLaunchVersion(u64 application_id)
CheckApplicationLaunchVersion.
void nsRequestServerStopperClose(NsRequestServerStopper *r)
Close a NsRequestServerStopper.
Result nsDeleteUserSaveDataAll(NsProgressMonitorForDeleteUserSaveDataAll *p, AccountUid uid)
DeleteUserSaveDataAll.
Result nssuPrepareShutdown(void)
This does shutdown preparation.
ProgressMonitorForDeleteUserSaveDataAll.
Definition: ns.h:55
ApplicationView.
Definition: ns.h:123
uint32_t u32
32-bit unsigned integer.
Definition: types.h:21
NsLatestSystemUpdate
LatestSystemUpdate.
Definition: ns.h:43
Result nsListApplicationTitle(AsyncValue *a, NsApplicationControlSource source, const u64 *application_ids, s32 count, void *buffer, size_t size)
ListApplicationTitle.
u8 is_application
Whether this is an Application.
Definition: ns.h:160
Result nsRequestSendApplication(AsyncResult *a, u32 addr, u16 port, u64 application_id, const NcmContentMetaKey *meta, s32 count)
RequestSendApplication.
Result nsRequestSyncRights(AsyncResult *a)
RequestSyncRights.
Service * nsdevGetServiceSession(void)
Gets the Service object for ns:dev.
Result nsCompareApplicationDeliveryInfo(const NsApplicationDeliveryInfo *info0, s32 count0, const NsApplicationDeliveryInfo *info1, s32 count1, s32 *out)
Both NsApplicationDeliveryInfo are validated, then the application_version in the first/second NsAppl...
u32 flags
Same as NsApplicationView::flags.
Definition: ns.h:111
Result nssuControlApplyReceivedUpdate(NsSystemUpdateControl *c)
ApplyReceivedUpdate.
Service s
IProgressMonitorForDeleteUserSaveDataAll.
Definition: ns.h:56
Result nssuControlHasReceived(NsSystemUpdateControl *c, bool *out)
HasReceived.
Result nsNeedsSystemUpdateToDeliverApplication(const NsApplicationDeliveryInfo *info, s32 count, const NsSystemDeliveryInfo *sys_info, bool *out)
After validation etc, this sets the output bool by comparing system-version fields in the NsSystemDel...
Result nsGetReadOnlyApplicationRecordInterface(Service *srv_out)
Gets the Service object for IReadOnlyApplicationRecordInterface via the cmd for that.
@ NsShellEvent_Debug
Debug.
Definition: ns.h:25
u8 storageID
NcmStorageId
Definition: ns.h:85
Result nsListDownloadTaskStatus(NsDownloadTaskStatus *tasks, s32 count, s32 *total_out)
ListDownloadTaskStatus.
u16 unk_x24
Same as NsApplicationView::unk_x24.
Definition: ns.h:114
Result nsResumeAll(void)
ResumeAll.
Result nsGetTotalSpaceSize(NcmStorageId storage_id, s64 *size)
Returns the total storage capacity (used + free) from content manager services.
Result nssuControlRequestDownloadLatestUpdate(NsSystemUpdateControl *c, AsyncResult *a)
RequestDownloadLatestUpdate.
Result nssuControlApplyCardUpdate(NsSystemUpdateControl *c)
ApplyCardUpdate.
@ NsShellEvent_None
None.
Definition: ns.h:21
u32 unk_x1c
Unknown.
Definition: ns.h:209
uint64_t u64
64-bit unsigned integer.
Definition: types.h:22
ApplicationOccupiedSize.
Definition: ns.h:78
Result nsResetToFactorySettingsWithPlatformRegion(void)
ResetToFactorySettingsWithPlatformRegion.
u32 unk_x20
Unknown.
Definition: ns.h:128
Result nsEstimateRequiredSize(const NcmContentMetaKey *meta, s32 count, s64 *out)
EstimateRequiredSize.
LaunchProperties.
Definition: ns.h:155
Service s
ISystemUpdateControl.
Definition: ns.h:67
Result nsCommitReceiveApplication(u64 application_id)
CommitReceiveApplication.
Result nsTouchApplication(u64 application_id)
TouchApplication.
u32 system_update_meta_version
SystemUpdate meta version.
Definition: ns.h:192
Result nssuDestroySystemUpdateTask(void)
This uses nim ListSystemUpdateTask, then when a task is returned uses it with DestroySystemUpdateTask...
Result nsGetECommerceInterface(Service *srv_out)
Gets the Service object for IECommerceInterface via the cmd for that.
Result nsIsApplicationEntityMovable(u64 application_id, NcmStorageId storage_id, bool *out)
IsApplicationEntityMovable.
u64 program_id
program_id.
Definition: ns.h:156
u64 process_id
processID.
Definition: ns.h:166
Service s
IProgressAsyncResult.
Definition: ns.h:61
Result nsdevInitialize(void)
Initialize ns:dev.
Result nsCancelApplicationApplyDelta(u64 application_id)
CancelApplicationApplyDelta.
Result nsProgressAsyncResultGetProgress(NsProgressAsyncResult *a, void *buffer, size_t size)
Gets the progress.
Result nsGetApplicationDeliveryInfo(NsApplicationDeliveryInfo *info, s32 count, u64 application_id, u32 attr, s32 *total_out)
Generates NsApplicationDeliveryInfo for the specified ApplicationId.
ApplicationControlData.
Definition: ns.h:72
Result nssuGetBackgroundNetworkUpdateState(NsBackgroundNetworkUpdateState *out)
Gets the NsBackgroundNetworkUpdateState.
Result nsGetGameCardMountFailureEvent(Event *out_event)
GetGameCardMountFailureEvent.
u32 Result
Function error code result type.
Definition: types.h:44
Result nsTriggerDynamicCommitEvent(void)
TriggerDynamicCommitEvent.
Result nsProgressMonitorForDeleteUserSaveDataAllGetProgress(NsProgressMonitorForDeleteUserSaveDataAll *p, NsProgressForDeleteUserSaveDataAll *progress)
GetProgress.
Result nssuNotifySystemUpdateForContentDelivery(void)
Signals the event returned by nssuGetSystemUpdateNotificationEventForContentDelivery.
Result nsCountApplicationContentMeta(u64 application_id, s32 *out)
CountApplicationContentMeta.
Result nsClearApplicationTerminateResult(u64 application_id)
ClearApplicationTerminateResult.
Result nsGetFactoryResetInterface(Service *srv_out)
Gets the Service object for IFactoryResetInterface via the cmd for that.
Result nsRequestLinkDevice(AsyncResult *a, AccountUid uid)
RequestLinkDevice.
Result nsCalculateApplicationOccupiedSize(u64 application_id, NsApplicationOccupiedSize *out)
CalculateApplicationOccupiedSize.
ProgressForDeleteUserSaveDataAll.
Definition: ns.h:103
u32 version
Application version.
Definition: ns.h:88
Result nsdevIsSystemMemoryResourceLimitBoosted(bool *out)
[6.0.0-8.1.0]
void nsdevExit(void)
Initialize ns:dev.
u8 index
Index.
Definition: ns.h:159
Result nsProgressAsyncResultGet(NsProgressAsyncResult *a)
Gets the Result.
Result nsGetSdCardMountStatusChangedEvent(Event *out_event)
GetSdCardMountStatusChangedEvent.
Result nssuControlRequestCheckLatestUpdate(NsSystemUpdateControl *c, AsyncValue *a)
RequestCheckLatestUpdate.
Service * nssuGetServiceSession(void)
Gets the Service object for ns:su.
s64 total_size
Total size, this field is only valid when >0.
Definition: ns.h:172
u64 application_id
ApplicationId.
Definition: ns.h:217
void nssuControlClose(NsSystemUpdateControl *c)
Close a NsSystemUpdateControl.
Result nsResetToFactorySettingsForRefurbishment(void)
ResetToFactorySettingsForRefurbishment.
Result nsGetGameCardUpdateDetectionEvent(Event *out_event)
GetGameCardUpdateDetectionEvent.
NsBackgroundNetworkUpdateState
BackgroundNetworkUpdateState.
Definition: ns.h:36
u8 storageID
NcmStorageId
Definition: ns.h:158
Result nsGetApplicationView(NsApplicationView *views, const u64 *application_ids, s32 count)
GetApplicationView.
void nssuExit(void)
Exit ns:su.
Result nsInitialize(void)
Initialize ns services. Uses ns:am on pre-3.0.0, ns:am2 on [3.0.0+].
Result nssuControlApplyDownloadedUpdate(NsSystemUpdateControl *c)
ApplyDownloadedUpdate.
Result nsProgressAsyncResultWait(NsProgressAsyncResult *a, u64 timeout)
Waits for the async operation to finish using the specified timeout.
Result nsGetLastSdCardMountUnexpectedResult(void)
GetLastSdCardMountUnexpectedResult.
AccountUid uid
AccountUid
Definition: ns.h:218
u8 flags_x19
qlaunch uses bit0 from here.
Definition: ns.h:220
Result nsGetApplicationControlData(NsApplicationControlSource source, u64 application_id, NsApplicationControlData *buffer, size_t size, u64 *actual_size)
Gets the NsApplicationControlData for the specified application.
Result nssuNotifyExFatDriverRequired(void)
Uses nim ListSystemUpdateTask, then uses the task with DestroySystemUpdateTask if it exists.
NsSystemUpdateProgress NsSendApplicationProgress
SendApplicationProgress. Same as NsSystemUpdateProgress, except cmds which return this will return ac...
Definition: ns.h:179
Result nsSetApplicationTerminateResult(u64 application_id, Result res)
SetApplicationTerminateResult.
Result nsIsGameCardInserted(bool *out)
IsGameCardInserted.
Result nsGetSystemDeliveryInfo(NsSystemDeliveryInfo *info)
Generates a NsSystemDeliveryInfo using the currently installed SystemUpdate meta.
@ NsShellEvent_Exit
Exit.
Definition: ns.h:22
Result nssuRequestSendSystemUpdate(AsyncResult *a, u32 addr, u16 port, NsSystemDeliveryInfo *info)
RequestSendSystemUpdate.
NacpStruct nacp
NacpStruct
Definition: ns.h:73
Result nssuInitialize(void)
Initialize ns:su.
u8 unk_x02
Unknown.
Definition: ns.h:86
u8 unk_x18
Copied into state by nssuRequestSendSystemUpdate.
Definition: ns.h:194
Result nssuControlRequestPrepareCardUpdate(NsSystemUpdateControl *c, AsyncResult *a)
RequestPrepareCardUpdate.
Result nsEnsureGameCardAccess(void)
EnsureGameCardAccess.
Result nsProgressMonitorForDeleteUserSaveDataAllIsFinished(NsProgressMonitorForDeleteUserSaveDataAll *p, bool *out)
IsFinished.
Result nssuControlGetPreparedCardUpdateEulaData(NsSystemUpdateControl *c, const char *path, void *buffer, size_t size, u64 *filesize)
Gets the specified PreparedCardUpdateEulaData.
ProgressAsyncResult.
Definition: ns.h:60
Result nsdevGetRunningApplicationProcessIdForDevelop(u64 *out_pid)
[6.0.0+]
Result nsRequestVerifyApplication(NsProgressAsyncResult *a, u64 application_id, u32 unk, void *buffer, size_t size)
RequestVerifyApplication.
u64 application_id
ApplicationId.
Definition: ns.h:89
Result nsGetAccountProxyInterface(Service *srv_out)
Gets the Service object for IAccountProxyInterface via the cmd for that.
Event event
Event with autoclear=false.
Definition: ns.h:62
@ NsLatestSystemUpdate_Unknown2
Unknown.
Definition: ns.h:46
Error context.
Definition: error.h:38
Result nssuControlGetReceivedEulaDataSize(NsSystemUpdateControl *c, const char *path, u64 *filesize)
Gets the filesize for the specified ReceivedEulaData.
Result nsEnableAutoCommit(void)
EnableAutoCommit.
Result nsGetApplicationTerminateResult(u64 application_id, Result *res)
GetApplicationTerminateResult.
Result nsRequestDownloadApplicationPrepurchasedRights(AsyncResult *a, u64 application_id)
RequestDownloadApplicationPrepurchasedRights.
Result nsGetApplicationViewDownloadErrorContext(u64 application_id, ErrorContext *context)
GetApplicationViewDownloadErrorContext.
Result nsHasAllContentsToDeliver(const NsApplicationDeliveryInfo *info, s32 count, bool *out)
HasAllContentsToDeliver.
Result nsWithdrawApplicationUpdateRequest(u64 application_id)
WithdrawApplicationUpdateRequest.
Result nsGetSendApplicationProgress(u64 application_id, NsSendApplicationProgress *out)
GetSendApplicationProgress.
u8 unk_x10
Unknown.
Definition: ns.h:98
Service s
IRequestServerStopper.
Definition: ns.h:51
@ NsApplicationControlSource_StorageOnly
Returns data from storage without using cache.
Definition: ns.h:32
u32 application_delivery_protocol_version
Loaded from a system-setting. Unused by nssuRequestSendSystemUpdate / nssuControlRequestReceiveSystem...
Definition: ns.h:190
Result nsRequestUpdateApplication2(AsyncResult *a, u64 application_id)
RequestUpdateApplication2.
Service object structure.
Definition: service.h:13
Result nsIsApplicationUpdateRequested(u64 application_id, bool *flag, u32 *out)
IsApplicationUpdateRequested.
Result nsMoveApplicationEntity(u64 application_id, NcmStorageId storage_id)
MoveApplicationEntity.
Result nsCancelApplicationDownload(u64 application_id)
CancelApplicationDownload.
Result nsdevSetCurrentApplicationRightsEnvironmentCanBeActiveForDevelop(bool can_be_active)
[6.0.0+]
@ NsApplicationControlSource_CacheOnly
Returns data from cache.
Definition: ns.h:30
Result nsGetReceiveApplicationProgress(u64 application_id, NsReceiveApplicationProgress *out)
GetReceiveApplicationProgress.
Result nsRequestApplicationUpdateInfo(AsyncValue *a, u64 application_id)
RequestApplicationUpdateInfo.
Result nsIsAnyApplicationRunning(bool *out)
IsAnyApplicationRunning.
@ NsShellEvent_Crash
Crash.
Definition: ns.h:24
u8 unk_x09
Unknown.
Definition: ns.h:96
Result nsTryCommitCurrentApplicationDownloadTask(void)
TryCommitCurrentApplicationDownloadTask.
Result nsProgressAsyncResultCancel(NsProgressAsyncResult *a)
Cancels the async operation.
Result nsGetDynamicRightsInterface(Service *srv_out)
Gets the Service object for IDynamicRightsInterface via the cmd for that.
u32 flags
Flags.
Definition: ns.h:126
Result nssuControlRequestCheckLatestUpdateIncludesRebootlessUpdate(NsSystemUpdateControl *c, AsyncValue *a)
RequestCheckLatestUpdateIncludesRebootlessUpdate.
Result nssuControlRequestReceiveSystemUpdate(NsSystemUpdateControl *c, AsyncResult *a, u32 addr, u16 port, NsSystemDeliveryInfo *info)
RequestReceiveSystemUpdate.
Result nssuRequestBackgroundNetworkUpdate(void)
RequestBackgroundNetworkUpdate.
Result nsEnableApplicationAutoDelete(u64 application_id)
EnableApplicationAutoDelete.
Result nsListNotCommittedContentMeta(NcmContentMetaKey *meta, s32 count, u64 application_id, s32 unk, s32 *total_out)
ListNotCommittedContentMeta.
Result nsRequestResolveNoDownloadRightsError(AsyncValue *a, u64 application_id)
RequestResolveNoDownloadRightsError.
Result nsGetApplicationDeliveryInfoHash(const NsApplicationDeliveryInfo *info, s32 count, u8 *out_hash)
This extracts data from the input array for hashing with SHA256, with validation being done when hand...
ShellEventInfo.
Definition: ns.h:164
u32 unk_x20
Same as NsApplicationView::unk_x20.
Definition: ns.h:113
ApplicationViewDeprecated. The below comments are for the NsApplicationView to NsApplicationViewDepre...
Definition: ns.h:108
Result nssuNotifyExFatDriverDownloadedForDebug(void)
NotifyExFatDriverDownloadedForDebug.
u64 system_update_meta_id
SystemUpdate meta Id.
Definition: ns.h:193
Result nssuGetSystemUpdateNotificationEventForContentDelivery(Event *out_event)
Gets an Event which can be signaled by nssuNotifySystemUpdateForContentDelivery.
Result nsRequestDownloadApplicationControlData(AsyncResult *a, u64 application_id)
RequestDownloadApplicationControlData.
Result nsListApplicationContentMetaStatus(u64 application_id, s32 index, NsApplicationContentMetaStatus *list, s32 count, s32 *out_entrycount)
Gets an listing of NsApplicationContentMetaStatus.
Result nsCalculateApplicationApplyDeltaRequiredSize(u64 application_id, NcmStorageId *storage_id, s64 *size)
CalculateApplicationApplyDeltaRequiredSize.
EulaDataPath.
Definition: ns.h:182
u16 unk_x24
Unknown.
Definition: ns.h:129
SystemUpdateControl.
Definition: ns.h:66
Result nsRequestVerifyAddOnContentsRights(NsProgressAsyncResult *a, u64 application_id)
RequestVerifyAddOnContentsRights.
Result nsResetToFactorySettings(void)
ResetToFactorySettings.
Result nsRequestUnlinkDevice(AsyncResult *a, AccountUid uid)
RequestUnlinkDevice.
NsShellEvent
ShellEvent.
Definition: ns.h:20
Result nsdevLaunchProgram(u64 *out_pid, const NsLaunchProperties *properties, u32 flags)
[1.0.0-9.2.0]
uint16_t u16
16-bit unsigned integer.
Definition: types.h:20
u8 type
Type.
Definition: ns.h:95
Result nssuControlGetDownloadedEulaData(NsSystemUpdateControl *c, const char *path, void *buffer, size_t size, u64 *filesize)
Gets the specified DownloadedEulaData.
Result nsListApplicationIcon(AsyncValue *a, NsApplicationControlSource source, const u64 *application_ids, s32 count, void *buffer, size_t size)
ListApplicationIcon.
Result nsGetPromotionInfo(NsPromotionInfo *promotion, u64 application_id, AccountUid uid)
GetPromotionInfo.
Result nsIsAnyApplicationEntityInstalled(u64 application_id, bool *out)
IsAnyApplicationEntityInstalled.
void nsExit(void)
Exit ns services.
Result nsUnregisterNetworkServiceAccount(AccountUid uid)
UnregisterNetworkServiceAccount.
@ NsBackgroundNetworkUpdateState_None
No sysupdate task exists.
Definition: ns.h:37
Result nsCleanupSdCard(void)
CleanupSdCard.
u32 version
Program version.
Definition: ns.h:157
NsApplicationRightsOnClient.
Definition: ns.h:216
Result nssuControlGetPreparedCardUpdateEulaDataSize(NsSystemUpdateControl *c, const char *path, u64 *filesize)
Gets the filesize for the specified PreparedCardUpdateEulaData.
Result nsDeleteUserSystemSaveData(AccountUid uid, u64 system_save_data_id)
DeleteUserSystemSaveData.