mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-06-04 00:28:51 -04:00
ncm: skeleton new commands
This commit is contained in:
parent
e2a74a9e38
commit
a941e4be03
9 changed files with 77 additions and 23 deletions
|
@ -897,4 +897,12 @@ namespace ams::ncm {
|
|||
return ResultSuccess();
|
||||
}
|
||||
|
||||
Result ContentStorageImpl::RegisterPath(const ContentId &content_id, const Path &path) {
|
||||
return ncm::ResultInvalidOperation();
|
||||
}
|
||||
|
||||
Result ContentStorageImpl::ClearRegisteredPath() {
|
||||
return ncm::ResultInvalidOperation();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -100,6 +100,8 @@ namespace ams::ncm {
|
|||
virtual Result GetSizeFromPlaceHolderId(sf::Out<s64> out, PlaceHolderId placeholder_id) override;
|
||||
virtual Result RepairInvalidFileAttribute() override;
|
||||
virtual Result GetRightsIdFromPlaceHolderIdWithCache(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id, ContentId cache_content_id) override;
|
||||
virtual Result RegisterPath(const ContentId &content_id, const Path &path) override;
|
||||
virtual Result ClearRegisteredPath() override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -75,6 +75,8 @@ namespace ams::ncm {
|
|||
virtual Result GetSizeFromPlaceHolderId(sf::Out<s64> out, PlaceHolderId placeholder_id) = 0;
|
||||
virtual Result RepairInvalidFileAttribute() = 0;
|
||||
virtual Result GetRightsIdFromPlaceHolderIdWithCache(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id, ContentId cache_content_id) = 0;
|
||||
virtual Result RegisterPath(const ContentId &content_id, const Path &path) = 0;
|
||||
virtual Result ClearRegisteredPath() = 0;
|
||||
};
|
||||
static_assert(ncm::IsIContentStorage<ContentStorageImplBase>);
|
||||
|
||||
|
|
|
@ -61,31 +61,31 @@ namespace ams::ncm {
|
|||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::GeneratePlaceHolderId(sf::Out<PlaceHolderId> out) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::CreatePlaceHolder(PlaceHolderId placeholder_id, ContentId content_id, s64 size) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::DeletePlaceHolder(PlaceHolderId placeholder_id) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::HasPlaceHolder(sf::Out<bool> out, PlaceHolderId placeholder_id) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::WritePlaceHolder(PlaceHolderId placeholder_id, s64 offset, const sf::InBuffer &data) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::Register(PlaceHolderId placeholder_id, ContentId content_id) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::Delete(ContentId content_id) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::Has(sf::Out<bool> out, ContentId content_id) {
|
||||
|
@ -134,23 +134,23 @@ namespace ams::ncm {
|
|||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::GetPlaceHolderPath(sf::Out<Path> out, PlaceHolderId placeholder_id) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::CleanupAllPlaceHolder() {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::ListPlaceHolder(sf::Out<s32> out_count, const sf::OutArray<PlaceHolderId> &out_buf) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::GetContentCount(sf::Out<s32> out_count) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::ListContentId(sf::Out<s32> out_count, const sf::OutArray<ContentId> &out_buf, s32 offset) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::GetSizeFromContentId(sf::Out<s64> out_size, ContentId content_id) {
|
||||
|
@ -175,11 +175,11 @@ namespace ams::ncm {
|
|||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::RevertToPlaceHolder(PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::SetPlaceHolderSize(PlaceHolderId placeholder_id, s64 size) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::ReadContentIdFile(const sf::OutBuffer &buf, ContentId content_id, s64 offset) {
|
||||
|
@ -199,11 +199,11 @@ namespace ams::ncm {
|
|||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::GetRightsIdFromPlaceHolderIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::GetRightsIdFromPlaceHolderId(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::GetRightsIdFromContentIdDeprecated(sf::Out<ams::fs::RightsId> out_rights_id, ContentId content_id) {
|
||||
|
@ -232,7 +232,7 @@ namespace ams::ncm {
|
|||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::WriteContentForDebug(ContentId content_id, s64 offset, const sf::InBuffer &data) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::GetFreeSpaceSize(sf::Out<s64> out_size) {
|
||||
|
@ -246,19 +246,27 @@ namespace ams::ncm {
|
|||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::FlushPlaceHolder() {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::GetSizeFromPlaceHolderId(sf::Out<s64> out, PlaceHolderId placeholder_id) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::RepairInvalidFileAttribute() {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::GetRightsIdFromPlaceHolderIdWithCache(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id, ContentId cache_content_id) {
|
||||
return ncm::ResultWriteToReadOnlyContentStorage();
|
||||
return ncm::ResultNotSupported();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::RegisterPath(const ContentId &content_id, const Path &path) {
|
||||
return ncm::ResultInvalidOperation();
|
||||
}
|
||||
|
||||
Result ReadOnlyContentStorageImpl::ClearRegisteredPath() {
|
||||
return ncm::ResultInvalidOperation();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -54,6 +54,8 @@ namespace ams::ncm {
|
|||
virtual Result GetSizeFromPlaceHolderId(sf::Out<s64> out, PlaceHolderId placeholder_id) override;
|
||||
virtual Result RepairInvalidFileAttribute() override;
|
||||
virtual Result GetRightsIdFromPlaceHolderIdWithCache(sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id, ContentId cache_content_id) override;
|
||||
virtual Result RegisterPath(const ContentId &content_id, const Path &path) override;
|
||||
virtual Result ClearRegisteredPath() override;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -189,6 +189,14 @@ namespace ams::ncm {
|
|||
::NcmRightsId *out = reinterpret_cast<::NcmRightsId *>(out_rights_id.GetPointer());
|
||||
return ncmContentStorageGetRightsIdFromPlaceHolderIdWithCache(std::addressof(this->srv), out, Convert(placeholder_id), Convert(cache_content_id));
|
||||
}
|
||||
|
||||
Result RegisterPath(const ContentId &content_id, const Path &path) {
|
||||
AMS_ABORT("TODO");
|
||||
}
|
||||
|
||||
Result ClearRegisteredPath() {
|
||||
AMS_ABORT("TODO");
|
||||
}
|
||||
};
|
||||
static_assert(ncm::IsIContentStorage<RemoteContentStorageImpl>);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue