2017-07-06 10:57:33 +00:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2018-06-24 08:18:54 +00:00
|
|
|
#include <fnd/ISerialisable.h>
|
2017-07-06 10:57:33 +00:00
|
|
|
#include <fnd/List.h>
|
|
|
|
#include <nx/SacEntry.h>
|
|
|
|
|
2017-07-06 11:17:21 +00:00
|
|
|
namespace nx
|
2017-07-06 10:57:33 +00:00
|
|
|
{
|
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
|
2017-07-15 08:28:01 +00:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|