sf: Change interface definition methodology (#1074)
* sf: Begin experimenting with new interface declaration format * sf: convert fs interfaces to new format * sf: finish conversion of libstrat to new definitions * sf: convert loader to new format * sf: convert spl to new format * sf: update ncm for new format * sf: convert pm to new format * sf: convert ro/sm to new format * sf: update fatal for new format * sf: support building dmnt under new scheme * sf: update ams.mitm for new format * sf: correct invocation def for pointer holder * fs: correct 10.x+ user bindings for Get*SpaceSize
This commit is contained in:
@@ -67,7 +67,7 @@ namespace ams::ncm {
|
||||
};
|
||||
static_assert(util::is_pod<SystemSaveDataInfo>::value);
|
||||
|
||||
class ContentManagerImpl final : public IContentManager {
|
||||
class ContentManagerImpl final {
|
||||
private:
|
||||
constexpr static size_t MaxContentStorageRoots = 8;
|
||||
constexpr static size_t MaxContentMetaDatabaseRoots = 8;
|
||||
@@ -131,21 +131,22 @@ namespace ams::ncm {
|
||||
Result EnsureAndMountSystemSaveData(const char *mount, const SystemSaveDataInfo &info) const;
|
||||
public:
|
||||
/* Actual commands. */
|
||||
virtual Result CreateContentStorage(StorageId storage_id) override;
|
||||
virtual Result CreateContentMetaDatabase(StorageId storage_id) override;
|
||||
virtual Result VerifyContentStorage(StorageId storage_id) override;
|
||||
virtual Result VerifyContentMetaDatabase(StorageId storage_id) override;
|
||||
virtual Result OpenContentStorage(sf::Out<std::shared_ptr<IContentStorage>> out, StorageId storage_id) override;
|
||||
virtual Result OpenContentMetaDatabase(sf::Out<std::shared_ptr<IContentMetaDatabase>> out, StorageId storage_id) override;
|
||||
virtual Result CloseContentStorageForcibly(StorageId storage_id) override;
|
||||
virtual Result CloseContentMetaDatabaseForcibly(StorageId storage_id) override;
|
||||
virtual Result CleanupContentMetaDatabase(StorageId storage_id) override;
|
||||
virtual Result ActivateContentStorage(StorageId storage_id) override;
|
||||
virtual Result InactivateContentStorage(StorageId storage_id) override;
|
||||
virtual Result ActivateContentMetaDatabase(StorageId storage_id) override;
|
||||
virtual Result InactivateContentMetaDatabase(StorageId storage_id) override;
|
||||
virtual Result InvalidateRightsIdCache() override;
|
||||
virtual Result GetMemoryReport(sf::Out<MemoryReport> out) override;
|
||||
Result CreateContentStorage(StorageId storage_id);
|
||||
Result CreateContentMetaDatabase(StorageId storage_id);
|
||||
Result VerifyContentStorage(StorageId storage_id);
|
||||
Result VerifyContentMetaDatabase(StorageId storage_id);
|
||||
Result OpenContentStorage(sf::Out<std::shared_ptr<IContentStorage>> out, StorageId storage_id);
|
||||
Result OpenContentMetaDatabase(sf::Out<std::shared_ptr<IContentMetaDatabase>> out, StorageId storage_id);
|
||||
Result CloseContentStorageForcibly(StorageId storage_id);
|
||||
Result CloseContentMetaDatabaseForcibly(StorageId storage_id);
|
||||
Result CleanupContentMetaDatabase(StorageId storage_id);
|
||||
Result ActivateContentStorage(StorageId storage_id);
|
||||
Result InactivateContentStorage(StorageId storage_id);
|
||||
Result ActivateContentMetaDatabase(StorageId storage_id);
|
||||
Result InactivateContentMetaDatabase(StorageId storage_id);
|
||||
Result InvalidateRightsIdCache();
|
||||
Result GetMemoryReport(sf::Out<MemoryReport> out);
|
||||
};
|
||||
static_assert(IsIContentManager<ContentManagerImpl>);
|
||||
|
||||
}
|
||||
|
||||
@@ -20,59 +20,23 @@
|
||||
|
||||
namespace ams::ncm {
|
||||
|
||||
class IContentManager : public sf::IServiceObject {
|
||||
protected:
|
||||
enum class CommandId {
|
||||
CreateContentStorage = 0,
|
||||
CreateContentMetaDatabase = 1,
|
||||
VerifyContentStorage = 2,
|
||||
VerifyContentMetaDatabase = 3,
|
||||
OpenContentStorage = 4,
|
||||
OpenContentMetaDatabase = 5,
|
||||
CloseContentStorageForcibly = 6,
|
||||
CloseContentMetaDatabaseForcibly = 7,
|
||||
CleanupContentMetaDatabase = 8,
|
||||
ActivateContentStorage = 9,
|
||||
InactivateContentStorage = 10,
|
||||
ActivateContentMetaDatabase = 11,
|
||||
InactivateContentMetaDatabase = 12,
|
||||
InvalidateRightsIdCache = 13,
|
||||
GetMemoryReport = 14,
|
||||
};
|
||||
public:
|
||||
virtual Result CreateContentStorage(StorageId storage_id) = 0;
|
||||
virtual Result CreateContentMetaDatabase(StorageId storage_id) = 0;
|
||||
virtual Result VerifyContentStorage(StorageId storage_id) = 0;
|
||||
virtual Result VerifyContentMetaDatabase(StorageId storage_id) = 0;
|
||||
virtual Result OpenContentStorage(sf::Out<std::shared_ptr<IContentStorage>> out, StorageId storage_id) = 0;
|
||||
virtual Result OpenContentMetaDatabase(sf::Out<std::shared_ptr<IContentMetaDatabase>> out, StorageId storage_id) = 0;
|
||||
virtual Result CloseContentStorageForcibly(StorageId storage_id) = 0;
|
||||
virtual Result CloseContentMetaDatabaseForcibly(StorageId storage_id) = 0;
|
||||
virtual Result CleanupContentMetaDatabase(StorageId storage_id) = 0;
|
||||
virtual Result ActivateContentStorage(StorageId storage_id) = 0;
|
||||
virtual Result InactivateContentStorage(StorageId storage_id) = 0;
|
||||
virtual Result ActivateContentMetaDatabase(StorageId storage_id) = 0;
|
||||
virtual Result InactivateContentMetaDatabase(StorageId storage_id) = 0;
|
||||
virtual Result InvalidateRightsIdCache() = 0;
|
||||
virtual Result GetMemoryReport(sf::Out<MemoryReport> out) = 0;
|
||||
public:
|
||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||
MAKE_SERVICE_COMMAND_META(CreateContentStorage),
|
||||
MAKE_SERVICE_COMMAND_META(CreateContentMetaDatabase),
|
||||
MAKE_SERVICE_COMMAND_META(VerifyContentStorage),
|
||||
MAKE_SERVICE_COMMAND_META(VerifyContentMetaDatabase),
|
||||
MAKE_SERVICE_COMMAND_META(OpenContentStorage),
|
||||
MAKE_SERVICE_COMMAND_META(OpenContentMetaDatabase),
|
||||
MAKE_SERVICE_COMMAND_META(CloseContentStorageForcibly, hos::Version_1_0_0, hos::Version_1_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(CloseContentMetaDatabaseForcibly, hos::Version_1_0_0, hos::Version_1_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(CleanupContentMetaDatabase),
|
||||
MAKE_SERVICE_COMMAND_META(ActivateContentStorage, hos::Version_2_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(InactivateContentStorage, hos::Version_2_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(ActivateContentMetaDatabase, hos::Version_2_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(InactivateContentMetaDatabase, hos::Version_2_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(InvalidateRightsIdCache, hos::Version_9_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(GetMemoryReport, hos::Version_10_0_0),
|
||||
};
|
||||
};
|
||||
#define AMS_NCM_I_CONTENT_MANAGER_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 0, Result, CreateContentStorage, (StorageId storage_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 1, Result, CreateContentMetaDatabase, (StorageId storage_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 2, Result, VerifyContentStorage, (StorageId storage_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 3, Result, VerifyContentMetaDatabase, (StorageId storage_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 4, Result, OpenContentStorage, (sf::Out<std::shared_ptr<IContentStorage>> out, StorageId storage_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 5, Result, OpenContentMetaDatabase, (sf::Out<std::shared_ptr<IContentMetaDatabase>> out, StorageId storage_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 6, Result, CloseContentStorageForcibly, (StorageId storage_id), hos::Version_1_0_0, hos::Version_1_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 7, Result, CloseContentMetaDatabaseForcibly, (StorageId storage_id), hos::Version_1_0_0, hos::Version_1_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 8, Result, CleanupContentMetaDatabase, (StorageId storage_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 9, Result, ActivateContentStorage, (StorageId storage_id), hos::Version_2_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 10, Result, InactivateContentStorage, (StorageId storage_id), hos::Version_2_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 11, Result, ActivateContentMetaDatabase, (StorageId storage_id), hos::Version_2_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 12, Result, InactivateContentMetaDatabase, (StorageId storage_id), hos::Version_2_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 13, Result, InvalidateRightsIdCache, (), hos::Version_9_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 14, Result, GetMemoryReport, (sf::Out<MemoryReport> out), hos::Version_10_0_0)
|
||||
|
||||
AMS_SF_DEFINE_INTERFACE(IContentManager, AMS_NCM_I_CONTENT_MANAGER_INTERFACE_INFO);
|
||||
|
||||
}
|
||||
|
||||
@@ -19,84 +19,31 @@
|
||||
|
||||
namespace ams::ncm {
|
||||
|
||||
class IContentMetaDatabase : public sf::IServiceObject {
|
||||
protected:
|
||||
enum class CommandId {
|
||||
Set = 0,
|
||||
Get = 1,
|
||||
Remove = 2,
|
||||
GetContentIdByType = 3,
|
||||
ListContentInfo = 4,
|
||||
List = 5,
|
||||
GetLatestContentMetaKey = 6,
|
||||
ListApplication = 7,
|
||||
Has = 8,
|
||||
HasAll = 9,
|
||||
GetSize = 10,
|
||||
GetRequiredSystemVersion = 11,
|
||||
GetPatchId = 12,
|
||||
DisableForcibly = 13,
|
||||
LookupOrphanContent = 14,
|
||||
Commit = 15,
|
||||
HasContent = 16,
|
||||
ListContentMetaInfo = 17,
|
||||
GetAttributes = 18,
|
||||
GetRequiredApplicationVersion = 19,
|
||||
GetContentIdByTypeAndIdOffset = 20,
|
||||
GetCount = 21,
|
||||
GetOwnerApplicationId = 22,
|
||||
};
|
||||
public:
|
||||
/* Actual commands. */
|
||||
virtual Result Set(const ContentMetaKey &key, sf::InBuffer value) = 0;
|
||||
virtual Result Get(sf::Out<u64> out_size, const ContentMetaKey &key, sf::OutBuffer out_value) = 0;
|
||||
virtual Result Remove(const ContentMetaKey &key) = 0;
|
||||
virtual Result GetContentIdByType(sf::Out<ContentId> out_content_id, const ContentMetaKey &key, ContentType type) = 0;
|
||||
virtual Result ListContentInfo(sf::Out<s32> out_entries_written, const sf::OutArray<ContentInfo> &out_info, const ContentMetaKey &key, s32 offset) = 0;
|
||||
virtual Result List(sf::Out<s32> out_entries_total, sf::Out<s32> out_entries_written, const sf::OutArray<ContentMetaKey> &out_info, ContentMetaType meta_type, ApplicationId application_id, u64 min, u64 max, ContentInstallType install_type) = 0;
|
||||
virtual Result GetLatestContentMetaKey(sf::Out<ContentMetaKey> out_key, u64 id) = 0;
|
||||
virtual Result ListApplication(sf::Out<s32> out_entries_total, sf::Out<s32> out_entries_written, const sf::OutArray<ApplicationContentMetaKey> &out_keys, ContentMetaType meta_type) = 0;
|
||||
virtual Result Has(sf::Out<bool> out, const ContentMetaKey &key) = 0;
|
||||
virtual Result HasAll(sf::Out<bool> out, const sf::InArray<ContentMetaKey> &keys) = 0;
|
||||
virtual Result GetSize(sf::Out<u64> out_size, const ContentMetaKey &key) = 0;
|
||||
virtual Result GetRequiredSystemVersion(sf::Out<u32> out_version, const ContentMetaKey &key) = 0;
|
||||
virtual Result GetPatchId(sf::Out<PatchId> out_patch_id, const ContentMetaKey &key) = 0;
|
||||
virtual Result DisableForcibly() = 0;
|
||||
virtual Result LookupOrphanContent(const sf::OutArray<bool> &out_orphaned, const sf::InArray<ContentId> &content_ids) = 0;
|
||||
virtual Result Commit() = 0;
|
||||
virtual Result HasContent(sf::Out<bool> out, const ContentMetaKey &key, const ContentId &content_id) = 0;
|
||||
virtual Result ListContentMetaInfo(sf::Out<s32> out_entries_written, const sf::OutArray<ContentMetaInfo> &out_meta_info, const ContentMetaKey &key, s32 offset) = 0;
|
||||
virtual Result GetAttributes(sf::Out<u8> out_attributes, const ContentMetaKey &key) = 0;
|
||||
virtual Result GetRequiredApplicationVersion(sf::Out<u32> out_version, const ContentMetaKey &key) = 0;
|
||||
virtual Result GetContentIdByTypeAndIdOffset(sf::Out<ContentId> out_content_id, const ContentMetaKey &key, ContentType type, u8 id_offset) = 0;
|
||||
virtual Result GetCount(sf::Out<u32> out_count) = 0;
|
||||
virtual Result GetOwnerApplicationId(sf::Out<ApplicationId> out_id, const ContentMetaKey &key) = 0;
|
||||
public:
|
||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||
MAKE_SERVICE_COMMAND_META(Set),
|
||||
MAKE_SERVICE_COMMAND_META(Get),
|
||||
MAKE_SERVICE_COMMAND_META(Remove),
|
||||
MAKE_SERVICE_COMMAND_META(GetContentIdByType),
|
||||
MAKE_SERVICE_COMMAND_META(ListContentInfo),
|
||||
MAKE_SERVICE_COMMAND_META(List),
|
||||
MAKE_SERVICE_COMMAND_META(GetLatestContentMetaKey),
|
||||
MAKE_SERVICE_COMMAND_META(ListApplication),
|
||||
MAKE_SERVICE_COMMAND_META(Has),
|
||||
MAKE_SERVICE_COMMAND_META(HasAll),
|
||||
MAKE_SERVICE_COMMAND_META(GetSize),
|
||||
MAKE_SERVICE_COMMAND_META(GetRequiredSystemVersion),
|
||||
MAKE_SERVICE_COMMAND_META(GetPatchId),
|
||||
MAKE_SERVICE_COMMAND_META(DisableForcibly),
|
||||
MAKE_SERVICE_COMMAND_META(LookupOrphanContent),
|
||||
MAKE_SERVICE_COMMAND_META(Commit),
|
||||
MAKE_SERVICE_COMMAND_META(HasContent),
|
||||
MAKE_SERVICE_COMMAND_META(ListContentMetaInfo),
|
||||
MAKE_SERVICE_COMMAND_META(GetAttributes),
|
||||
MAKE_SERVICE_COMMAND_META(GetRequiredApplicationVersion, hos::Version_2_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(GetContentIdByTypeAndIdOffset, hos::Version_5_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(GetCount, hos::Version_10_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(GetOwnerApplicationId, hos::Version_10_0_0),
|
||||
};
|
||||
};
|
||||
#define AMS_NCM_I_CONTENT_META_DATABASE_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 0, Result, Set, (const ContentMetaKey &key, sf::InBuffer value)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 1, Result, Get, (sf::Out<u64> out_size, const ContentMetaKey &key, sf::OutBuffer out_value)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 2, Result, Remove, (const ContentMetaKey &key)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 3, Result, GetContentIdByType, (sf::Out<ContentId> out_content_id, const ContentMetaKey &key, ContentType type)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 4, Result, ListContentInfo, (sf::Out<s32> out_entries_written, const sf::OutArray<ContentInfo> &out_info, const ContentMetaKey &key, s32 offset)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 5, Result, List, (sf::Out<s32> out_entries_total, sf::Out<s32> out_entries_written, const sf::OutArray<ContentMetaKey> &out_info, ContentMetaType meta_type, ApplicationId application_id, u64 min, u64 max, ContentInstallType install_type)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 6, Result, GetLatestContentMetaKey, (sf::Out<ContentMetaKey> out_key, u64 id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 7, Result, ListApplication, (sf::Out<s32> out_entries_total, sf::Out<s32> out_entries_written, const sf::OutArray<ApplicationContentMetaKey> &out_keys, ContentMetaType meta_type)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 8, Result, Has, (sf::Out<bool> out, const ContentMetaKey &key)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 9, Result, HasAll, (sf::Out<bool> out, const sf::InArray<ContentMetaKey> &keys)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 10, Result, GetSize, (sf::Out<u64> out_size, const ContentMetaKey &key)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 11, Result, GetRequiredSystemVersion, (sf::Out<u32> out_version, const ContentMetaKey &key)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 12, Result, GetPatchId, (sf::Out<PatchId> out_patch_id, const ContentMetaKey &key)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 13, Result, DisableForcibly, ()) \
|
||||
AMS_SF_METHOD_INFO(C, H, 14, Result, LookupOrphanContent, (const sf::OutArray<bool> &out_orphaned, const sf::InArray<ContentId> &content_ids)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 15, Result, Commit, ()) \
|
||||
AMS_SF_METHOD_INFO(C, H, 16, Result, HasContent, (sf::Out<bool> out, const ContentMetaKey &key, const ContentId &content_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 17, Result, ListContentMetaInfo, (sf::Out<s32> out_entries_written, const sf::OutArray<ContentMetaInfo> &out_meta_info, const ContentMetaKey &key, s32 offset)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 18, Result, GetAttributes, (sf::Out<u8> out_attributes, const ContentMetaKey &key)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 19, Result, GetRequiredApplicationVersion, (sf::Out<u32> out_version, const ContentMetaKey &key), hos::Version_2_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 20, Result, GetContentIdByTypeAndIdOffset, (sf::Out<ContentId> out_content_id, const ContentMetaKey &key, ContentType type, u8 id_offset), hos::Version_5_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 21, Result, GetCount, (sf::Out<u32> out_count), hos::Version_10_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 22, Result, GetOwnerApplicationId, (sf::Out<ApplicationId> out_id, const ContentMetaKey &key), hos::Version_10_0_0)
|
||||
|
||||
AMS_SF_DEFINE_INTERFACE(IContentMetaDatabase, AMS_NCM_I_CONTENT_META_DATABASE_INTERFACE_INFO)
|
||||
|
||||
}
|
||||
|
||||
@@ -22,109 +22,38 @@
|
||||
|
||||
namespace ams::ncm {
|
||||
|
||||
class IContentStorage : public sf::IServiceObject {
|
||||
NON_COPYABLE(IContentStorage);
|
||||
NON_MOVEABLE(IContentStorage);
|
||||
protected:
|
||||
enum class CommandId {
|
||||
GeneratePlaceHolderId = 0,
|
||||
CreatePlaceHolder = 1,
|
||||
DeletePlaceHolder = 2,
|
||||
HasPlaceHolder = 3,
|
||||
WritePlaceHolder = 4,
|
||||
Register = 5,
|
||||
Delete = 6,
|
||||
Has = 7,
|
||||
GetPath = 8,
|
||||
GetPlaceHolderPath = 9,
|
||||
CleanupAllPlaceHolder = 10,
|
||||
ListPlaceHolder = 11,
|
||||
GetContentCount = 12,
|
||||
ListContentId = 13,
|
||||
GetSizeFromContentId = 14,
|
||||
DisableForcibly = 15,
|
||||
RevertToPlaceHolder = 16,
|
||||
SetPlaceHolderSize = 17,
|
||||
ReadContentIdFile = 18,
|
||||
GetRightsIdFromPlaceHolderIdDeprecated = 19,
|
||||
GetRightsIdFromPlaceHolderId = 19,
|
||||
GetRightsIdFromContentIdDeprecated = 20,
|
||||
GetRightsIdFromContentId = 20,
|
||||
WriteContentForDebug = 21,
|
||||
GetFreeSpaceSize = 22,
|
||||
GetTotalSpaceSize = 23,
|
||||
FlushPlaceHolder = 24,
|
||||
GetSizeFromPlaceHolderId = 25,
|
||||
RepairInvalidFileAttribute = 26,
|
||||
GetRightsIdFromPlaceHolderIdWithCache = 27,
|
||||
};
|
||||
public:
|
||||
IContentStorage() { /* ... */ }
|
||||
public:
|
||||
virtual Result GeneratePlaceHolderId(sf::Out<PlaceHolderId> out) = 0;
|
||||
virtual Result CreatePlaceHolder(PlaceHolderId placeholder_id, ContentId content_id, s64 size) = 0;
|
||||
virtual Result DeletePlaceHolder(PlaceHolderId placeholder_id) = 0;
|
||||
virtual Result HasPlaceHolder(sf::Out<bool> out, PlaceHolderId placeholder_id) = 0;
|
||||
virtual Result WritePlaceHolder(PlaceHolderId placeholder_id, s64 offset, sf::InBuffer data) = 0;
|
||||
virtual Result Register(PlaceHolderId placeholder_id, ContentId content_id) = 0;
|
||||
virtual Result Delete(ContentId content_id) = 0;
|
||||
virtual Result Has(sf::Out<bool> out, ContentId content_id) = 0;
|
||||
virtual Result GetPath(sf::Out<Path> out, ContentId content_id) = 0;
|
||||
virtual Result GetPlaceHolderPath(sf::Out<Path> out, PlaceHolderId placeholder_id) = 0;
|
||||
virtual Result CleanupAllPlaceHolder() = 0;
|
||||
virtual Result ListPlaceHolder(sf::Out<s32> out_count, const sf::OutArray<PlaceHolderId> &out_buf) = 0;
|
||||
virtual Result GetContentCount(sf::Out<s32> out_count) = 0;
|
||||
virtual Result ListContentId(sf::Out<s32> out_count, const sf::OutArray<ContentId> &out_buf, s32 start_offset) = 0;
|
||||
virtual Result GetSizeFromContentId(sf::Out<s64> out_size, ContentId content_id) = 0;
|
||||
virtual Result DisableForcibly() = 0;
|
||||
virtual Result RevertToPlaceHolder(PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id) = 0;
|
||||
virtual Result SetPlaceHolderSize(PlaceHolderId placeholder_id, s64 size) = 0;
|
||||
virtual Result ReadContentIdFile(sf::OutBuffer buf, ContentId content_id, s64 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 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 WriteContentForDebug(ContentId content_id, s64 offset, sf::InBuffer data) = 0;
|
||||
virtual Result GetFreeSpaceSize(sf::Out<s64> out_size) = 0;
|
||||
virtual Result GetTotalSpaceSize(sf::Out<s64> out_size) = 0;
|
||||
virtual Result FlushPlaceHolder() = 0;
|
||||
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;
|
||||
public:
|
||||
DEFINE_SERVICE_DISPATCH_TABLE {
|
||||
MAKE_SERVICE_COMMAND_META(GeneratePlaceHolderId),
|
||||
MAKE_SERVICE_COMMAND_META(CreatePlaceHolder),
|
||||
MAKE_SERVICE_COMMAND_META(DeletePlaceHolder),
|
||||
MAKE_SERVICE_COMMAND_META(HasPlaceHolder),
|
||||
MAKE_SERVICE_COMMAND_META(WritePlaceHolder),
|
||||
MAKE_SERVICE_COMMAND_META(Register),
|
||||
MAKE_SERVICE_COMMAND_META(Delete),
|
||||
MAKE_SERVICE_COMMAND_META(Has),
|
||||
MAKE_SERVICE_COMMAND_META(GetPath),
|
||||
MAKE_SERVICE_COMMAND_META(GetPlaceHolderPath),
|
||||
MAKE_SERVICE_COMMAND_META(CleanupAllPlaceHolder),
|
||||
MAKE_SERVICE_COMMAND_META(ListPlaceHolder),
|
||||
MAKE_SERVICE_COMMAND_META(GeneratePlaceHolderId),
|
||||
MAKE_SERVICE_COMMAND_META(GetContentCount),
|
||||
MAKE_SERVICE_COMMAND_META(ListContentId),
|
||||
MAKE_SERVICE_COMMAND_META(GetSizeFromContentId),
|
||||
MAKE_SERVICE_COMMAND_META(DisableForcibly),
|
||||
MAKE_SERVICE_COMMAND_META(RevertToPlaceHolder, hos::Version_2_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(SetPlaceHolderSize, hos::Version_2_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(ReadContentIdFile, hos::Version_2_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderIdDeprecated, hos::Version_2_0_0, hos::Version_2_3_0),
|
||||
MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderId, hos::Version_3_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentIdDeprecated, hos::Version_2_0_0, hos::Version_2_3_0),
|
||||
MAKE_SERVICE_COMMAND_META(GetRightsIdFromContentId, hos::Version_3_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(WriteContentForDebug, hos::Version_2_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(GetFreeSpaceSize, hos::Version_2_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(GetTotalSpaceSize, hos::Version_2_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(FlushPlaceHolder, hos::Version_3_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(GetSizeFromPlaceHolderId, hos::Version_4_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(RepairInvalidFileAttribute, hos::Version_4_0_0),
|
||||
MAKE_SERVICE_COMMAND_META(GetRightsIdFromPlaceHolderIdWithCache, hos::Version_8_0_0),
|
||||
};
|
||||
};
|
||||
#define AMS_NCM_I_CONTENT_STORAGE_INTERFACE_INFO(C, H) \
|
||||
AMS_SF_METHOD_INFO(C, H, 0, Result, GeneratePlaceHolderId, (sf::Out<PlaceHolderId> out)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 1, Result, CreatePlaceHolder, (PlaceHolderId placeholder_id, ContentId content_id, s64 size)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 2, Result, DeletePlaceHolder, (PlaceHolderId placeholder_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 3, Result, HasPlaceHolder, (sf::Out<bool> out, PlaceHolderId placeholder_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 4, Result, WritePlaceHolder, (PlaceHolderId placeholder_id, s64 offset, sf::InBuffer data)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 5, Result, Register, (PlaceHolderId placeholder_id, ContentId content_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 6, Result, Delete, (ContentId content_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 7, Result, Has, (sf::Out<bool> out, ContentId content_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 8, Result, GetPath, (sf::Out<Path> out, ContentId content_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 9, Result, GetPlaceHolderPath, (sf::Out<Path> out, PlaceHolderId placeholder_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 10, Result, CleanupAllPlaceHolder, ()) \
|
||||
AMS_SF_METHOD_INFO(C, H, 11, Result, ListPlaceHolder, (sf::Out<s32> out_count, const sf::OutArray<PlaceHolderId> &out_buf)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 12, Result, GetContentCount, (sf::Out<s32> out_count)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 13, Result, ListContentId, (sf::Out<s32> out_count, const sf::OutArray<ContentId> &out_buf, s32 start_offset)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 14, Result, GetSizeFromContentId, (sf::Out<s64> out_size, ContentId content_id)) \
|
||||
AMS_SF_METHOD_INFO(C, H, 15, Result, DisableForcibly, ()) \
|
||||
AMS_SF_METHOD_INFO(C, H, 16, Result, RevertToPlaceHolder, (PlaceHolderId placeholder_id, ContentId old_content_id, ContentId new_content_id), hos::Version_2_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 17, Result, SetPlaceHolderSize, (PlaceHolderId placeholder_id, s64 size), hos::Version_2_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 18, Result, ReadContentIdFile, (sf::OutBuffer buf, ContentId content_id, s64 offset), hos::Version_2_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 19, Result, GetRightsIdFromPlaceHolderIdDeprecated, (sf::Out<ams::fs::RightsId> out_rights_id, PlaceHolderId placeholder_id), hos::Version_2_0_0, hos::Version_2_3_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 19, Result, GetRightsIdFromPlaceHolderId, (sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id), hos::Version_3_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 20, Result, GetRightsIdFromContentIdDeprecated, (sf::Out<ams::fs::RightsId> out_rights_id, ContentId content_id), hos::Version_2_0_0, hos::Version_2_3_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 20, Result, GetRightsIdFromContentId, (sf::Out<ncm::RightsId> out_rights_id, ContentId content_id), hos::Version_3_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 21, Result, WriteContentForDebug, (ContentId content_id, s64 offset, sf::InBuffer data), hos::Version_2_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 22, Result, GetFreeSpaceSize, (sf::Out<s64> out_size), hos::Version_2_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 23, Result, GetTotalSpaceSize, (sf::Out<s64> out_size), hos::Version_2_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 24, Result, FlushPlaceHolder, (), hos::Version_3_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 25, Result, GetSizeFromPlaceHolderId, (sf::Out<s64> out, PlaceHolderId placeholder_id), hos::Version_4_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 26, Result, RepairInvalidFileAttribute, (), hos::Version_4_0_0) \
|
||||
AMS_SF_METHOD_INFO(C, H, 27, Result, GetRightsIdFromPlaceHolderIdWithCache, (sf::Out<ncm::RightsId> out_rights_id, PlaceHolderId placeholder_id, ContentId cache_content_id), hos::Version_8_0_0)
|
||||
|
||||
AMS_SF_DEFINE_INTERFACE(IContentStorage, AMS_NCM_I_CONTENT_STORAGE_INTERFACE_INFO)
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user