1 | /* |
2 | SPDX-FileCopyrightText: 2007 Josef Spillner <spillner@kde.org> |
3 | SPDX-FileCopyrightText: 2007-2010 Frederik Gladhorn <gladhorn@kde.org> |
4 | SPDX-FileCopyrightText: 2009 Jeremy Whiting <jpwhiting@kde.org> |
5 | |
6 | SPDX-License-Identifier: LGPL-2.1-or-later |
7 | */ |
8 | |
9 | #ifndef KNEWSTUFF3_ENGINEBASE_P_H |
10 | #define KNEWSTUFF3_ENGINEBASE_P_H |
11 | |
12 | #include "cache.h" |
13 | #include "cache2_p.h" |
14 | #include "categorymetadata.h" |
15 | #include "enginebase.h" |
16 | #include "installation_p.h" |
17 | #include "searchpreset.h" |
18 | #include <Attica/ProviderManager> |
19 | |
20 | namespace KNSCore |
21 | { |
22 | class ProviderCore; |
23 | |
24 | class EngineBasePrivate |
25 | { |
26 | public: |
27 | EngineBase *q; |
28 | QString name; |
29 | QStringList categories; |
30 | QString adoptionCommand; |
31 | QString useLabel; |
32 | bool uploadEnabled = false; |
33 | QUrl providerFileUrl; |
34 | QStringList tagFilter; |
35 | QStringList downloadTagFilter; |
36 | Installation *installation = new Installation(); |
37 | Attica::ProviderManager *atticaProviderManager = nullptr; |
38 | QList<SearchPreset> searchPresets; |
39 | QSharedPointer<Cache2> cache; |
40 | bool shouldRemoveDeletedEntries = false; |
41 | QList<CategoryMetadata> categoriesMetadata; |
42 | KNEWSTUFFCORE_DEPRECATED_VERSION(6, 9, "Only here for backwards compatible API" ) QHash<QString, QSharedPointer<KNSCore::Provider>> legacyProviders; |
43 | QHash<QString, QSharedPointer<KNSCore::ProviderCore>> providerCores; |
44 | KNSCore::EngineBase::ContentWarningType contentWarningType = KNSCore::EngineBase::ContentWarningType::Static; |
45 | |
46 | EngineBasePrivate(EngineBase *qptr); |
47 | void addProvider(const QSharedPointer<KNSCore::ProviderCore> &provider); |
48 | |
49 | private: |
50 | // Don't use this. Use cache instead. |
51 | friend class EngineBase; // we may use it though for backwards compat, albeit carefully ;) |
52 | QSharedPointer<Cache> legacyCache; |
53 | }; |
54 | |
55 | } // namespace KNSCore |
56 | |
57 | #endif |
58 | |