2017-07-06 10:57:33 +00:00
|
|
|
#pragma once
|
|
|
|
#include <string>
|
2017-08-05 13:09:50 +00:00
|
|
|
#include <fnd/MemoryBlob.h>
|
2017-07-06 10:57:33 +00:00
|
|
|
#include <fnd/List.h>
|
|
|
|
#include <nx/FacHeader.h>
|
|
|
|
|
2017-07-17 08:21:39 +00:00
|
|
|
|
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 FacBinary :
|
2017-07-17 08:21:39 +00:00
|
|
|
public FacHeader
|
2017-07-06 10:57:33 +00:00
|
|
|
{
|
2017-07-06 11:17:21 +00:00
|
|
|
public:
|
|
|
|
FacBinary();
|
|
|
|
FacBinary(const FacBinary& other);
|
|
|
|
FacBinary(const u8* bytes, size_t len);
|
2017-07-06 10:57:33 +00:00
|
|
|
|
2017-07-06 11:17:21 +00:00
|
|
|
bool operator==(const FacBinary& other) const;
|
|
|
|
bool operator!=(const FacBinary& other) const;
|
|
|
|
void operator=(const FacBinary& other);
|
2017-07-06 10:57:33 +00:00
|
|
|
|
2017-07-06 11:17:21 +00:00
|
|
|
// to be used after export
|
|
|
|
const u8* getBytes() const;
|
|
|
|
size_t getSize() const;
|
2017-07-06 10:57:33 +00:00
|
|
|
|
2017-07-06 11:17:21 +00:00
|
|
|
// export/import binary
|
|
|
|
void exportBinary();
|
|
|
|
void importBinary(const u8* bytes, size_t len);
|
2017-07-06 10:57:33 +00:00
|
|
|
|
2017-07-06 11:17:21 +00:00
|
|
|
// variables
|
2017-07-15 08:28:01 +00:00
|
|
|
void clear();
|
2017-07-06 10:57:33 +00:00
|
|
|
|
2017-07-17 08:21:39 +00:00
|
|
|
const fnd::List<u32>& getContentOwnerIdList() const;
|
|
|
|
void setContentOwnerIdList(const fnd::List<u32>& list);
|
|
|
|
|
|
|
|
const fnd::List<u32>& getSaveDataOwnerIdList() const;
|
|
|
|
void setSaveDataOwnerIdList(const fnd::List<u32>& list);
|
2017-07-06 10:57:33 +00:00
|
|
|
|
2017-07-06 11:17:21 +00:00
|
|
|
private:
|
|
|
|
const std::string kModuleName = "FAC_BINARY";
|
2017-07-17 08:21:39 +00:00
|
|
|
static const u32 kFacFormatVersion = 1;
|
2017-07-06 10:57:33 +00:00
|
|
|
|
2017-07-06 11:17:21 +00:00
|
|
|
// raw binary
|
|
|
|
fnd::MemoryBlob mBinaryBlob;
|
2017-07-06 10:57:33 +00:00
|
|
|
|
2017-07-06 11:17:21 +00:00
|
|
|
// variables
|
2017-07-17 08:21:39 +00:00
|
|
|
fnd::List<u32> mContentOwnerIdList;
|
|
|
|
fnd::List<u32> mSaveDataOwnerIdList;
|
2017-07-06 10:57:33 +00:00
|
|
|
|
2017-07-06 11:17:21 +00:00
|
|
|
bool isEqual(const FacBinary& other) const;
|
|
|
|
void copyFrom(const FacBinary& other);
|
|
|
|
};
|
|
|
|
}
|
2017-07-06 10:57:33 +00:00
|
|
|
|