IOS/ES: Move shared content map, uid.sys code

These are all specific to ES and belong there.

The SharedContentMap and UIDSys classes were also modernised.
This commit is contained in:
Léo Lam
2017-03-13 12:33:50 +01:00
parent 0b6170cc33
commit 7b17163a7a
7 changed files with 176 additions and 186 deletions

View File

@ -123,50 +123,4 @@ private:
std::unordered_map<std::string, std::unique_ptr<CNANDContentLoader>> m_map;
};
class CSharedContent final
{
public:
explicit CSharedContent(Common::FromWhichRoot root);
std::string GetFilenameFromSHA1(const u8* hash) const;
std::string AddSharedContent(const u8* hash);
private:
#pragma pack(push, 1)
struct SElement
{
u8 FileName[8];
u8 SHA1Hash[20];
};
#pragma pack(pop)
Common::FromWhichRoot m_root;
u32 m_LastID;
std::string m_ContentMap;
std::vector<SElement> m_Elements;
};
class cUIDsys final
{
public:
explicit cUIDsys(Common::FromWhichRoot root);
u32 GetUIDFromTitle(u64 title_id);
void AddTitle(u64 title_id);
void GetTitleIDs(std::vector<u64>& title_ids, bool owned = false);
private:
#pragma pack(push, 1)
struct SElement
{
u8 titleID[8];
u8 UID[4];
};
#pragma pack(pop)
u32 m_LastUID;
std::string m_UidSys;
std::vector<SElement> m_Elements;
};
}