123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- #ifndef LEGACYAPP_H
- #define LEGACYAPP_H
- #include <QObject>
- #include <QSettings>
- #include <QApplication>
- #include <QVector>
- #include <QVariant>
- #include <LotroDat/datfile.h>
- #include <LotroDat/database.h>
- class LotroDatManager : public QObject
- {
- Q_OBJECT
- public:
- struct Status {
- };
- enum Category : int {
- E_TEXTS_COMMON = 100,
- E_TEXTS_ITEMS = 101,
- E_TEXTS_EMOTES = 102,
- E_TEXTS_VIDEOS_REFS = 103,
- E_MAPS_COMMON = 200,
- E_TEXTURES_COMMON = 201,
- E_AUDIOS_COMMON = 300,
- E_FONTS_COMMON = 400
- };
- enum RESOURCE_FILE_TYPE : int {
- E_CLIENT_LOCAL = 0,
- E_CLIENT_GENERAL = 1
- };
- public:
- ~LotroDatManager();
- void init();
- bool initialised();
- // TODO: bool NotPatched();
- bool datPathIsRelevant();
- private:
- explicit LotroDatManager(QObject *parent = nullptr);
- public slots:
- void initializeManager();
- void deinitializeManager();
- void startGame(bool freeze_updates);
- void installPatch(QString patch_name, QString database_path, RESOURCE_FILE_TYPE dat_file);
- void createBackup();
- void restoreFromBackup();
- void removeBackup();
- signals:
- void operationStarted(QString operation_name, QVector<QVariant> args = {});
- void errorOccured(QString operation_name, QVector<QVariant> args = {}, QString message = "No error message provided");
- void operationFinished(QString operation_name, QVector<QVariant> args = {}, bool successful = true);
- void statusChanged(Status status);
- private:
- LOTRO_DAT::DatFile client_local_file_;
- LOTRO_DAT::DatFile client_general_file_;
- };
- #endif // LEGACYAPP_H
|