#pragma once #include extern "C" { #include #include } #include "nx/ipc/tin_ipc.h" namespace nx::ncm { class ContentStorage final { private: NcmContentStorage m_contentStorage; public: // Don't allow copying, or garbage may be closed by the destructor ContentStorage& operator=(const ContentStorage&) = delete; ContentStorage(const ContentStorage&) = delete; ContentStorage(FsStorageId storageId); ~ContentStorage(); void CreatePlaceholder(const NcmContentId &placeholderId, const NcmContentId ®isteredId, size_t size); void DeletePlaceholder(const NcmContentId &placeholderId); void WritePlaceholder(const NcmContentId &placeholderId, u64 offset, void *buffer, size_t bufSize); void Register(const NcmContentId &placeholderId, const NcmContentId ®isteredId); void Delete(const NcmContentId ®isteredId); bool Has(const NcmContentId ®isteredId); std::string GetPath(const NcmContentId ®isteredId); }; }