[fnd|...] Renamed ISerialisable to IByteModel

This commit is contained in:
jakcron 2018-10-14 13:45:09 +08:00
parent 1c338f1176
commit 2439250fdf
25 changed files with 455 additions and 455 deletions

View file

@ -1,6 +1,6 @@
#pragma once
#include <string>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <nn/es/ticket.h>
namespace nn
@ -8,7 +8,7 @@ namespace nn
namespace es
{
class SectionHeader_V2 :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
SectionHeader_V2();

View file

@ -1,6 +1,6 @@
#pragma once
#include <string>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
#include <nn/es/ticket.h>
@ -9,7 +9,7 @@ namespace nn
namespace es
{
class TicketBody_V2 :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
TicketBody_V2();

View file

@ -1,23 +1,23 @@
#pragma once
#include <fnd/types.h>
#include <fnd/Vec.h>
namespace fnd
{
class ISerialisable
{
public:
virtual ~ISerialisable() = default;
// serialise
virtual void toBytes() = 0;
// deserialise
virtual void fromBytes(const byte_t* data, size_t len) = 0;
// get byte vector
virtual const fnd::Vec<byte_t>& getBytes() const = 0;
// clear data
virtual void clear() = 0;
};
#pragma once
#include <fnd/types.h>
#include <fnd/Vec.h>
namespace fnd
{
class IByteModel
{
public:
virtual ~IByteModel() = default;
// serialise
virtual void toBytes() = 0;
// deserialise
virtual void fromBytes(const byte_t* data, size_t len) = 0;
// get byte vector
virtual const fnd::Vec<byte_t>& getBytes() const = 0;
// clear data
virtual void clear() = 0;
};
}

View file

@ -1,170 +1,170 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{4D27EDB9-5110-44FE-8CE2-D46C5AD3C55B}</ProjectGuid>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\libfnd\include;..\libpolarssl\include;..\liblz4\include;</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\libfnd\include;..\libpolarssl\include;..\liblz4\include;</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\libfnd\include;..\libpolarssl\include;..\liblz4\include;</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\libfnd\include;..\libpolarssl\include;..\liblz4\include;</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="makefile" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\fnd\aes.h" />
<ClInclude Include="include\fnd\AesCtrWrappedIFile.h" />
<ClInclude Include="include\fnd\base64.h" />
<ClInclude Include="include\fnd\BitMath.h" />
<ClInclude Include="include\fnd\ecdsa.h" />
<ClInclude Include="include\fnd\elf.h" />
<ClInclude Include="include\fnd\Endian.h" />
<ClInclude Include="include\fnd\Exception.h" />
<ClInclude Include="include\fnd\IFile.h" />
<ClInclude Include="include\fnd\io.h" />
<ClInclude Include="include\fnd\ISerialisable.h" />
<ClInclude Include="include\fnd\LayeredIntegrityMetadata.h" />
<ClInclude Include="include\fnd\LayeredIntegrityWrappedIFile.h" />
<ClInclude Include="include\fnd\List.h" />
<ClInclude Include="include\fnd\lz4.h" />
<ClInclude Include="include\fnd\OffsetAdjustedIFile.h" />
<ClInclude Include="include\fnd\ResourceFileReader.h" />
<ClInclude Include="include\fnd\rsa.h" />
<ClInclude Include="include\fnd\sha.h" />
<ClInclude Include="include\fnd\SharedPtr.h" />
<ClInclude Include="include\fnd\SimpleFile.h" />
<ClInclude Include="include\fnd\SimpleTextOutput.h" />
<ClInclude Include="include\fnd\StringConv.h" />
<ClInclude Include="include\fnd\types.h" />
<ClInclude Include="include\fnd\Vec.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="source\AesCtrWrappedIFile.cpp" />
<ClCompile Include="source\aes_wrapper.cpp" />
<ClCompile Include="source\base64_wrapper.cpp" />
<ClCompile Include="source\Exception.cpp" />
<ClCompile Include="source\io.cpp" />
<ClCompile Include="source\LayeredIntegrityMetadata.cpp" />
<ClCompile Include="source\LayeredIntegrityWrappedIFile.cpp" />
<ClCompile Include="source\lz4_wrapper.cpp" />
<ClCompile Include="source\OffsetAdjustedIFile.cpp" />
<ClCompile Include="source\ResourceFileReader.cpp" />
<ClCompile Include="source\rsa_wrapper.cpp" />
<ClCompile Include="source\sha_wrapper.cpp" />
<ClCompile Include="source\SimpleFile.cpp" />
<ClCompile Include="source\SimpleTextOutput.cpp" />
<ClCompile Include="source\StringConv.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{4D27EDB9-5110-44FE-8CE2-D46C5AD3C55B}</ProjectGuid>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\libfnd\include;..\libpolarssl\include;..\liblz4\include;</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\libfnd\include;..\libpolarssl\include;..\liblz4\include;</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\libfnd\include;..\libpolarssl\include;..\liblz4\include;</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<AdditionalIncludeDirectories>..\libfnd\include;..\libpolarssl\include;..\liblz4\include;</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<None Include="makefile" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\fnd\aes.h" />
<ClInclude Include="include\fnd\AesCtrWrappedIFile.h" />
<ClInclude Include="include\fnd\base64.h" />
<ClInclude Include="include\fnd\BitMath.h" />
<ClInclude Include="include\fnd\ecdsa.h" />
<ClInclude Include="include\fnd\elf.h" />
<ClInclude Include="include\fnd\Endian.h" />
<ClInclude Include="include\fnd\Exception.h" />
<ClInclude Include="include\fnd\IByteModel.h" />
<ClInclude Include="include\fnd\IFile.h" />
<ClInclude Include="include\fnd\io.h" />
<ClInclude Include="include\fnd\LayeredIntegrityMetadata.h" />
<ClInclude Include="include\fnd\LayeredIntegrityWrappedIFile.h" />
<ClInclude Include="include\fnd\List.h" />
<ClInclude Include="include\fnd\lz4.h" />
<ClInclude Include="include\fnd\OffsetAdjustedIFile.h" />
<ClInclude Include="include\fnd\ResourceFileReader.h" />
<ClInclude Include="include\fnd\rsa.h" />
<ClInclude Include="include\fnd\sha.h" />
<ClInclude Include="include\fnd\SharedPtr.h" />
<ClInclude Include="include\fnd\SimpleFile.h" />
<ClInclude Include="include\fnd\SimpleTextOutput.h" />
<ClInclude Include="include\fnd\StringConv.h" />
<ClInclude Include="include\fnd\types.h" />
<ClInclude Include="include\fnd\Vec.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="source\AesCtrWrappedIFile.cpp" />
<ClCompile Include="source\aes_wrapper.cpp" />
<ClCompile Include="source\base64_wrapper.cpp" />
<ClCompile Include="source\Exception.cpp" />
<ClCompile Include="source\io.cpp" />
<ClCompile Include="source\LayeredIntegrityMetadata.cpp" />
<ClCompile Include="source\LayeredIntegrityWrappedIFile.cpp" />
<ClCompile Include="source\lz4_wrapper.cpp" />
<ClCompile Include="source\OffsetAdjustedIFile.cpp" />
<ClCompile Include="source\ResourceFileReader.cpp" />
<ClCompile Include="source\rsa_wrapper.cpp" />
<ClCompile Include="source\sha_wrapper.cpp" />
<ClCompile Include="source\SimpleFile.cpp" />
<ClCompile Include="source\SimpleTextOutput.cpp" />
<ClCompile Include="source\StringConv.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View file

@ -1,144 +1,144 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="makefile" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\fnd\aes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\AesCtrWrappedIFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\base64.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\BitMath.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\ecdsa.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\elf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\Endian.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\Exception.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\IFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\io.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\ISerialisable.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\LayeredIntegrityMetadata.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\LayeredIntegrityWrappedIFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\List.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\lz4.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\OffsetAdjustedIFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\ResourceFileReader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\rsa.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\sha.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\SharedPtr.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\SimpleFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\SimpleTextOutput.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\StringConv.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\types.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\Vec.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="source\aes_wrapper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\AesCtrWrappedIFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\base64_wrapper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\Exception.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\io.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\LayeredIntegrityMetadata.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\LayeredIntegrityWrappedIFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\lz4_wrapper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\OffsetAdjustedIFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\ResourceFileReader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\rsa_wrapper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\sha_wrapper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\SimpleFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\SimpleTextOutput.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\StringConv.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<None Include="makefile" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="include\fnd\aes.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\AesCtrWrappedIFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\base64.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\BitMath.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\ecdsa.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\elf.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\Endian.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\Exception.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\IByteModel.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\IFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\io.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\LayeredIntegrityMetadata.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\LayeredIntegrityWrappedIFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\List.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\lz4.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\OffsetAdjustedIFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\ResourceFileReader.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\rsa.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\sha.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\SharedPtr.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\SimpleFile.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\SimpleTextOutput.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\StringConv.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\types.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="include\fnd\Vec.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="source\aes_wrapper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\AesCtrWrappedIFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\base64_wrapper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\Exception.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\io.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\LayeredIntegrityMetadata.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\LayeredIntegrityWrappedIFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\lz4_wrapper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\OffsetAdjustedIFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\ResourceFileReader.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\rsa_wrapper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\sha_wrapper.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\SimpleFile.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\SimpleTextOutput.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="source\StringConv.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View file

@ -1,14 +1,14 @@
#pragma once
#include <nn/hac/aset.h>
#include <fnd/List.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
namespace nn
{
namespace hac
{
class AssetHeader :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
struct sSection

View file

@ -1,7 +1,7 @@
#pragma once
#include <string>
#include <fnd/types.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <nn/hac/aci.h>
#include <nn/hac/FileSystemAccessControlBinary.h>
#include <nn/hac/ServiceAccessControlBinary.h>
@ -11,7 +11,7 @@ namespace nn
{
namespace hac
{
class AccessControlInfoBinary : public fnd::ISerialisable
class AccessControlInfoBinary : public fnd::IByteModel
{
public:
AccessControlInfoBinary();

View file

@ -2,7 +2,7 @@
#include <string>
#include <fnd/types.h>
#include <fnd/List.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <nn/hac/aci.h>
#include <nn/hac/FileSystemAccessControlBinary.h>
#include <nn/hac/ServiceAccessControlBinary.h>
@ -12,7 +12,7 @@ namespace nn
{
namespace hac
{
class AccessControlInfoDescBinary : public fnd::ISerialisable
class AccessControlInfoDescBinary : public fnd::IByteModel
{
public:
struct sProgramIdRestrict

View file

@ -1,7 +1,7 @@
#pragma once
#include <string>
#include <fnd/types.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
#include <nn/hac/nacp.h>
@ -10,7 +10,7 @@ namespace nn
namespace hac
{
class ApplicationControlPropertyBinary :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
struct sTitle

View file

@ -1,7 +1,7 @@
#pragma once
#include <string>
#include <cstring>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
#include <nn/hac/cnmt.h>
@ -10,7 +10,7 @@ namespace nn
namespace hac
{
class ContentMetaBinary :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
struct ContentInfo

View file

@ -1,7 +1,7 @@
#pragma once
#include <string>
#include <fnd/types.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
#include <nn/hac/fac.h>
@ -9,7 +9,7 @@ namespace nn
{
namespace hac
{
class FileSystemAccessControlBinary : public fnd::ISerialisable
class FileSystemAccessControlBinary : public fnd::IByteModel
{
public:
struct sSaveDataOwnerId

View file

@ -1,6 +1,6 @@
#pragma once
#include <nn/hac/hierarchicalintegrity.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
#include <fnd/sha.h>
@ -9,7 +9,7 @@ namespace nn
namespace hac
{
class HierarchicalIntegrityHeader :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
struct sLayer

View file

@ -1,6 +1,6 @@
#pragma once
#include <nn/hac/hierarchicalsha256.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
namespace nn
@ -8,7 +8,7 @@ namespace nn
namespace hac
{
class HierarchicalSha256Header :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
struct sLayer

View file

@ -1,7 +1,7 @@
#pragma once
#include <string>
#include <vector>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
#include <nn/hac/ThreadInfoHandler.h>
#include <nn/hac/SystemCallHandler.h>
@ -17,7 +17,7 @@ namespace nn
namespace hac
{
class KernelCapabilityBinary :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
KernelCapabilityBinary();

View file

@ -1,80 +1,80 @@
#pragma once
#include <string>
#include <fnd/List.h>
#include <fnd/ISerialisable.h>
#include <nn/hac/meta.h>
#include <nn/hac/AccessControlInfoBinary.h>
#include <nn/hac/AccessControlInfoDescBinary.h>
namespace nn
{
namespace hac
{
class MetaBinary :
public fnd::ISerialisable
{
public:
MetaBinary();
MetaBinary(const MetaBinary& other);
void operator=(const MetaBinary& other);
bool operator==(const MetaBinary& other) const;
bool operator!=(const MetaBinary& other) const;
// export/import binary
void toBytes();
void fromBytes(const byte_t* bytes, size_t len);
const fnd::Vec<byte_t>& getBytes() const;
// variables
void clear();
meta::InstructionType getInstructionType() const;
void setInstructionType(meta::InstructionType type);
meta::ProcAddrSpaceType getProcAddressSpaceType() const;
void setProcAddressSpaceType(meta::ProcAddrSpaceType type);
byte_t getMainThreadPriority() const;
void setMainThreadPriority(byte_t priority);
byte_t getMainThreadCpuId() const;
void setMainThreadCpuId(byte_t cpu_id);
uint32_t getVersion() const;
void setVersion(uint32_t version);
uint32_t getMainThreadStackSize() const;
void setMainThreadStackSize(uint32_t size);
const std::string& getName() const;
void setName(const std::string& name);
const std::string& getProductCode() const;
void setProductCode(const std::string& product_code);
const AccessControlInfoBinary& getAci() const;
void setAci(const AccessControlInfoBinary& aci);
const AccessControlInfoDescBinary& getAcid() const;
void setAcid(const AccessControlInfoDescBinary& acid);
private:
const std::string kModuleName = "META_BINARY";
// raw binary
fnd::Vec<byte_t> mRawBinary;
// variables
meta::InstructionType mInstructionType;
meta::ProcAddrSpaceType mProcAddressSpaceType;
byte_t mMainThreadPriority;
byte_t mMainThreadCpuId;
uint32_t mVersion;
uint32_t mMainThreadStackSize;
std::string mName;
std::string mProductCode;
AccessControlInfoBinary mAci;
AccessControlInfoDescBinary mAcid;
};
}
#pragma once
#include <string>
#include <fnd/List.h>
#include <fnd/IByteModel.h>
#include <nn/hac/meta.h>
#include <nn/hac/AccessControlInfoBinary.h>
#include <nn/hac/AccessControlInfoDescBinary.h>
namespace nn
{
namespace hac
{
class MetaBinary :
public fnd::IByteModel
{
public:
MetaBinary();
MetaBinary(const MetaBinary& other);
void operator=(const MetaBinary& other);
bool operator==(const MetaBinary& other) const;
bool operator!=(const MetaBinary& other) const;
// export/import binary
void toBytes();
void fromBytes(const byte_t* bytes, size_t len);
const fnd::Vec<byte_t>& getBytes() const;
// variables
void clear();
meta::InstructionType getInstructionType() const;
void setInstructionType(meta::InstructionType type);
meta::ProcAddrSpaceType getProcAddressSpaceType() const;
void setProcAddressSpaceType(meta::ProcAddrSpaceType type);
byte_t getMainThreadPriority() const;
void setMainThreadPriority(byte_t priority);
byte_t getMainThreadCpuId() const;
void setMainThreadCpuId(byte_t cpu_id);
uint32_t getVersion() const;
void setVersion(uint32_t version);
uint32_t getMainThreadStackSize() const;
void setMainThreadStackSize(uint32_t size);
const std::string& getName() const;
void setName(const std::string& name);
const std::string& getProductCode() const;
void setProductCode(const std::string& product_code);
const AccessControlInfoBinary& getAci() const;
void setAci(const AccessControlInfoBinary& aci);
const AccessControlInfoDescBinary& getAcid() const;
void setAcid(const AccessControlInfoDescBinary& acid);
private:
const std::string kModuleName = "META_BINARY";
// raw binary
fnd::Vec<byte_t> mRawBinary;
// variables
meta::InstructionType mInstructionType;
meta::ProcAddrSpaceType mProcAddressSpaceType;
byte_t mMainThreadPriority;
byte_t mMainThreadCpuId;
uint32_t mVersion;
uint32_t mMainThreadStackSize;
std::string mName;
std::string mProductCode;
AccessControlInfoBinary mAci;
AccessControlInfoDescBinary mAcid;
};
}
}

View file

@ -1,6 +1,6 @@
#pragma once
#include <nn/hac/nca.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
namespace nn
@ -8,7 +8,7 @@ namespace nn
namespace hac
{
class NcaHeader :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
enum FormatVersion

View file

@ -1,7 +1,7 @@
#pragma once
#include <cstring>
#include <nn/hac/nro.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
namespace nn
@ -9,7 +9,7 @@ namespace nn
namespace hac
{
class NroHeader :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
struct sRoCrt

View file

@ -1,7 +1,7 @@
#pragma once
#include <cstring>
#include <nn/hac/nso.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
namespace nn
@ -9,7 +9,7 @@ namespace nn
namespace hac
{
class NsoHeader :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
struct sModuleId

View file

@ -1,7 +1,7 @@
#pragma once
#include <string>
#include <fnd/types.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
#include <nn/hac/pfs.h>
@ -10,7 +10,7 @@ namespace nn
namespace hac
{
class PfsHeader :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
enum FsType

View file

@ -1,7 +1,7 @@
#pragma once
#include <string>
#include <vector>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
#include <nn/hac/ServiceAccessControlEntry.h>
@ -10,7 +10,7 @@ namespace nn
namespace hac
{
class ServiceAccessControlBinary :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
ServiceAccessControlBinary();

View file

@ -1,14 +1,14 @@
#pragma once
#include <string>
#include <fnd/types.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
namespace nn
{
namespace hac
{
class ServiceAccessControlEntry :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
ServiceAccessControlEntry();

View file

@ -1,6 +1,6 @@
#pragma once
#include <nn/hac/xci.h>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <fnd/List.h>
namespace nn
@ -8,7 +8,7 @@ namespace nn
namespace hac
{
class XciHeader :
public fnd::ISerialisable
public fnd::IByteModel
{
public:
XciHeader();

View file

@ -1,6 +1,6 @@
#pragma once
#include <string>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <nn/pki/cert.h>
namespace nn
@ -8,7 +8,7 @@ namespace nn
namespace pki
{
class CertificateBody
: public fnd::ISerialisable
: public fnd::IByteModel
{
public:
CertificateBody();

View file

@ -1,6 +1,6 @@
#pragma once
#include <string>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <nn/pki/sign.h>
namespace nn
@ -8,7 +8,7 @@ namespace nn
namespace pki
{
class SignatureBlock
: public fnd::ISerialisable
: public fnd::IByteModel
{
public:
SignatureBlock();

View file

@ -1,6 +1,6 @@
#pragma once
#include <string>
#include <fnd/ISerialisable.h>
#include <fnd/IByteModel.h>
#include <nn/pki/SignatureBlock.h>
namespace nn
@ -9,7 +9,7 @@ namespace pki
{
template <class T>
class SignedData
: public fnd::ISerialisable
: public fnd::IByteModel
{
public:
SignedData();