2021-06-13 07:18:14 +01:00
|
|
|
/*
|
|
|
|
* gamecard_tab.hpp
|
|
|
|
*
|
2022-03-17 12:58:40 +00:00
|
|
|
* Copyright (c) 2020-2022, 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
|
|
|
|
2021-06-20 18:20:09 +01:00
|
|
|
FocusableTable *properties_table = nullptr;
|
2021-06-14 01:47:49 +01:00
|
|
|
brls::TableRow *capacity = nullptr;
|
|
|
|
brls::TableRow *total_size = nullptr;
|
|
|
|
brls::TableRow *trimmed_size = nullptr;
|
|
|
|
brls::TableRow *update_version = nullptr;
|
|
|
|
brls::TableRow *lafw_version = nullptr;
|
|
|
|
brls::TableRow *sdk_version = nullptr;
|
|
|
|
brls::TableRow *compatibility_type = nullptr;
|
2022-07-05 02:04:28 +01:00
|
|
|
|
2021-06-13 20:32:37 +01:00
|
|
|
brls::ListItem *dump_card_image = nullptr;
|
|
|
|
brls::ListItem *dump_certificate = nullptr;
|
|
|
|
brls::ListItem *dump_header = nullptr;
|
|
|
|
brls::ListItem *dump_decrypted_cardinfo = nullptr;
|
|
|
|
brls::ListItem *dump_initial_data = nullptr;
|
|
|
|
brls::ListItem *dump_hfs_partitions = nullptr;
|
2022-07-05 02:04:28 +01:00
|
|
|
|
2021-06-17 08:55:42 +01:00
|
|
|
std::string GetFormattedSizeString(GameCardSizeFunc func);
|
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);
|
2021-06-20 21:37:31 +01:00
|
|
|
~GameCardTab(void);
|
2021-06-13 07:18:14 +01:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* __GAMECARD_TAB_HPP__ */
|