2015-05-23 22:55:12 -06:00
|
|
|
// Copyright 2009 Dolphin Emulator Project
|
2015-05-17 17:08:10 -06:00
|
|
|
// Licensed under GPLv2+
|
2013-04-17 21:09:55 -06:00
|
|
|
// Refer to the license.txt file included.
|
2009-07-05 20:10:26 -06:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2009-07-05 20:10:26 -06:00
|
|
|
|
|
|
|
#include <string>
|
2015-12-19 11:46:01 -07:00
|
|
|
#include <vector>
|
2009-07-05 20:10:26 -06:00
|
|
|
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "Common/CommonTypes.h"
|
2009-07-05 20:10:26 -06:00
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
2014-02-20 17:47:53 -07:00
|
|
|
class IBlobReader;
|
2015-10-03 13:25:43 -06:00
|
|
|
class CBlobBigEndianReader;
|
2014-02-20 17:47:53 -07:00
|
|
|
|
2009-07-05 20:10:26 -06:00
|
|
|
class WiiWAD
|
|
|
|
{
|
|
|
|
public:
|
2016-09-25 15:33:43 -06:00
|
|
|
explicit WiiWAD(const std::string& name);
|
2016-06-24 02:43:46 -06:00
|
|
|
~WiiWAD();
|
|
|
|
|
|
|
|
bool IsValid() const { return m_valid; }
|
|
|
|
const std::vector<u8>& GetCertificateChain() const { return m_certificate_chain; }
|
|
|
|
const std::vector<u8>& GetTicket() const { return m_ticket; }
|
|
|
|
const std::vector<u8>& GetTMD() const { return m_tmd; }
|
|
|
|
const std::vector<u8>& GetDataApp() const { return m_data_app; }
|
|
|
|
const std::vector<u8>& GetFooter() const { return m_footer; }
|
2009-07-05 20:10:26 -06:00
|
|
|
private:
|
2016-06-24 02:43:46 -06:00
|
|
|
bool ParseWAD(IBlobReader& reader);
|
2009-07-05 20:10:26 -06:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
bool m_valid;
|
2009-07-05 20:10:26 -06:00
|
|
|
|
2016-06-24 02:43:46 -06:00
|
|
|
std::vector<u8> m_certificate_chain;
|
|
|
|
std::vector<u8> m_ticket;
|
|
|
|
std::vector<u8> m_tmd;
|
|
|
|
std::vector<u8> m_data_app;
|
|
|
|
std::vector<u8> m_footer;
|
2009-07-05 20:10:26 -06:00
|
|
|
};
|
|
|
|
}
|