nstool/lib/libhac/include/nn/hac/AccessControlInfoBinary.h

56 lines
1.6 KiB
C
Raw Normal View History

#pragma once
#include <string>
#include <fnd/types.h>
#include <fnd/IByteModel.h>
2018-08-07 07:17:51 +00:00
#include <nn/hac/aci.h>
#include <nn/hac/FileSystemAccessControlBinary.h>
#include <nn/hac/ServiceAccessControlBinary.h>
#include <nn/hac/KernelCapabilityBinary.h>
2018-08-07 07:17:51 +00:00
namespace nn
{
namespace hac
{
class AccessControlInfoBinary : public fnd::IByteModel
{
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-08-07 07:17:51 +00:00
const nn::hac::FileSystemAccessControlBinary& getFileSystemAccessControl() const;
void setFileSystemAccessControl(const FileSystemAccessControlBinary& fac);
2018-08-07 07:17:51 +00:00
const nn::hac::ServiceAccessControlBinary& getServiceAccessControl() const;
2018-06-29 04:00:15 +00:00
void setServiceAccessControl(const ServiceAccessControlBinary& sac);
2018-08-07 07:17:51 +00:00
const nn::hac::KernelCapabilityBinary& getKernelCapabilities() const;
void setKernelCapabilities(const KernelCapabilityBinary& kc);
private:
const std::string kModuleName = "ACCESS_CONTROL_INFO_BINARY";
// raw data
fnd::Vec<byte_t> mRawBinary;
// variables
uint64_t mProgramId;
2018-08-07 07:17:51 +00:00
nn::hac::FileSystemAccessControlBinary mFileSystemAccessControl;
nn::hac::ServiceAccessControlBinary mServiceAccessControl;
nn::hac::KernelCapabilityBinary mKernelCapabilities;
};
2018-08-07 07:17:51 +00:00
}
}