mirror of
https://invent.kde.org/marcoa/a-la-karte.git
synced 2026-03-27 01:03:09 +00:00
33 lines
794 B
C
33 lines
794 B
C
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
|
// SPDX-FileCopyrightText: 2024 A-La-Karte Contributors
|
||
|
|
|
||
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <QList>
|
||
|
|
#include <QObject>
|
||
|
|
|
||
|
|
#include "game.h"
|
||
|
|
|
||
|
|
class PlatformImporter : public QObject
|
||
|
|
{
|
||
|
|
Q_OBJECT
|
||
|
|
|
||
|
|
public:
|
||
|
|
explicit PlatformImporter(QObject *parent = nullptr);
|
||
|
|
virtual ~PlatformImporter() = default;
|
||
|
|
|
||
|
|
virtual QString platformName() const = 0;
|
||
|
|
virtual QString platformId() const = 0;
|
||
|
|
virtual bool isAvailable() const = 0;
|
||
|
|
virtual QList<Game *> importGames() = 0;
|
||
|
|
|
||
|
|
Q_SIGNALS:
|
||
|
|
void importProgress(int current, int total);
|
||
|
|
void importError(const QString &error);
|
||
|
|
|
||
|
|
protected:
|
||
|
|
QString findExecutable(const QString &name) const;
|
||
|
|
bool directoryExists(const QString &path) const;
|
||
|
|
QString expandPath(const QString &path) const;
|
||
|
|
};
|