mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-07-15 13:22:15 +02:00
ncm: content storage fixes for 2.0.0
This commit is contained in:
parent
ef39627c26
commit
16cc69e38d
@ -45,7 +45,9 @@ namespace ams::ncm {
|
|||||||
RevertToPlaceHolder = 16,
|
RevertToPlaceHolder = 16,
|
||||||
SetPlaceHolderSize = 17,
|
SetPlaceHolderSize = 17,
|
||||||
ReadContentIdFile = 18,
|
ReadContentIdFile = 18,
|
||||||
|
GetRightsIdFromPlaceHolderIdDeprecated = 19,
|
||||||
GetRightsIdFromPlaceHolderId = 19,
|
GetRightsIdFromPlaceHolderId = 19,
|
||||||
|
GetRightsIdFromContentIdDeprecated = 20,
|
||||||
GetRightsIdFromContentId = 20,
|
GetRightsIdFromContentId = 20,
|
||||||
WriteContentForDebug = 21,
|
WriteContentForDebug = 21,
|
||||||
GetFreeSpaceSize = 22,
|
GetFreeSpaceSize = 22,
|
||||||
@ -77,7 +79,9 @@ namespace ams::ncm {
|
|||||||
virtual Result RevertToPlaceHolder(PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id) = 0;
|
virtual Result RevertToPlaceHolder(PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id) = 0;
|
||||||
virtual Result SetPlaceHolderSize(PlaceHolderId placeholder_id, u64 size) = 0;
|
virtual Result SetPlaceHolderSize(PlaceHolderId placeholder_id, u64 size) = 0;
|
||||||
virtual Result ReadContentIdFile(sf::OutBuffer buf, ContentId content_id, u64 offset) = 0;
|
virtual Result ReadContentIdFile(sf::OutBuffer buf, ContentId content_id, u64 offset) = 0;
|
||||||
|
virtual Result GetRightsIdFromPlaceHolderIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, PlaceHolderId placeholder_id) = 0;
|
||||||
virtual Result GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) = 0;
|
virtual Result GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) = 0;
|
||||||
|
virtual Result GetRightsIdFromContentIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, ContentId content_id) = 0;
|
||||||
virtual Result GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) = 0;
|
virtual Result GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) = 0;
|
||||||
virtual Result WriteContentForDebug(ContentId content_id, u64 offset, sf::InBuffer data) = 0;
|
virtual Result WriteContentForDebug(ContentId content_id, u64 offset, sf::InBuffer data) = 0;
|
||||||
virtual Result GetFreeSpaceSize(sf::Out<u64> out_size) = 0;
|
virtual Result GetFreeSpaceSize(sf::Out<u64> out_size) = 0;
|
||||||
@ -108,8 +112,10 @@ namespace ams::ncm {
|
|||||||
MAKE_SERVICE_COMMAND_META(RevertToPlaceHolder, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(RevertToPlaceHolder, hos::Version_200),
|
||||||
MAKE_SERVICE_COMMAND_META(SetPlaceHolderSize, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(SetPlaceHolderSize, hos::Version_200),
|
||||||
MAKE_SERVICE_COMMAND_META(ReadContentIdFile, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(ReadContentIdFile, hos::Version_200),
|
||||||
MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderId, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderIdDeprecated, hos::Version_200, hos::Version_200),
|
||||||
MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentId, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderId, hos::Version_300),
|
||||||
|
MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentIdDeprecated, hos::Version_200, hos::Version_200),
|
||||||
|
MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentId, hos::Version_300),
|
||||||
MAKE_SERVICE_COMMAND_META(WriteContentForDebug, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(WriteContentForDebug, hos::Version_200),
|
||||||
MAKE_SERVICE_COMMAND_META(GetFreeSpaceSize, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetFreeSpaceSize, hos::Version_200),
|
||||||
MAKE_SERVICE_COMMAND_META(GetTotalSpaceSize, hos::Version_200),
|
MAKE_SERVICE_COMMAND_META(GetTotalSpaceSize, hos::Version_200),
|
||||||
|
@ -370,6 +370,13 @@ namespace ams::ncm {
|
|||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result ContentStorageImpl::GetRightsIdFromPlaceHolderIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
|
||||||
|
ncm::RightsId rights_id;
|
||||||
|
R_TRY(this->GetRightsIdFromPlaceHolderId(&rights_id, placeholder_id));
|
||||||
|
out_rights_id.SetValue(rights_id.id);
|
||||||
|
return ResultSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
Result ContentStorageImpl::GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
|
Result ContentStorageImpl::GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
|
||||||
R_TRY(this->EnsureEnabled());
|
R_TRY(this->EnsureEnabled());
|
||||||
|
|
||||||
@ -385,6 +392,13 @@ namespace ams::ncm {
|
|||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result ContentStorageImpl::GetRightsIdFromContentIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, ContentId content_id) {
|
||||||
|
ncm::RightsId rights_id;
|
||||||
|
R_TRY(this->GetRightsIdFromContentId(&rights_id, content_id));
|
||||||
|
out_rights_id.SetValue(rights_id.id);
|
||||||
|
return ResultSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
Result ContentStorageImpl::GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) {
|
Result ContentStorageImpl::GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) {
|
||||||
R_TRY(this->EnsureEnabled());
|
R_TRY(this->EnsureEnabled());
|
||||||
|
|
||||||
|
@ -71,7 +71,9 @@ namespace ams::ncm {
|
|||||||
virtual Result RevertToPlaceHolder(PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id) override;
|
virtual Result RevertToPlaceHolder(PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id) override;
|
||||||
virtual Result SetPlaceHolderSize(PlaceHolderId placeholder_id, u64 size) override;
|
virtual Result SetPlaceHolderSize(PlaceHolderId placeholder_id, u64 size) override;
|
||||||
virtual Result ReadContentIdFile(sf::OutBuffer buf, ContentId content_id, u64 offset) override;
|
virtual Result ReadContentIdFile(sf::OutBuffer buf, ContentId content_id, u64 offset) override;
|
||||||
|
virtual Result GetRightsIdFromPlaceHolderIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, PlaceHolderId placeholder_id) override;
|
||||||
virtual Result GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) override;
|
virtual Result GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) override;
|
||||||
|
virtual Result GetRightsIdFromContentIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, ContentId content_id) override;
|
||||||
virtual Result GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) override;
|
virtual Result GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) override;
|
||||||
virtual Result WriteContentForDebug(ContentId content_id, u64 offset, sf::InBuffer data) override;
|
virtual Result WriteContentForDebug(ContentId content_id, u64 offset, sf::InBuffer data) override;
|
||||||
virtual Result GetFreeSpaceSize(sf::Out<u64> out_size) override;
|
virtual Result GetFreeSpaceSize(sf::Out<u64> out_size) override;
|
||||||
|
@ -174,10 +174,21 @@ namespace ams::ncm {
|
|||||||
return ResultSuccess();
|
return ResultSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result ReadOnlyContentStorageImpl::GetRightsIdFromPlaceHolderIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
|
||||||
|
return ResultInvalidContentStorageOperation();
|
||||||
|
}
|
||||||
|
|
||||||
Result ReadOnlyContentStorageImpl::GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
|
Result ReadOnlyContentStorageImpl::GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
|
||||||
return ResultInvalidContentStorageOperation();
|
return ResultInvalidContentStorageOperation();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Result ReadOnlyContentStorageImpl::GetRightsIdFromContentIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, ContentId content_id) {
|
||||||
|
ncm::RightsId rights_id;
|
||||||
|
R_TRY(this->GetRightsIdFromContentId(&rights_id, content_id));
|
||||||
|
out_rights_id.SetValue(rights_id.id);
|
||||||
|
return ResultSuccess();
|
||||||
|
}
|
||||||
|
|
||||||
Result ReadOnlyContentStorageImpl::GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) {
|
Result ReadOnlyContentStorageImpl::GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) {
|
||||||
R_TRY(this->EnsureEnabled());
|
R_TRY(this->EnsureEnabled());
|
||||||
|
|
||||||
|
@ -44,7 +44,9 @@ namespace ams::ncm {
|
|||||||
virtual Result RevertToPlaceHolder(PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id) override;
|
virtual Result RevertToPlaceHolder(PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id) override;
|
||||||
virtual Result SetPlaceHolderSize(PlaceHolderId placeholder_id, u64 size) override;
|
virtual Result SetPlaceHolderSize(PlaceHolderId placeholder_id, u64 size) override;
|
||||||
virtual Result ReadContentIdFile(sf::OutBuffer buf, ContentId content_id, u64 offset) override;
|
virtual Result ReadContentIdFile(sf::OutBuffer buf, ContentId content_id, u64 offset) override;
|
||||||
|
virtual Result GetRightsIdFromPlaceHolderIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, PlaceHolderId placeholder_id) override;
|
||||||
virtual Result GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) override;
|
virtual Result GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) override;
|
||||||
|
virtual Result GetRightsIdFromContentIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, ContentId content_id) override;
|
||||||
virtual Result GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) override;
|
virtual Result GetRightsIdFromContentId(sf::Out<ncm::RightsId> out_rights_id, ContentId content_id) override;
|
||||||
virtual Result WriteContentForDebug(ContentId content_id, u64 offset, sf::InBuffer data) override;
|
virtual Result WriteContentForDebug(ContentId content_id, u64 offset, sf::InBuffer data) override;
|
||||||
virtual Result GetFreeSpaceSize(sf::Out<u64> out_size) override;
|
virtual Result GetFreeSpaceSize(sf::Out<u64> out_size) override;
|
||||||
|
Loading…
Reference in New Issue
Block a user