2021-06-13 07:18:14 +01:00
|
|
|
/*
|
|
|
|
* gamecard_tab.hpp
|
|
|
|
*
|
2024-04-12 10:47:36 +01:00
|
|
|
* Copyright (c) 2020-2024, DarkMatterCore <pabloacurielz@gmail.com>.
|
2021-06-13 07:18:14 +01:00
|
|
|
*
|
|
|
|
* This file is part of nxdumptool (https://github.com/DarkMatterCore/nxdumptool).
|
|
|
|
*
|
|
|
|
* nxdumptool 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, either version 3 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* nxdumptool 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 for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#ifndef __GAMECARD_TAB_HPP__
|
|
|
|
#define __GAMECARD_TAB_HPP__
|
|
|
|
|
2021-08-11 08:17:57 +01:00
|
|
|
#include "root_view.hpp"
|
2021-06-20 18:27:10 +01:00
|
|
|
#include "layered_error_frame.hpp"
|
2021-06-20 18:20:09 +01:00
|
|
|
#include "focusable_item.hpp"
|
2021-06-13 07:18:14 +01:00
|
|
|
|
|
|
|
namespace nxdt::views
|
|
|
|
{
|
2021-06-20 21:37:31 +01:00
|
|
|
class GameCardTab: public LayeredErrorFrame
|
2021-06-13 07:18:14 +01:00
|
|
|
{
|
2021-06-21 03:43:40 +01:00
|
|
|
typedef bool (*GameCardSizeFunc)(u64 *out_size);
|
2022-07-05 02:04:28 +01:00
|
|
|
|
2021-06-13 07:18:14 +01:00
|
|
|
private:
|
2021-08-11 08:17:57 +01:00
|
|
|
RootView *root_view = nullptr;
|
2022-07-05 02:04:28 +01:00
|
|
|
|
2021-06-20 21:37:31 +01:00
|
|
|
nxdt::tasks::GameCardStatusEvent::Subscription gc_status_task_sub;
|
2021-06-13 07:18:14 +01:00
|
|
|
GameCardStatus gc_status = GameCardStatus_NotInserted;
|
2022-07-05 02:04:28 +01:00
|
|
|
|
2024-04-15 12:47:50 +01:00
|
|
|
std::string raw_filename_full = "";
|
|
|
|
std::string raw_filename_id_only = "";
|
|
|
|
|
2022-07-27 23:53:52 +01:00
|
|
|
void ProcessGameCardStatus(GameCardStatus gc_status);
|
2021-06-17 08:55:42 +01:00
|
|
|
std::string GetFormattedSizeString(GameCardSizeFunc func);
|
2023-11-03 01:22:47 +00:00
|
|
|
std::string GetCardIdSetString(FsGameCardIdSet *card_id_set);
|
2022-07-27 23:53:52 +01:00
|
|
|
void PopulateList(void);
|
2022-07-05 02:04:28 +01:00
|
|
|
|
2021-06-13 07:18:14 +01:00
|
|
|
public:
|
2021-08-11 08:17:57 +01:00
|
|
|
GameCardTab(RootView *root_view);
|
2024-04-19 11:08:44 +01:00
|
|
|
~GameCardTab();
|
2021-06-13 07:18:14 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* __GAMECARD_TAB_HPP__ */
|