2018-06-27 05:03:46 +00:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <fnd/types.h>
|
|
|
|
#include <fnd/ISerialisable.h>
|
|
|
|
#include <nx/aci.h>
|
2018-06-28 16:20:56 +00:00
|
|
|
#include <nx/FileSystemAccessControlBinary.h>
|
2018-06-29 04:00:15 +00:00
|
|
|
#include <nx/ServiceAccessControlBinary.h>
|
2018-06-27 05:03:46 +00:00
|
|
|
#include <nx/KcBinary.h>
|
|
|
|
|
|
|
|
namespace nx
|
|
|
|
{
|
|
|
|
class AccessControlInfoBinary : public fnd::ISerialisable
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AccessControlInfoBinary();
|
|
|
|
AccessControlInfoBinary(const AccessControlInfoBinary& other);
|
|
|
|
|
|
|
|
void operator=(const AccessControlInfoBinary& other);
|
|
|
|
bool operator==(const AccessControlInfoBinary& other) const;
|
|
|
|
bool operator!=(const AccessControlInfoBinary& other) const;
|
|
|
|
|
|
|
|
// export/import binary
|
|
|
|
void toBytes();
|
|
|
|
void fromBytes(const byte_t* data, size_t len);
|
|
|
|
const fnd::Vec<byte_t>& getBytes() const;
|
|
|
|
|
|
|
|
// variables
|
|
|
|
void clear();
|
|
|
|
|
|
|
|
uint64_t getProgramId() const;
|
|
|
|
void setProgramId(uint64_t program_id);
|
|
|
|
|
2018-06-28 16:20:56 +00:00
|
|
|
const nx::FileSystemAccessControlBinary& getFileSystemAccessControl() const;
|
|
|
|
void setFileSystemAccessControl(const FileSystemAccessControlBinary& fac);
|
2018-06-27 05:03:46 +00:00
|
|
|
|
2018-06-29 04:00:15 +00:00
|
|
|
const nx::ServiceAccessControlBinary& getServiceAccessControl() const;
|
|
|
|
void setServiceAccessControl(const ServiceAccessControlBinary& sac);
|
2018-06-27 05:03:46 +00:00
|
|
|
|
|
|
|
const nx::KcBinary& getKernelCapabilities() const;
|
|
|
|
void setKernelCapabilities(const KcBinary& kc);
|
|
|
|
private:
|
|
|
|
const std::string kModuleName = "ACCESS_CONTROL_INFO_BINARY";
|
|
|
|
|
|
|
|
// raw data
|
|
|
|
fnd::Vec<byte_t> mRawBinary;
|
|
|
|
|
|
|
|
// variables
|
|
|
|
uint64_t mProgramId;
|
2018-06-28 16:20:56 +00:00
|
|
|
nx::FileSystemAccessControlBinary mFileSystemAccessControl;
|
2018-06-29 04:00:15 +00:00
|
|
|
nx::ServiceAccessControlBinary mServiceAccessControl;
|
2018-06-27 05:03:46 +00:00
|
|
|
nx::KcBinary mKernelCapabilities;
|
|
|
|
};
|
|
|
|
}
|