mirror of
https://github.com/switchbrew/libnx.git
synced 2025-07-29 21:22:13 +02:00
ns: Added nsEstimateSizeToMove.
This commit is contained in:
parent
4ff1c52869
commit
94cfa2be1c
@ -771,6 +771,18 @@ Result nsIsAnyApplicationEntityInstalled(u64 application_id, bool *out);
|
||||
*/
|
||||
Result nsCleanupUnavailableAddOnContents(u64 application_id, AccountUid uid);
|
||||
|
||||
/**
|
||||
* @brief EstimateSizeToMove
|
||||
* @note Only available on [10.0.0+].
|
||||
* @param[in] storage_ids Array of u8 \ref NcmStorageId.
|
||||
* @param[in] count Size of the storage_ids array in entries.
|
||||
* @param[in] storage_id storage_id \ref NcmStorageId
|
||||
* @param[in] flags Flags
|
||||
* @param[in] application_id ApplicationId.
|
||||
* @param[out] Out Output value.
|
||||
*/
|
||||
Result nsEstimateSizeToMove(u8 *storage_ids, s32 count, NcmStorageId storage_id, u32 flags, u64 application_id, s64 *out);
|
||||
|
||||
/**
|
||||
* @brief FormatSdCard
|
||||
* @note Only available on [2.0.0+].
|
||||
|
@ -1309,6 +1309,29 @@ Result nsCleanupUnavailableAddOnContents(u64 application_id, AccountUid uid) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result nsEstimateSizeToMove(u8 *storage_ids, s32 count, NcmStorageId storage_id, u32 flags, u64 application_id, s64 *out) {
|
||||
if (hosversionBefore(10,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
||||
Service srv={0};
|
||||
Result rc = nsGetApplicationManagerInterface(&srv);
|
||||
|
||||
const struct {
|
||||
u8 storage_id;
|
||||
u8 pad[3];
|
||||
u32 flags;
|
||||
u64 application_id;
|
||||
} in = { storage_id, {0}, flags, application_id };
|
||||
|
||||
if (R_SUCCEEDED(rc)) rc = serviceDispatchInOut(&srv, 1311, in, *out,
|
||||
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_In },
|
||||
.buffers = { { storage_ids, count*sizeof(u8) } },
|
||||
);
|
||||
|
||||
serviceClose(&srv);
|
||||
return rc;
|
||||
}
|
||||
|
||||
Result nsFormatSdCard(void) {
|
||||
if (hosversionBefore(2,0,0))
|
||||
return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||
|
Loading…
Reference in New Issue
Block a user