nstool/lib/libnx/include/nx/SacBinary.h

41 lines
826 B
C
Raw Normal View History

#pragma once
#include <string>
#include <vector>
2018-06-24 08:18:54 +00:00
#include <fnd/ISerialisable.h>
#include <fnd/List.h>
#include <nx/SacEntry.h>
2017-07-06 11:17:21 +00:00
namespace nx
{
2017-07-06 11:17:21 +00:00
class SacBinary :
2018-06-24 08:18:54 +00:00
public fnd::ISerialisable
2017-07-06 11:17:21 +00:00
{
public:
SacBinary();
SacBinary(const SacBinary& other);
2018-06-24 08:18:54 +00:00
void operator=(const SacBinary& other);
2017-07-06 11:17:21 +00:00
bool operator==(const SacBinary& other) const;
bool operator!=(const SacBinary& other) const;
// export/import binary
2018-06-24 08:18:54 +00:00
void toBytes();
void fromBytes(const byte_t* bytes, size_t len);
const fnd::Vec<byte_t>& getBytes() const;
2017-07-06 11:17:21 +00:00
// variables
void clear();
2017-07-06 11:17:21 +00:00
const fnd::List<SacEntry>& getServiceList() const;
void addService(const SacEntry& service);
private:
const std::string kModuleName = "SAC_BINARY";
// raw binary
2018-06-24 08:18:54 +00:00
fnd::Vec<byte_t> mRawBinary;
2017-07-06 11:17:21 +00:00
// variables
fnd::List<SacEntry> mServices;
};
}