diff options
Diffstat (limited to 'libs/installer_bsplugins/src/MOTools')
| -rw-r--r-- | libs/installer_bsplugins/src/MOTools/ILootCache.h | 29 | ||||
| -rw-r--r-- | libs/installer_bsplugins/src/MOTools/Loot.h | 63 |
2 files changed, 92 insertions, 0 deletions
diff --git a/libs/installer_bsplugins/src/MOTools/ILootCache.h b/libs/installer_bsplugins/src/MOTools/ILootCache.h new file mode 100644 index 0000000..9476979 --- /dev/null +++ b/libs/installer_bsplugins/src/MOTools/ILootCache.h @@ -0,0 +1,29 @@ +#ifndef MOTOOLS_ILOOTCACHE_H +#define MOTOOLS_ILOOTCACHE_H + +#include "Loot.h" + +#include <QString> + +namespace MOTools +{ + +class ILootCache +{ +public: + /** + * @brief clear all additional information we stored on plugins + */ + virtual void clearAdditionalInformation() = 0; + + /** + * @brief adds information from a loot report + * @param name name of the plugin to add information about + * @param plugin loot report for the plugin + */ + virtual void addLootReport(const QString& name, Loot::Plugin plugin) = 0; +}; + +} // namespace MOTools + +#endif // MOTOOLS_ILOOTCACHE_H diff --git a/libs/installer_bsplugins/src/MOTools/Loot.h b/libs/installer_bsplugins/src/MOTools/Loot.h new file mode 100644 index 0000000..414cdab --- /dev/null +++ b/libs/installer_bsplugins/src/MOTools/Loot.h @@ -0,0 +1,63 @@ +#ifndef MOTOOLS_LOOT_H +#define MOTOOLS_LOOT_H + +// LOOT integration stubbed out for Fluorine port. +// LootDialog/Loot impl/LootGroups removed (depended on Qt WebEngine + lootcli). +// Only the data types needed by ILootCache / PluginList::m_LootInfo remain. + +#include <QString> +#include <vector> + +namespace MOTools +{ + +class ILootCache; + +class Loot +{ +public: + struct Message + { + int type = 0; + QString text; + }; + + struct File + { + QString name; + QString displayName; + }; + + struct Dirty + { + qint64 crc = 0; + qint64 itm = 0; + qint64 deletedReferences = 0; + qint64 deletedNavmesh = 0; + QString cleaningUtility; + QString info; + + QString toString(bool isClean) const + { + Q_UNUSED(isClean); + return {}; + } + QString cleaningString() const { return {}; } + }; + + struct Plugin + { + QString name; + std::vector<File> incompatibilities; + std::vector<Message> messages; + std::vector<Dirty> dirty, clean; + std::vector<QString> missingMasters; + bool loadsArchive = false; + bool isMaster = false; + bool isLightMaster = false; + }; +}; + +} // namespace MOTools + +#endif // MOTOOLS_LOOT_H |
