2017-07-06 10:57:33 +00:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
2017-08-05 13:09:50 +00:00
|
|
|
#include <fnd/MemoryBlob.h>
|
2017-07-06 10:57:33 +00:00
|
|
|
#include <fnd/List.h>
|
2017-07-21 10:30:16 +00:00
|
|
|
#include <fnd/ISerialiseableBinary.h>
|
2017-07-06 10:57:33 +00:00
|
|
|
#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 :
|
2017-07-21 10:30:16 +00:00
|
|
|
public fnd::ISerialiseableBinary
|
2017-07-06 11:17:21 +00:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
SacBinary();
|
|
|
|
SacBinary(const SacBinary& other);
|
|
|
|
SacBinary(const u8* bytes, size_t len);
|
|
|
|
|
|
|
|
bool operator==(const SacBinary& other) const;
|
|
|
|
bool operator!=(const SacBinary& other) const;
|
|
|
|
void operator=(const SacBinary& other);
|
|
|
|
|
|
|
|
// to be used after export
|
|
|
|
const u8* getBytes() const;
|
|
|
|
size_t getSize() const;
|
|
|
|
|
|
|
|
// export/import binary
|
|
|
|
void exportBinary();
|
|
|
|
void importBinary(const u8* bytes, size_t len);
|
|
|
|
|
|
|
|
// 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
|
|
|
|
fnd::MemoryBlob mBinaryBlob;
|
|
|
|
|
|
|
|
// variables
|
|
|
|
fnd::List<SacEntry> mServices;
|
|
|
|
|
|
|
|
bool isEqual(const SacBinary& other) const;
|
|
|
|
void copyFrom(const SacBinary& other);
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|