Files
eden/src/qt_common/util/content.h
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

63 lines
1.7 KiB
C++
Raw Normal View History

// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
2025-09-15 17:21:18 +02:00
// SPDX-License-Identifier: GPL-3.0-or-later
#ifndef QT_CONTENT_UTIL_H
#define QT_CONTENT_UTIL_H
#include <QObject>
#include "common/common_types.h"
#include "frontend_common/data_manager.h"
2025-10-18 22:19:06 +02:00
#include "frontend_common/firmware_manager.h"
#include "qt_common/qt_string_lookup.h"
2025-09-15 17:21:18 +02:00
namespace QtCommon::Content {
//
bool CheckGameFirmware(u64 program_id);
2025-09-15 17:21:18 +02:00
enum class FirmwareInstallResult {
Success,
NoNCAs,
FailedDelete,
FailedCopy,
FailedCorrupted,
};
2025-10-18 22:19:06 +02:00
inline const QString GetFirmwareInstallResultString(FirmwareInstallResult result)
{
return LOOKUP_ENUM(result, FwInstallSuccess);
2025-10-18 22:19:06 +02:00
}
/**
* \brief Get a string representation of a result from InstallKeys.
* \param result The result code.
* \return A string representation of the passed result code.
*/
inline const QString GetKeyInstallResultString(FirmwareManager::KeyInstallResult result)
2025-09-15 17:21:18 +02:00
{
return LOOKUP_ENUM(result, KeyInstallSuccess);
2025-09-15 17:21:18 +02:00
}
void InstallFirmware(const QString &location, bool recursive);
QString UnzipFirmwareToTmp(const QString &location);
// Keys //
void InstallKeys();
// Content //
void VerifyGameContents(const std::string &game_path);
void VerifyInstalledContents();
void ClearDataDir(FrontendCommon::DataManager::DataDir dir, const std::string &user_id = "");
void ExportDataDir(FrontendCommon::DataManager::DataDir dir,
const std::string &user_id = "",
const QString &name = QStringLiteral("export"),
std::function<void()> callback = {});
void ImportDataDir(FrontendCommon::DataManager::DataDir dir, const std::string &user_id = "", std::function<void()> callback = {});
// Profiles //
void FixProfiles();
2025-09-15 17:21:18 +02:00
}
#endif // QT_CONTENT_UTIL_H