2013-04-17 21:09:55 -06:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-02-10 11:54:46 -07:00
|
|
|
#pragma once
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2014-08-31 07:34:58 -06:00
|
|
|
#include <memory>
|
2014-02-20 17:47:53 -07:00
|
|
|
#include <string>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "Common/CommonTypes.h"
|
2014-02-17 03:18:15 -07:00
|
|
|
#include "DiscIO/Volume.h"
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
// --- this volume type is used for GC disc images ---
|
|
|
|
|
|
|
|
namespace DiscIO
|
|
|
|
{
|
2014-02-20 17:47:53 -07:00
|
|
|
|
|
|
|
class IBlobReader;
|
|
|
|
|
2014-02-16 21:51:41 -07:00
|
|
|
class CVolumeGC : public IVolume
|
2008-12-07 21:46:09 -07:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
CVolumeGC(IBlobReader* _pReader);
|
|
|
|
~CVolumeGC();
|
2014-03-07 17:54:44 -07:00
|
|
|
bool Read(u64 _Offset, u64 _Length, u8* _pBuffer) const override;
|
|
|
|
bool RAWRead(u64 _Offset, u64 _Length, u8* _pBuffer) const override;
|
|
|
|
std::string GetUniqueID() const override;
|
|
|
|
std::string GetRevisionSpecificUniqueID() const override;
|
|
|
|
std::string GetMakerID() const override;
|
|
|
|
int GetRevision() const override;
|
|
|
|
std::vector<std::string> GetNames() const override;
|
|
|
|
u32 GetFSTSize() const override;
|
|
|
|
std::string GetApploaderDate() const override;
|
|
|
|
ECountry GetCountry() const override;
|
|
|
|
u64 GetSize() const override;
|
|
|
|
u64 GetRawSize() const override;
|
|
|
|
bool IsDiscTwo() const override;
|
2013-10-28 23:23:17 -06:00
|
|
|
|
2013-03-03 15:51:26 -07:00
|
|
|
typedef std::string(*StringDecoder)(const std::string&);
|
2013-10-28 23:23:17 -06:00
|
|
|
|
2013-03-03 15:51:26 -07:00
|
|
|
static StringDecoder GetStringDecoder(ECountry country);
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
private:
|
2014-08-31 07:34:58 -06:00
|
|
|
std::unique_ptr<IBlobReader> m_pReader;
|
2008-12-07 21:46:09 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace
|