Service.FS: Do archive registration using IdCode instead of name

This commit is contained in:
Yuri Kunde Schlesner 2014-12-15 02:44:04 -02:00
parent ca67bb7945
commit f6153679b0
7 changed files with 32 additions and 42 deletions

View file

@ -162,25 +162,12 @@ private:
class Archive : NonCopyable {
public:
/// Supported archive types
enum class IdCode : u32 {
RomFS = 0x00000003,
SaveData = 0x00000004,
ExtSaveData = 0x00000006,
SharedExtSaveData = 0x00000007,
SystemSaveData = 0x00000008,
SDMC = 0x00000009,
SDMCWriteOnly = 0x0000000A,
};
Archive() { }
virtual ~Archive() { }
/**
* Get the IdCode of the archive (e.g. RomFS, SaveData, etc.)
* @return IdCode of the archive
* Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.)
*/
virtual IdCode GetIdCode() const = 0;
virtual std::string GetName() const = 0;
/**
* Open a file specified by its path, using the specified mode

View file

@ -22,11 +22,7 @@ public:
Archive_RomFS(const Loader::AppLoader& app_loader);
~Archive_RomFS() override;
/**
* Get the IdCode of the archive (e.g. RomFS, SaveData, etc.)
* @return IdCode of the archive
*/
IdCode GetIdCode() const override { return IdCode::RomFS; }
std::string GetName() const override { return "RomFS"; }
/**
* Open a file specified by its path, using the specified mode

View file

@ -26,11 +26,7 @@ public:
*/
bool Initialize();
/**
* Get the IdCode of the archive (e.g. RomFS, SaveData, etc.)
* @return IdCode of the archive
*/
IdCode GetIdCode() const override { return IdCode::SDMC; }
std::string GetName() const override { return "SDMC"; }
/**
* Open a file specified by its path, using the specified mode