#pragma once #include #include #include #include #include namespace nn { namespace hac { class FileSystemAccessControl : public fnd::IByteModel { public: struct sSaveDataOwnerId { nn::hac::fac::SaveDataOwnerIdAccessType access_type; uint64_t id; void operator=(const sSaveDataOwnerId& other) { access_type = other.access_type; id = other.id; } bool operator==(const sSaveDataOwnerId& other) const { return (access_type == other.access_type) \ && (id == other.id); } bool operator!=(const sSaveDataOwnerId& other) const { return !(*this == other); } }; FileSystemAccessControl(); FileSystemAccessControl(const FileSystemAccessControl& other); void operator=(const FileSystemAccessControl& other); bool operator==(const FileSystemAccessControl& other) const; bool operator!=(const FileSystemAccessControl& other) const; // IByteModel void toBytes(); void fromBytes(const byte_t* data, size_t len); const fnd::Vec& getBytes() const; // variables void clear(); uint32_t getFormatVersion() const; void setFormatVersion(uint32_t version); const fnd::List& getFsaRightsList() const; void setFsaRightsList(const fnd::List& list); const fnd::List& getContentOwnerIdList() const; void setContentOwnerIdList(const fnd::List& list); const fnd::List& getSaveDataOwnerIdList() const; void setSaveDataOwnerIdList(const fnd::List& list); private: const std::string kModuleName = "FILE_SYSTEM_ACCESS_CONTROL"; // raw data fnd::Vec mRawBinary; // variables uint32_t mVersion; fnd::List mFsaRights; fnd::List mContentOwnerIdList; fnd::List mSaveDataOwnerIdList; }; } }