2009-07-28 15:32:10 -06:00
|
|
|
// Copyright (C) 2003 Dolphin Project.
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
// it under the terms of the GNU General Public License as published by
|
|
|
|
// the Free Software Foundation, version 2.0.
|
|
|
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
// GNU General Public License 2.0 for more details.
|
|
|
|
|
|
|
|
// A copy of the GPL 2.0 should have been included with the program.
|
|
|
|
// If not, see http://www.gnu.org/licenses/
|
|
|
|
|
2013-04-15 14:28:55 -06:00
|
|
|
// Official Git repository and contact information can be found at
|
2008-12-07 21:46:09 -07:00
|
|
|
// http://code.google.com/p/dolphin-emu/
|
|
|
|
|
|
|
|
#ifndef __ISOFILE_H_
|
|
|
|
#define __ISOFILE_H_
|
|
|
|
|
2013-03-02 18:46:55 -07:00
|
|
|
#include <vector>
|
|
|
|
#include <string>
|
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
#include "Volume.h"
|
2010-01-14 00:19:10 -07:00
|
|
|
#include "VolumeCreator.h"
|
2008-12-07 21:46:09 -07:00
|
|
|
|
2010-08-02 21:20:44 -06:00
|
|
|
#if defined(HAVE_WX) && HAVE_WX
|
|
|
|
#include <wx/image.h>
|
|
|
|
#endif
|
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
class PointerWrap;
|
2011-03-22 01:27:23 -06:00
|
|
|
class GameListItem : NonCopyable
|
2008-12-07 21:46:09 -07:00
|
|
|
{
|
|
|
|
public:
|
2009-02-03 08:03:34 -07:00
|
|
|
GameListItem(const std::string& _rFileName);
|
2008-12-07 21:46:09 -07:00
|
|
|
~GameListItem();
|
|
|
|
|
|
|
|
bool IsValid() const {return m_Valid;}
|
|
|
|
const std::string& GetFileName() const {return m_FileName;}
|
2013-03-03 17:29:56 -07:00
|
|
|
std::string GetBannerName(int index) const;
|
|
|
|
std::string GetVolumeName(int index) const;
|
2013-03-02 18:46:55 -07:00
|
|
|
std::string GetName(int index) const;
|
|
|
|
std::string GetCompany() const;
|
|
|
|
std::string GetDescription(int index = 0) const;
|
2013-04-16 21:29:01 -06:00
|
|
|
int GetRevision() const { return m_Revision; }
|
2008-12-07 21:46:09 -07:00
|
|
|
const std::string& GetUniqueID() const {return m_UniqueID;}
|
2009-05-02 12:06:42 -06:00
|
|
|
const std::string GetWiiFSPath() const;
|
2008-12-07 21:46:09 -07:00
|
|
|
DiscIO::IVolume::ECountry GetCountry() const {return m_Country;}
|
2009-06-06 01:36:22 -06:00
|
|
|
int GetPlatform() const {return m_Platform;}
|
2011-03-22 22:31:00 -06:00
|
|
|
const std::string& GetIssues() const { return m_issues; }
|
|
|
|
int GetEmuState() const { return m_emu_state; }
|
2008-12-07 21:46:09 -07:00
|
|
|
bool IsCompressed() const {return m_BlobCompressed;}
|
|
|
|
u64 GetFileSize() const {return m_FileSize;}
|
|
|
|
u64 GetVolumeSize() const {return m_VolumeSize;}
|
2013-01-25 19:28:04 -07:00
|
|
|
bool IsDiscTwo() const {return m_IsDiscTwo;}
|
2008-12-07 21:46:09 -07:00
|
|
|
#if defined(HAVE_WX) && HAVE_WX
|
|
|
|
const wxImage& GetImage() const {return m_Image;}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
void DoState(PointerWrap &p);
|
2009-06-06 01:36:22 -06:00
|
|
|
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
GAMECUBE_DISC = 0,
|
|
|
|
WII_DISC,
|
|
|
|
WII_WAD,
|
|
|
|
NUMBER_OF_PLATFORMS
|
|
|
|
};
|
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
private:
|
|
|
|
std::string m_FileName;
|
2013-03-02 18:46:55 -07:00
|
|
|
|
|
|
|
// TODO: eliminate this and overwrite with names from banner when available?
|
|
|
|
std::vector<std::string> m_volume_names;
|
|
|
|
|
|
|
|
// Stuff from banner
|
|
|
|
std::string m_company;
|
|
|
|
std::vector<std::string> m_names;
|
|
|
|
std::vector<std::string> m_descriptions;
|
|
|
|
|
2008-12-07 21:46:09 -07:00
|
|
|
std::string m_UniqueID;
|
2011-03-22 22:31:00 -06:00
|
|
|
|
|
|
|
std::string m_issues;
|
|
|
|
int m_emu_state;
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
u64 m_FileSize;
|
|
|
|
u64 m_VolumeSize;
|
|
|
|
|
|
|
|
DiscIO::IVolume::ECountry m_Country;
|
2009-06-06 01:36:22 -06:00
|
|
|
int m_Platform;
|
2013-04-16 21:29:01 -06:00
|
|
|
int m_Revision;
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
#if defined(HAVE_WX) && HAVE_WX
|
|
|
|
wxImage m_Image;
|
|
|
|
#endif
|
|
|
|
bool m_Valid;
|
|
|
|
bool m_BlobCompressed;
|
2011-03-22 01:27:23 -06:00
|
|
|
std::vector<u8> m_pImage;
|
2008-12-07 21:46:09 -07:00
|
|
|
u32 m_ImageSize;
|
2013-01-25 19:28:04 -07:00
|
|
|
bool m_IsDiscTwo;
|
2008-12-07 21:46:09 -07:00
|
|
|
|
|
|
|
bool LoadFromCache();
|
|
|
|
void SaveToCache();
|
|
|
|
|
|
|
|
std::string CreateCacheFilename();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif
|