2017-07-12 14:02:10 +00:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2018-10-14 05:45:09 +00:00
|
|
|
#include <fnd/IByteModel.h>
|
2017-07-12 14:02:10 +00:00
|
|
|
#include <fnd/List.h>
|
2018-08-07 07:17:51 +00:00
|
|
|
#include <nn/hac/ThreadInfoHandler.h>
|
|
|
|
#include <nn/hac/SystemCallHandler.h>
|
|
|
|
#include <nn/hac/MemoryMappingHandler.h>
|
|
|
|
#include <nn/hac/InteruptHandler.h>
|
|
|
|
#include <nn/hac/MiscParamsHandler.h>
|
|
|
|
#include <nn/hac/KernelVersionHandler.h>
|
|
|
|
#include <nn/hac/HandleTableSizeHandler.h>
|
|
|
|
#include <nn/hac/MiscFlagsHandler.h>
|
2017-07-12 14:02:10 +00:00
|
|
|
|
2018-08-07 07:17:51 +00:00
|
|
|
namespace nn
|
|
|
|
{
|
|
|
|
namespace hac
|
2017-07-12 14:02:10 +00:00
|
|
|
{
|
2018-06-29 04:24:39 +00:00
|
|
|
class KernelCapabilityBinary :
|
2018-10-14 05:45:09 +00:00
|
|
|
public fnd::IByteModel
|
2017-07-12 14:02:10 +00:00
|
|
|
{
|
|
|
|
public:
|
2018-06-29 04:24:39 +00:00
|
|
|
KernelCapabilityBinary();
|
|
|
|
KernelCapabilityBinary(const KernelCapabilityBinary& other);
|
2017-07-12 14:02:10 +00:00
|
|
|
|
2018-06-29 04:24:39 +00:00
|
|
|
void operator=(const KernelCapabilityBinary& other);
|
|
|
|
bool operator==(const KernelCapabilityBinary& other) const;
|
|
|
|
bool operator!=(const KernelCapabilityBinary& other) const;
|
2017-07-12 14:02:10 +00:00
|
|
|
|
|
|
|
// export/import binary
|
2018-06-24 08:18:54 +00:00
|
|
|
void toBytes();
|
|
|
|
void fromBytes(const byte_t* bytes, size_t len);
|
|
|
|
virtual const fnd::Vec<byte_t>& getBytes() const;
|
2017-07-12 14:02:10 +00:00
|
|
|
|
|
|
|
// variables (consider further abstraction?)
|
2017-07-15 08:28:01 +00:00
|
|
|
void clear();
|
2017-07-12 14:02:10 +00:00
|
|
|
const ThreadInfoHandler& getThreadInfo() const;
|
|
|
|
ThreadInfoHandler& getThreadInfo();
|
|
|
|
|
|
|
|
const SystemCallHandler& getSystemCalls() const;
|
|
|
|
SystemCallHandler& getSystemCalls();
|
|
|
|
|
|
|
|
const MemoryMappingHandler& getMemoryMaps() const;
|
|
|
|
MemoryMappingHandler& getMemoryMaps();
|
|
|
|
|
|
|
|
const InteruptHandler& getInterupts() const;
|
|
|
|
InteruptHandler& getInterupts();
|
|
|
|
|
|
|
|
const MiscParamsHandler& getMiscParams() const;
|
|
|
|
MiscParamsHandler& getMiscParams();
|
|
|
|
|
|
|
|
const KernelVersionHandler& getKernelVersion() const;
|
|
|
|
KernelVersionHandler& getKernelVersion();
|
|
|
|
|
|
|
|
const HandleTableSizeHandler& getHandleTableSize() const;
|
|
|
|
HandleTableSizeHandler& getHandleTableSize();
|
|
|
|
|
|
|
|
const MiscFlagsHandler& getMiscFlags() const;
|
|
|
|
MiscFlagsHandler& getMiscFlags();
|
|
|
|
|
|
|
|
private:
|
|
|
|
const std::string kModuleName = "KC_BINARY";
|
|
|
|
|
|
|
|
// raw binary
|
2018-06-24 08:18:54 +00:00
|
|
|
fnd::Vec<byte_t> mRawBinary;
|
2017-07-12 14:02:10 +00:00
|
|
|
|
|
|
|
// variables
|
|
|
|
ThreadInfoHandler mThreadInfo;
|
|
|
|
SystemCallHandler mSystemCalls;
|
|
|
|
MemoryMappingHandler mMemoryMap;
|
|
|
|
InteruptHandler mInterupts;
|
|
|
|
MiscParamsHandler mMiscParams;
|
|
|
|
KernelVersionHandler mKernelVersion;
|
|
|
|
HandleTableSizeHandler mHandleTableSize;
|
|
|
|
MiscFlagsHandler mMiscFlags;
|
|
|
|
};
|
|
|
|
}
|
2018-08-07 07:17:51 +00:00
|
|
|
}
|