mirror of
https://github.com/Huntereb/Awoo-Installer
synced 2024-11-29 23:20:18 +00:00
36 lines
No EOL
1.1 KiB
C++
Executable file
36 lines
No EOL
1.1 KiB
C++
Executable file
#pragma once
|
|
|
|
#include <string>
|
|
|
|
extern "C"
|
|
{
|
|
#include <switch/services/fs.h>
|
|
#include <switch/services/ncm.h>
|
|
}
|
|
|
|
#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);
|
|
};
|
|
} |