ns: Fixed cmd order.

This commit is contained in:
yellows8 2020-02-06 20:07:02 -05:00
parent 2486175f55
commit 52a892ca31
No known key found for this signature in database
GPG Key ID: 0AF90DA3F1E60E43
2 changed files with 34 additions and 34 deletions

View File

@ -163,26 +163,6 @@ Service* nsGetServiceSession_ApplicationManagerInterface(void);
*/ */
Result nsListApplicationRecord(NsApplicationRecord* records, s32 count, s32 entry_offset, s32* out_entrycount); Result nsListApplicationRecord(NsApplicationRecord* records, s32 count, s32 entry_offset, s32* out_entrycount);
/**
* @brief Gets an listing of \ref NsApplicationContentMetaStatus.
* @param[in] application_id ApplicationId.
* @param[in] index Starting entry index.
* @param[out] list Output array of \ref NsApplicationContentMetaStatus.
* @param[in] count Size of the list array in entries.
* @param[out] out_entrycount Total output entries.
*/
Result nsListApplicationContentMetaStatus(u64 application_id, s32 index, NsApplicationContentMetaStatus* list, s32 count, s32* out_entrycount);
/**
* @brief Gets the \ref NsApplicationControlData for the specified application.
* @param[in] source Source, official sw uses ::NsApplicationControlSource_Storage.
* @param[in] application_id ApplicationId.
* @param[out] buffer \ref NsApplicationControlData
* @param[in] size Size of the buffer.
* @param[out] actual_size Actual output size.
*/
Result nsGetApplicationControlData(NsApplicationControlSource source, u64 application_id, NsApplicationControlData* buffer, size_t size, u64* actual_size);
/** /**
* @brief Returns the total storage capacity (used + free) from content manager services. * @brief Returns the total storage capacity (used + free) from content manager services.
* @param[in] storage_id \ref NcmStorageId. Must be ::NcmStorageId_SdCard. * @param[in] storage_id \ref NcmStorageId. Must be ::NcmStorageId_SdCard.
@ -197,6 +177,26 @@ Result nsGetTotalSpaceSize(NcmStorageId storage_id, u64 *size);
*/ */
Result nsGetFreeSpaceSize(NcmStorageId storage_id, u64 *size); Result nsGetFreeSpaceSize(NcmStorageId storage_id, u64 *size);
/**
* @brief Gets the \ref NsApplicationControlData for the specified application.
* @param[in] source Source, official sw uses ::NsApplicationControlSource_Storage.
* @param[in] application_id ApplicationId.
* @param[out] buffer \ref NsApplicationControlData
* @param[in] size Size of the buffer.
* @param[out] actual_size Actual output size.
*/
Result nsGetApplicationControlData(NsApplicationControlSource source, u64 application_id, NsApplicationControlData* buffer, size_t size, u64* actual_size);
/**
* @brief Gets an listing of \ref NsApplicationContentMetaStatus.
* @param[in] application_id ApplicationId.
* @param[in] index Starting entry index.
* @param[out] list Output array of \ref NsApplicationContentMetaStatus.
* @param[in] count Size of the list array in entries.
* @param[out] out_entrycount Total output entries.
*/
Result nsListApplicationContentMetaStatus(u64 application_id, s32 index, NsApplicationContentMetaStatus* list, s32 count, s32* out_entrycount);
/** /**
* @brief Generates a \ref NsSystemDeliveryInfo using the currently installed SystemUpdate meta. * @brief Generates a \ref NsSystemDeliveryInfo using the currently installed SystemUpdate meta.
* @note Only available on [4.0.0+]. * @note Only available on [4.0.0+].

View File

@ -175,16 +175,12 @@ Result nsListApplicationRecord(NsApplicationRecord* records, s32 count, s32 entr
); );
} }
Result nsListApplicationContentMetaStatus(u64 application_id, s32 index, NsApplicationContentMetaStatus* list, s32 count, s32* out_entrycount) { Result nsGetTotalSpaceSize(NcmStorageId storage_id, u64 *size) {
const struct { return _nsCmdInU64OutU64(&g_nsAppManSrv, storage_id, size, 47);
s32 index; }
u64 application_id;
} in = { index, application_id };
return serviceDispatchInOut(&g_nsAppManSrv, 601, in, *out_entrycount, Result nsGetFreeSpaceSize(NcmStorageId storage_id, u64 *size) {
.buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out }, return _nsCmdInU64OutU64(&g_nsAppManSrv, storage_id, size, 48);
.buffers = { { list, count*sizeof(NsApplicationContentMetaStatus) } },
);
} }
Result nsGetApplicationControlData(NsApplicationControlSource source, u64 application_id, NsApplicationControlData* buffer, size_t size, u64* actual_size) { Result nsGetApplicationControlData(NsApplicationControlSource source, u64 application_id, NsApplicationControlData* buffer, size_t size, u64* actual_size) {
@ -203,12 +199,16 @@ Result nsGetApplicationControlData(NsApplicationControlSource source, u64 applic
return rc; return rc;
} }
Result nsGetTotalSpaceSize(NcmStorageId storage_id, u64 *size) { Result nsListApplicationContentMetaStatus(u64 application_id, s32 index, NsApplicationContentMetaStatus* list, s32 count, s32* out_entrycount) {
return _nsCmdInU64OutU64(&g_nsAppManSrv, storage_id, size, 47); const struct {
} s32 index;
u64 application_id;
} in = { index, application_id };
Result nsGetFreeSpaceSize(NcmStorageId storage_id, u64 *size) { return serviceDispatchInOut(&g_nsAppManSrv, 601, in, *out_entrycount,
return _nsCmdInU64OutU64(&g_nsAppManSrv, storage_id, size, 48); .buffer_attrs = { SfBufferAttr_HipcMapAlias | SfBufferAttr_Out },
.buffers = { { list, count*sizeof(NsApplicationContentMetaStatus) } },
);
} }
Result nsGetSystemDeliveryInfo(NsSystemDeliveryInfo *info) { Result nsGetSystemDeliveryInfo(NsSystemDeliveryInfo *info) {