diff --git a/lib/libes/include/nn/es/SectionHeader_V2.h b/lib/libes/include/nn/es/SectionHeader_V2.h index eb7558b..9bf8290 100644 --- a/lib/libes/include/nn/es/SectionHeader_V2.h +++ b/lib/libes/include/nn/es/SectionHeader_V2.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include namespace nn @@ -8,7 +8,7 @@ namespace nn namespace es { class SectionHeader_V2 : - public fnd::ISerialisable + public fnd::IByteModel { public: SectionHeader_V2(); diff --git a/lib/libes/include/nn/es/TicketBody_V2.h b/lib/libes/include/nn/es/TicketBody_V2.h index 6c7150a..1e0b348 100644 --- a/lib/libes/include/nn/es/TicketBody_V2.h +++ b/lib/libes/include/nn/es/TicketBody_V2.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include #include @@ -9,7 +9,7 @@ namespace nn namespace es { class TicketBody_V2 : - public fnd::ISerialisable + public fnd::IByteModel { public: TicketBody_V2(); diff --git a/lib/libfnd/include/fnd/ISerialisable.h b/lib/libfnd/include/fnd/IByteModel.h similarity index 81% rename from lib/libfnd/include/fnd/ISerialisable.h rename to lib/libfnd/include/fnd/IByteModel.h index b0d49c7..6f92187 100644 --- a/lib/libfnd/include/fnd/ISerialisable.h +++ b/lib/libfnd/include/fnd/IByteModel.h @@ -1,23 +1,23 @@ -#pragma once -#include -#include - -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& getBytes() const = 0; - - // clear data - virtual void clear() = 0; - }; +#pragma once +#include +#include + +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& getBytes() const = 0; + + // clear data + virtual void clear() = 0; + }; } \ No newline at end of file diff --git a/lib/libfnd/libfnd.vcxproj b/lib/libfnd/libfnd.vcxproj index 0603ace..927922b 100644 --- a/lib/libfnd/libfnd.vcxproj +++ b/lib/libfnd/libfnd.vcxproj @@ -1,170 +1,170 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - 15.0 - {4D27EDB9-5110-44FE-8CE2-D46C5AD3C55B} - 10.0.16299.0 - - - - StaticLibrary - true - v141 - MultiByte - - - StaticLibrary - false - v141 - true - MultiByte - - - StaticLibrary - true - v141 - MultiByte - - - StaticLibrary - false - v141 - true - MultiByte - - - - - - - - - - - - - - - - - - - - - - - Level3 - Disabled - true - ..\libfnd\include;..\libpolarssl\include;..\liblz4\include; - _MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - - - Level3 - Disabled - true - ..\libfnd\include;..\libpolarssl\include;..\liblz4\include; - _MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - - - Level3 - MaxSpeed - true - true - true - ..\libfnd\include;..\libpolarssl\include;..\liblz4\include; - _MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - true - true - - - - - Level3 - MaxSpeed - true - true - true - ..\libfnd\include;..\libpolarssl\include;..\liblz4\include; - _MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - true - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 15.0 + {4D27EDB9-5110-44FE-8CE2-D46C5AD3C55B} + 10.0.16299.0 + + + + StaticLibrary + true + v141 + MultiByte + + + StaticLibrary + false + v141 + true + MultiByte + + + StaticLibrary + true + v141 + MultiByte + + + StaticLibrary + false + v141 + true + MultiByte + + + + + + + + + + + + + + + + + + + + + + + Level3 + Disabled + true + ..\libfnd\include;..\libpolarssl\include;..\liblz4\include; + _MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + + + Level3 + Disabled + true + ..\libfnd\include;..\libpolarssl\include;..\liblz4\include; + _MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + + + Level3 + MaxSpeed + true + true + true + ..\libfnd\include;..\libpolarssl\include;..\liblz4\include; + _MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + true + true + + + + + Level3 + MaxSpeed + true + true + true + ..\libfnd\include;..\libpolarssl\include;..\liblz4\include; + _MBCS;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) + + + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/lib/libfnd/libfnd.vcxproj.filters b/lib/libfnd/libfnd.vcxproj.filters index 56f7ae5..95e68e0 100644 --- a/lib/libfnd/libfnd.vcxproj.filters +++ b/lib/libfnd/libfnd.vcxproj.filters @@ -1,144 +1,144 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + \ No newline at end of file diff --git a/lib/libhac-hb/include/nn/hac/AssetHeader.h b/lib/libhac-hb/include/nn/hac/AssetHeader.h index bbef068..cefb78e 100644 --- a/lib/libhac-hb/include/nn/hac/AssetHeader.h +++ b/lib/libhac-hb/include/nn/hac/AssetHeader.h @@ -1,14 +1,14 @@ #pragma once #include #include -#include +#include namespace nn { namespace hac { class AssetHeader : - public fnd::ISerialisable + public fnd::IByteModel { public: struct sSection diff --git a/lib/libhac/include/nn/hac/AccessControlInfoBinary.h b/lib/libhac/include/nn/hac/AccessControlInfoBinary.h index 3fa1763..d10ab1d 100644 --- a/lib/libhac/include/nn/hac/AccessControlInfoBinary.h +++ b/lib/libhac/include/nn/hac/AccessControlInfoBinary.h @@ -1,7 +1,7 @@ #pragma once #include #include -#include +#include #include #include #include @@ -11,7 +11,7 @@ namespace nn { namespace hac { - class AccessControlInfoBinary : public fnd::ISerialisable + class AccessControlInfoBinary : public fnd::IByteModel { public: AccessControlInfoBinary(); diff --git a/lib/libhac/include/nn/hac/AccessControlInfoDescBinary.h b/lib/libhac/include/nn/hac/AccessControlInfoDescBinary.h index df7b004..96fb5a5 100644 --- a/lib/libhac/include/nn/hac/AccessControlInfoDescBinary.h +++ b/lib/libhac/include/nn/hac/AccessControlInfoDescBinary.h @@ -2,7 +2,7 @@ #include #include #include -#include +#include #include #include #include @@ -12,7 +12,7 @@ namespace nn { namespace hac { - class AccessControlInfoDescBinary : public fnd::ISerialisable + class AccessControlInfoDescBinary : public fnd::IByteModel { public: struct sProgramIdRestrict diff --git a/lib/libhac/include/nn/hac/ApplicationControlPropertyBinary.h b/lib/libhac/include/nn/hac/ApplicationControlPropertyBinary.h index af69e42..9b53bcf 100644 --- a/lib/libhac/include/nn/hac/ApplicationControlPropertyBinary.h +++ b/lib/libhac/include/nn/hac/ApplicationControlPropertyBinary.h @@ -1,7 +1,7 @@ #pragma once #include #include -#include +#include #include #include @@ -10,7 +10,7 @@ namespace nn namespace hac { class ApplicationControlPropertyBinary : - public fnd::ISerialisable + public fnd::IByteModel { public: struct sTitle diff --git a/lib/libhac/include/nn/hac/ContentMetaBinary.h b/lib/libhac/include/nn/hac/ContentMetaBinary.h index 8c57644..d4d3b93 100644 --- a/lib/libhac/include/nn/hac/ContentMetaBinary.h +++ b/lib/libhac/include/nn/hac/ContentMetaBinary.h @@ -1,7 +1,7 @@ #pragma once #include #include -#include +#include #include #include @@ -10,7 +10,7 @@ namespace nn namespace hac { class ContentMetaBinary : - public fnd::ISerialisable + public fnd::IByteModel { public: struct ContentInfo diff --git a/lib/libhac/include/nn/hac/FileSystemAccessControlBinary.h b/lib/libhac/include/nn/hac/FileSystemAccessControlBinary.h index dbf898a..69f8c57 100644 --- a/lib/libhac/include/nn/hac/FileSystemAccessControlBinary.h +++ b/lib/libhac/include/nn/hac/FileSystemAccessControlBinary.h @@ -1,7 +1,7 @@ #pragma once #include #include -#include +#include #include #include @@ -9,7 +9,7 @@ namespace nn { namespace hac { - class FileSystemAccessControlBinary : public fnd::ISerialisable + class FileSystemAccessControlBinary : public fnd::IByteModel { public: struct sSaveDataOwnerId diff --git a/lib/libhac/include/nn/hac/HierarchicalIntegrityHeader.h b/lib/libhac/include/nn/hac/HierarchicalIntegrityHeader.h index 953b225..6a7ca66 100644 --- a/lib/libhac/include/nn/hac/HierarchicalIntegrityHeader.h +++ b/lib/libhac/include/nn/hac/HierarchicalIntegrityHeader.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include #include @@ -9,7 +9,7 @@ namespace nn namespace hac { class HierarchicalIntegrityHeader : - public fnd::ISerialisable + public fnd::IByteModel { public: struct sLayer diff --git a/lib/libhac/include/nn/hac/HierarchicalSha256Header.h b/lib/libhac/include/nn/hac/HierarchicalSha256Header.h index fe38b87..37d0be6 100644 --- a/lib/libhac/include/nn/hac/HierarchicalSha256Header.h +++ b/lib/libhac/include/nn/hac/HierarchicalSha256Header.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include namespace nn @@ -8,7 +8,7 @@ namespace nn namespace hac { class HierarchicalSha256Header : - public fnd::ISerialisable + public fnd::IByteModel { public: struct sLayer diff --git a/lib/libhac/include/nn/hac/KernelCapabilityBinary.h b/lib/libhac/include/nn/hac/KernelCapabilityBinary.h index 72869c3..bcb095a 100644 --- a/lib/libhac/include/nn/hac/KernelCapabilityBinary.h +++ b/lib/libhac/include/nn/hac/KernelCapabilityBinary.h @@ -1,7 +1,7 @@ #pragma once #include #include -#include +#include #include #include #include @@ -17,7 +17,7 @@ namespace nn namespace hac { class KernelCapabilityBinary : - public fnd::ISerialisable + public fnd::IByteModel { public: KernelCapabilityBinary(); diff --git a/lib/libhac/include/nn/hac/MetaBinary.h b/lib/libhac/include/nn/hac/MetaBinary.h index 4f981da..b88e549 100644 --- a/lib/libhac/include/nn/hac/MetaBinary.h +++ b/lib/libhac/include/nn/hac/MetaBinary.h @@ -1,80 +1,80 @@ -#pragma once -#include -#include -#include -#include -#include -#include - -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& 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 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 +#include +#include +#include +#include +#include + +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& 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 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; + }; +} } \ No newline at end of file diff --git a/lib/libhac/include/nn/hac/NcaHeader.h b/lib/libhac/include/nn/hac/NcaHeader.h index 0ddbe76..a415984 100644 --- a/lib/libhac/include/nn/hac/NcaHeader.h +++ b/lib/libhac/include/nn/hac/NcaHeader.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include namespace nn @@ -8,7 +8,7 @@ namespace nn namespace hac { class NcaHeader : - public fnd::ISerialisable + public fnd::IByteModel { public: enum FormatVersion diff --git a/lib/libhac/include/nn/hac/NroHeader.h b/lib/libhac/include/nn/hac/NroHeader.h index 7bd33dd..5f3892d 100644 --- a/lib/libhac/include/nn/hac/NroHeader.h +++ b/lib/libhac/include/nn/hac/NroHeader.h @@ -1,7 +1,7 @@ #pragma once #include #include -#include +#include #include namespace nn @@ -9,7 +9,7 @@ namespace nn namespace hac { class NroHeader : - public fnd::ISerialisable + public fnd::IByteModel { public: struct sRoCrt diff --git a/lib/libhac/include/nn/hac/NsoHeader.h b/lib/libhac/include/nn/hac/NsoHeader.h index 8fb1c6b..5a6dabf 100644 --- a/lib/libhac/include/nn/hac/NsoHeader.h +++ b/lib/libhac/include/nn/hac/NsoHeader.h @@ -1,7 +1,7 @@ #pragma once #include #include -#include +#include #include namespace nn @@ -9,7 +9,7 @@ namespace nn namespace hac { class NsoHeader : - public fnd::ISerialisable + public fnd::IByteModel { public: struct sModuleId diff --git a/lib/libhac/include/nn/hac/PfsHeader.h b/lib/libhac/include/nn/hac/PfsHeader.h index 828e218..2bbac7b 100644 --- a/lib/libhac/include/nn/hac/PfsHeader.h +++ b/lib/libhac/include/nn/hac/PfsHeader.h @@ -1,7 +1,7 @@ #pragma once #include #include -#include +#include #include #include @@ -10,7 +10,7 @@ namespace nn namespace hac { class PfsHeader : - public fnd::ISerialisable + public fnd::IByteModel { public: enum FsType diff --git a/lib/libhac/include/nn/hac/ServiceAccessControlBinary.h b/lib/libhac/include/nn/hac/ServiceAccessControlBinary.h index 8c63d9c..56bded1 100644 --- a/lib/libhac/include/nn/hac/ServiceAccessControlBinary.h +++ b/lib/libhac/include/nn/hac/ServiceAccessControlBinary.h @@ -1,7 +1,7 @@ #pragma once #include #include -#include +#include #include #include @@ -10,7 +10,7 @@ namespace nn namespace hac { class ServiceAccessControlBinary : - public fnd::ISerialisable + public fnd::IByteModel { public: ServiceAccessControlBinary(); diff --git a/lib/libhac/include/nn/hac/ServiceAccessControlEntry.h b/lib/libhac/include/nn/hac/ServiceAccessControlEntry.h index 72fd1be..fa3e339 100644 --- a/lib/libhac/include/nn/hac/ServiceAccessControlEntry.h +++ b/lib/libhac/include/nn/hac/ServiceAccessControlEntry.h @@ -1,14 +1,14 @@ #pragma once #include #include -#include +#include namespace nn { namespace hac { class ServiceAccessControlEntry : - public fnd::ISerialisable + public fnd::IByteModel { public: ServiceAccessControlEntry(); diff --git a/lib/libhac/include/nn/hac/XciHeader.h b/lib/libhac/include/nn/hac/XciHeader.h index 8ed9d4c..5c99276 100644 --- a/lib/libhac/include/nn/hac/XciHeader.h +++ b/lib/libhac/include/nn/hac/XciHeader.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include namespace nn @@ -8,7 +8,7 @@ namespace nn namespace hac { class XciHeader : - public fnd::ISerialisable + public fnd::IByteModel { public: XciHeader(); diff --git a/lib/libpki/include/nn/pki/CertificateBody.h b/lib/libpki/include/nn/pki/CertificateBody.h index ea9042a..0c46f54 100644 --- a/lib/libpki/include/nn/pki/CertificateBody.h +++ b/lib/libpki/include/nn/pki/CertificateBody.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include namespace nn @@ -8,7 +8,7 @@ namespace nn namespace pki { class CertificateBody - : public fnd::ISerialisable + : public fnd::IByteModel { public: CertificateBody(); diff --git a/lib/libpki/include/nn/pki/SignatureBlock.h b/lib/libpki/include/nn/pki/SignatureBlock.h index 0b2ed71..552c3e2 100644 --- a/lib/libpki/include/nn/pki/SignatureBlock.h +++ b/lib/libpki/include/nn/pki/SignatureBlock.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include namespace nn @@ -8,7 +8,7 @@ namespace nn namespace pki { class SignatureBlock - : public fnd::ISerialisable + : public fnd::IByteModel { public: SignatureBlock(); diff --git a/lib/libpki/include/nn/pki/SignedData.h b/lib/libpki/include/nn/pki/SignedData.h index 0997cd4..a9fcb12 100644 --- a/lib/libpki/include/nn/pki/SignedData.h +++ b/lib/libpki/include/nn/pki/SignedData.h @@ -1,6 +1,6 @@ #pragma once #include -#include +#include #include namespace nn @@ -9,7 +9,7 @@ namespace pki { template class SignedData - : public fnd::ISerialisable + : public fnd::IByteModel { public: SignedData();