mirror of
https://github.com/PrismLauncher/PrismLauncher.git
synced 2025-06-13 05:37:42 +02:00
NOISSUE Add a skeleton of the wonko system
This commit is contained in:

committed by
Petr Mrázek

parent
5ae3b2c114
commit
00e5968bd2
28
application/WonkoGui.h
Normal file
28
application/WonkoGui.h
Normal file
@ -0,0 +1,28 @@
|
||||
#pragma once
|
||||
|
||||
#include <memory>
|
||||
|
||||
class QWidget;
|
||||
class QString;
|
||||
|
||||
using WonkoIndexPtr = std::shared_ptr<class WonkoIndex>;
|
||||
using WonkoVersionListPtr = std::shared_ptr<class WonkoVersionList>;
|
||||
using WonkoVersionPtr = std::shared_ptr<class WonkoVersion>;
|
||||
|
||||
namespace Wonko
|
||||
{
|
||||
enum UpdateType
|
||||
{
|
||||
AlwaysUpdate,
|
||||
UpdateIfNeeded
|
||||
};
|
||||
|
||||
/// Ensures that the index has been loaded, either from the local cache or remotely
|
||||
WonkoIndexPtr ensureIndexLoaded(QWidget *parent);
|
||||
/// Ensures that the given uid exists. Returns a nullptr if it doesn't.
|
||||
WonkoVersionListPtr ensureVersionListExists(const QString &uid, QWidget *parent);
|
||||
/// Ensures that the given uid exists and is loaded, either from the local cache or remotely. Returns nullptr if it doesn't exist or couldn't be loaded.
|
||||
WonkoVersionListPtr ensureVersionListLoaded(const QString &uid, QWidget *parent);
|
||||
WonkoVersionPtr ensureVersionExists(const QString &uid, const QString &version, QWidget *parent);
|
||||
WonkoVersionPtr ensureVersionLoaded(const QString &uid, const QString &version, QWidget *parent, const UpdateType update = UpdateIfNeeded);
|
||||
}
|
Reference in New Issue
Block a user