mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-22 13:02:38 +02:00
ncm: add new 13.0.0 commands
This commit is contained in:
parent
49507b86a8
commit
749c5c6157
@ -80,6 +80,8 @@ Result ncmContentStorageFlushPlaceHolder(NcmContentStorage* cs); ///< [3.0.0+]
|
|||||||
Result ncmContentStorageGetSizeFromPlaceHolderId(NcmContentStorage* cs, s64* out_size, const NcmPlaceHolderId* placeholder_id); ///< [4.0.0+]
|
Result ncmContentStorageGetSizeFromPlaceHolderId(NcmContentStorage* cs, s64* out_size, const NcmPlaceHolderId* placeholder_id); ///< [4.0.0+]
|
||||||
Result ncmContentStorageRepairInvalidFileAttribute(NcmContentStorage* cs); ///< [4.0.0+]
|
Result ncmContentStorageRepairInvalidFileAttribute(NcmContentStorage* cs); ///< [4.0.0+]
|
||||||
Result ncmContentStorageGetRightsIdFromPlaceHolderIdWithCache(NcmContentStorage* cs, NcmRightsId* out_rights_id, const NcmPlaceHolderId* placeholder_id, const NcmContentId* cache_content_id); ///< [8.0.0+]
|
Result ncmContentStorageGetRightsIdFromPlaceHolderIdWithCache(NcmContentStorage* cs, NcmRightsId* out_rights_id, const NcmPlaceHolderId* placeholder_id, const NcmContentId* cache_content_id); ///< [8.0.0+]
|
||||||
|
Result ncmContentStorageRegisterPath(NcmContentStorage* cs, const NcmContentId* content_id, const char *path); ///< [13.0.0+]
|
||||||
|
Result ncmContentStorageClearRegisteredPath(NcmContentStorage* cs); ///< [13.0.0+]
|
||||||
|
|
||||||
void ncmContentMetaDatabaseClose(NcmContentMetaDatabase* db);
|
void ncmContentMetaDatabaseClose(NcmContentMetaDatabase* db);
|
||||||
Result ncmContentMetaDatabaseSet(NcmContentMetaDatabase* db, const NcmContentMetaKey* key, const void* data, u64 data_size);
|
Result ncmContentMetaDatabaseSet(NcmContentMetaDatabase* db, const NcmContentMetaKey* key, const void* data, u64 data_size);
|
||||||
|
@ -334,6 +334,24 @@ Result ncmContentStorageGetRightsIdFromPlaceHolderIdWithCache(NcmContentStorage*
|
|||||||
return serviceDispatchInOut(&cs->s, 27, in, *out_rights_id);
|
return serviceDispatchInOut(&cs->s, 27, in, *out_rights_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result ncmContentStorageRegisterPath(NcmContentStorage* cs, const NcmContentId* content_id, const char *path) {
|
||||||
|
if (hosversionBefore(13,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
|
||||||
|
char send_path[FS_MAX_PATH] = {0};
|
||||||
|
strncpy(send_path, path, FS_MAX_PATH-1);
|
||||||
|
send_path[FS_MAX_PATH-1] = 0;
|
||||||
|
|
||||||
|
return serviceDispatchIn(&cs->s, 28, *content_id,
|
||||||
|
.buffer_attrs = { SfBufferAttr_In | SfBufferAttr_HipcPointer },
|
||||||
|
.buffers = { { send_path, FS_MAX_PATH } },
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Result ncmContentStorageClearRegisteredPath(NcmContentStorage* cs) {
|
||||||
|
if (hosversionBefore(13,0,0)) return MAKERESULT(Module_Libnx, LibnxError_IncompatSysVer);
|
||||||
|
return _ncmCmdNoIO(&cs->s, 29);
|
||||||
|
}
|
||||||
|
|
||||||
void ncmContentMetaDatabaseClose(NcmContentMetaDatabase* db) {
|
void ncmContentMetaDatabaseClose(NcmContentMetaDatabase* db) {
|
||||||
serviceClose(&db->s);
|
serviceClose(&db->s);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user