nstool/lib/libnx/include/nx/FileSystemAccessControlBinary.h

52 lines
1.4 KiB
C
Raw Normal View History

#pragma once
#include <string>
#include <fnd/types.h>
2018-06-24 15:56:55 +00:00
#include <fnd/ISerialisable.h>
#include <fnd/List.h>
2018-06-24 15:56:55 +00:00
#include <nx/fac.h>
2017-07-06 11:17:21 +00:00
namespace nx
{
class FileSystemAccessControlBinary : public fnd::ISerialisable
{
2017-07-06 11:17:21 +00:00
public:
FileSystemAccessControlBinary();
FileSystemAccessControlBinary(const FileSystemAccessControlBinary& other);
void operator=(const FileSystemAccessControlBinary& other);
bool operator==(const FileSystemAccessControlBinary& other) const;
bool operator!=(const FileSystemAccessControlBinary& other) const;
2017-07-06 11:17:21 +00:00
// export/import binary
2018-06-24 08:18:54 +00:00
void toBytes();
void fromBytes(const byte_t* data, size_t len);
2018-06-24 08:18:54 +00:00
const fnd::Vec<byte_t>& getBytes() const;
2017-07-06 11:17:21 +00:00
// variables
void clear();
uint32_t getFormatVersion() const;
void setFormatVersion(uint32_t version);
2018-06-24 15:56:55 +00:00
const fnd::List<fac::FsAccessFlag>& getFsaRightsList() const;
void setFsaRightsList(const fnd::List<fac::FsAccessFlag>& list);
2018-03-22 05:26:22 +00:00
const fnd::List<uint32_t>& getContentOwnerIdList() const;
void setContentOwnerIdList(const fnd::List<uint32_t>& list);
2018-03-22 05:26:22 +00:00
const fnd::List<uint32_t>& getSaveDataOwnerIdList() const;
void setSaveDataOwnerIdList(const fnd::List<uint32_t>& list);
2017-07-06 11:17:21 +00:00
private:
const std::string kModuleName = "FILE_SYSTEM_ACCESS_CONTROL_BINARY";
// raw data
2018-06-24 08:18:54 +00:00
fnd::Vec<byte_t> mRawBinary;
2017-07-06 11:17:21 +00:00
// variables
uint32_t mVersion;
2018-06-24 15:56:55 +00:00
fnd::List<fac::FsAccessFlag> mFsaRights;
2018-03-22 05:26:22 +00:00
fnd::List<uint32_t> mContentOwnerIdList;
fnd::List<uint32_t> mSaveDataOwnerIdList;
2017-07-06 11:17:21 +00:00
};
}