2017-05-15 12:25:45 +02:00
|
|
|
// Copyright 2017 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2+
|
|
|
|
// Refer to the license.txt file included.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <unordered_map>
|
|
|
|
|
2017-10-08 18:23:11 +02:00
|
|
|
#include "Common/CommonTypes.h"
|
|
|
|
|
2017-05-15 12:25:45 +02:00
|
|
|
namespace Core
|
|
|
|
{
|
|
|
|
// Reader for title database files.
|
|
|
|
class TitleDatabase final
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TitleDatabase();
|
|
|
|
~TitleDatabase();
|
|
|
|
|
|
|
|
enum class TitleType
|
|
|
|
{
|
|
|
|
Channel,
|
|
|
|
Other,
|
|
|
|
};
|
|
|
|
|
|
|
|
// Get a user friendly title name for a game ID.
|
|
|
|
// This falls back to returning an empty string if none could be found.
|
|
|
|
std::string GetTitleName(const std::string& game_id, TitleType = TitleType::Other) const;
|
2017-11-02 17:34:04 +01:00
|
|
|
|
|
|
|
// Same as above, but takes a title ID instead of a game ID, and can only find names of channels.
|
|
|
|
std::string GetChannelName(u64 title_id) const;
|
2017-05-15 12:25:45 +02:00
|
|
|
|
|
|
|
// Get a description for a game ID (title name if available + game ID).
|
|
|
|
std::string Describe(const std::string& game_id, TitleType = TitleType::Other) const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::unordered_map<std::string, std::string> m_wii_title_map;
|
|
|
|
std::unordered_map<std::string, std::string> m_gc_title_map;
|
|
|
|
};
|
|
|
|
} // namespace Core
|