| 1 | /* |
| 2 | SPDX-FileCopyrightText: 2009-2010 Frederik Gladhorn <[email protected]> |
| 3 | |
| 4 | SPDX-License-Identifier: LGPL-2.1-or-later |
| 5 | */ |
| 6 | |
| 7 | #ifndef KNEWSTUFF3_ATTICAPROVIDER_P_H |
| 8 | #define KNEWSTUFF3_ATTICAPROVIDER_P_Hcxx . . $ `src/attica/atticaprovider_p.h:8:9`! |
| 9 | |
| 10 | #include <QPointer> |
| 11 | #include <QSet> |
| 12 | |
| 13 | #include <attica/content.h> |
| 14 | #include <attica/provider.h> |
| 15 | #include <attica/providermanager.h> |
| 16 | |
| 17 | #include "providerbase_p.h"cxx . . $ `<file>/src/core/providerbase_p.h`/ |
| 18 | |
| 19 | namespace Atticacxx . . $ Attica/ |
| 20 | { |
| 21 | class BaseJobcxx . . $ Attica/BaseJob#; |
| 22 | } |
| 23 | |
| 24 | namespace KNSCorecxx . . $ KNSCore/ |
| 25 | { |
| 26 | /** |
| 27 | * @short KNewStuff Attica Provider class. |
| 28 | * |
| 29 | * This class provides accessors for the provider object. |
| 30 | * It should not be used directly by the application. |
| 31 | * This class is the base class and will be instantiated for |
| 32 | * websites that implement the Open Collaboration Services. |
| 33 | * |
| 34 | * @author Frederik Gladhorn <[email protected]> |
| 35 | * |
| 36 | * @internal |
| 37 | */ |
| 38 | class /* for autotest: */ KNEWSTUFFCORE_EXPORTcxx . . $ `build/src/core/knewstuffcore_export.h:12:15`! AtticaProvidercxx . . $ KNSCore/AtticaProvider# : public ProviderBasecxx . . $ KNSCore/ProviderBase# |
| 39 | { |
| 40 | Q_OBJECTcxx . . $ KNSCore/AtticaProvider#QPrivateSignal#QPrivateSignal(49f6e7a06ebc5aa8). |
| 41 | public: |
| 42 | explicit AtticaProvidercxx . . $ KNSCore/AtticaProvider#AtticaProvider(73e6f3b333f9af95).(const QStringListcxx . . $ QStringList# &categories, const QStringcxx . . $ QString# &additionalAgentInformation); |
| 43 | AtticaProvidercxx . . $ KNSCore/AtticaProvider#AtticaProvider(44c50aad39182223).(const Atticacxx . . $ Attica/::Providercxx . . $ Attica/Provider# &provider, const QStringListcxx . . $ QStringList# &categories, const QStringcxx . . $ QString# &additionalAgentInformation); |
| 44 | |
| 45 | QStringcxx . . $ QString# idcxx . . $ KNSCore/AtticaProvider#id(6ef7b6c27b00b43d).() const override; |
| 46 | |
| 47 | /** |
| 48 | * set the provider data xml, to initialize the provider |
| 49 | */ |
| 50 | bool setProviderXMLcxx . . $ KNSCore/AtticaProvider#setProviderXML(5f8d2f7f90f83411).(const QDomElementcxx . . $ QDomElement# &xmldata) override; |
| 51 | |
| 52 | bool isInitializedcxx . . $ KNSCore/AtticaProvider#isInitialized(50ce9a9e25b4a850).() const override; |
| 53 | void setCachedEntriescxx . . $ KNSCore/AtticaProvider#setCachedEntries(b91278f8ddf594a3).(const KNSCorecxx . . $ KNSCore/::Entrycxx . . $ KNSCore/Entry#::Listcxx . . $ KNSCore/Entry#List# &cachedEntries) override; |
| 54 | |
| 55 | void loadEntriescxx . . $ KNSCore/AtticaProvider#loadEntries(d1f54914cfb42d91).(const KNSCorecxx . . $ KNSCore/::SearchRequestcxx . . $ KNSCore/SearchRequest# &request) override; |
| 56 | void loadEntryDetailscxx . . $ KNSCore/AtticaProvider#loadEntryDetails(5bcbee596c514035).(const KNSCorecxx . . $ KNSCore/::Entrycxx . . $ KNSCore/Entry# &entry) override; |
| 57 | void loadPayloadLinkcxx . . $ KNSCore/AtticaProvider#loadPayloadLink(f7485abf382d4f2b).(const Entrycxx . . $ KNSCore/Entry# &entry, int linkId) override; |
| 58 | |
| 59 | void loadCommentscxx . . $ KNSCore/AtticaProvider#loadComments(5ef55f55e31efdb0).(const KNSCorecxx . . $ KNSCore/::Entrycxx . . $ KNSCore/Entry# &entry, int commentsPerPage, int page) override; |
| 60 | void loadPersoncxx . . $ KNSCore/AtticaProvider#loadPerson(3520e46b33348bf6).(const QStringcxx . . $ QString# &username) override; |
| 61 | |
| 62 | bool userCanVotecxx . . $ KNSCore/AtticaProvider#userCanVote(c9857a73d68e59ba).() override |
| 63 | { |
| 64 | return true; |
| 65 | } |
| 66 | void votecxx . . $ KNSCore/AtticaProvider#vote(4114ecdc659b1f7e).(const Entrycxx . . $ KNSCore/Entry# &entry, uintcxx . . $ uint# rating) override; |
| 67 | |
| 68 | bool userCanBecomeFancxx . . $ KNSCore/AtticaProvider#userCanBecomeFan(c9857a73d68e59ba).() override |
| 69 | { |
| 70 | return true; |
| 71 | } |
| 72 | void becomeFancxx . . $ KNSCore/AtticaProvider#becomeFan(5bcbee596c514035).(const Entrycxx . . $ KNSCore/Entry# &entry) override; |
| 73 | |
| 74 | Atticacxx . . $ Attica/::Providercxx . . $ Attica/Provider# *providercxx . . $ KNSCore/AtticaProvider#provider(c68a2529f9f8c77a).() |
| 75 | { |
| 76 | return &m_providercxx . . $ KNSCore/AtticaProvider#m_provider.; |
| 77 | } |
| 78 | |
| 79 | [[nodiscard]] QStringcxx . . $ QString# namecxx . . $ KNSCore/AtticaProvider#name(6ef7b6c27b00b43d).() const override; |
| 80 | [[nodiscard]] QUrlcxx . . $ QUrl# iconcxx . . $ KNSCore/AtticaProvider#icon(36d9834fe7321282).() const override; |
| 81 | [[nodiscard]] QStringcxx . . $ QString# versioncxx . . $ KNSCore/AtticaProvider#version(4365c3963150523e).() override; |
| 82 | [[nodiscard]] QUrlcxx . . $ QUrl# websitecxx . . $ KNSCore/AtticaProvider#website(db502ccec337722f).() override; |
| 83 | [[nodiscard]] QUrlcxx . . $ QUrl# hostcxx . . $ KNSCore/AtticaProvider#host(db502ccec337722f).() override; |
| 84 | [[nodiscard]] QStringcxx . . $ QString# contactEmailcxx . . $ KNSCore/AtticaProvider#contactEmail(4365c3963150523e).() override; |
| 85 | [[nodiscard]] bool supportsSslcxx . . $ KNSCore/AtticaProvider#supportsSsl(c9857a73d68e59ba).() override; |
| 86 | |
| 87 | private Q_SLOTScxx . . $ `<external>/4830994369567095248/qtmetamacros.h:46:10`!: |
| 88 | void providerLoadedcxx . . $ KNSCore/AtticaProvider#providerLoaded(9727711da8c6a56).(const Atticacxx . . $ Attica/::Providercxx . . $ Attica/Provider# &provider); |
| 89 | void listOfCategoriesLoadedcxx . . $ KNSCore/AtticaProvider#listOfCategoriesLoaded(16bd7b3475066aea).(Atticacxx . . $ Attica/::BaseJobcxx . . $ Attica/BaseJob# *); |
| 90 | void downloadItemLoadedcxx . . $ KNSCore/AtticaProvider#downloadItemLoaded(16bd7b3475066aea).(Atticacxx . . $ Attica/::BaseJobcxx . . $ Attica/BaseJob# *job); |
| 91 | void accountBalanceLoadedcxx . . $ KNSCore/AtticaProvider#accountBalanceLoaded(16bd7b3475066aea).(Atticacxx . . $ Attica/::BaseJobcxx . . $ Attica/BaseJob# *job); |
| 92 | void onAuthenticationCredentialsMissingcxx . . $ KNSCore/AtticaProvider#onAuthenticationCredentialsMissing(9727711da8c6a56).(const Atticacxx . . $ Attica/::Providercxx . . $ Attica/Provider# &); |
| 93 | void votingFinishedcxx . . $ KNSCore/AtticaProvider#votingFinished(16bd7b3475066aea).(Atticacxx . . $ Attica/::BaseJobcxx . . $ Attica/BaseJob# *); |
| 94 | void becomeFanFinishedcxx . . $ KNSCore/AtticaProvider#becomeFanFinished(16bd7b3475066aea).(Atticacxx . . $ Attica/::BaseJobcxx . . $ Attica/BaseJob# *job); |
| 95 | void loadedCommentscxx . . $ KNSCore/AtticaProvider#loadedComments(16bd7b3475066aea).(Atticacxx . . $ Attica/::BaseJobcxx . . $ Attica/BaseJob# *job); |
| 96 | void loadedPersoncxx . . $ KNSCore/AtticaProvider#loadedPerson(16bd7b3475066aea).(Atticacxx . . $ Attica/::BaseJobcxx . . $ Attica/BaseJob# *job); |
| 97 | void loadedConfigcxx . . $ KNSCore/AtticaProvider#loadedConfig(16bd7b3475066aea).(Atticacxx . . $ Attica/::BaseJobcxx . . $ Attica/BaseJob# *job); |
| 98 | |
| 99 | private: |
| 100 | bool jobSuccesscxx . . $ KNSCore/AtticaProvider#jobSuccess(905a6a2c03dadc1c).(Atticacxx . . $ Attica/::BaseJobcxx . . $ Attica/BaseJob# *job); |
| 101 | void updateOnFirstBasicsGetcxx . . $ KNSCore/AtticaProvider#updateOnFirstBasicsGet(49f6e7a06ebc5aa8).(); |
| 102 | |
| 103 | // the attica categories we are interested in (e.g. Wallpaper, Application, Vocabulary File...) |
| 104 | QMultiHashcxx . . $ QMultiHash#<QStringcxx . . $ QString#, Atticacxx . . $ Attica/::Categorycxx . . $ Attica/Category#> mCategoryMapcxx . . $ KNSCore/AtticaProvider#mCategoryMap.; |
| 105 | |
| 106 | Atticacxx . . $ Attica/::ProviderManagercxx . . $ Attica/ProviderManager# m_providerManagercxx . . $ KNSCore/AtticaProvider#m_providerManager.; |
| 107 | Atticacxx . . $ Attica/::Providercxx . . $ Attica/Provider# m_providercxx . . $ KNSCore/AtticaProvider#m_provider.; |
| 108 | |
| 109 | KNSCorecxx . . $ KNSCore/::Entrycxx . . $ KNSCore/Entry#::Listcxx . . $ KNSCore/Entry#List# mCachedEntriescxx . . $ KNSCore/AtticaProvider#mCachedEntries.; |
| 110 | QHashcxx . . $ QHash#<QStringcxx . . $ QString#, Atticacxx . . $ Attica/::Contentcxx . . $ Attica/Content#> mCachedContentcxx . . $ KNSCore/AtticaProvider#mCachedContent.; |
| 111 | |
| 112 | // Associate job and entry, this is needed when fetching |
| 113 | // download links or the account balance in order to continue |
| 114 | // when the result is there. |
| 115 | QHashcxx . . $ QHash#<Atticacxx . . $ Attica/::BaseJobcxx . . $ Attica/BaseJob# *, QPaircxx . . $ QPair#<Entrycxx . . $ KNSCore/Entry#, int>> mDownloadLinkJobscxx . . $ KNSCore/AtticaProvider#mDownloadLinkJobs.; |
| 116 | |
| 117 | bool mInitializedcxx . . $ KNSCore/AtticaProvider#mInitialized.; |
| 118 | QStringcxx . . $ QString# m_providerIdcxx . . $ KNSCore/AtticaProvider#m_providerId.; |
| 119 | bool m_basicsGotcxx . . $ KNSCore/AtticaProvider#m_basicsGot. = false; |
| 120 | QStringcxx . . $ QString# m_namecxx . . $ KNSCore/AtticaProvider#m_name.; |
| 121 | QUrlcxx . . $ QUrl# m_iconcxx . . $ KNSCore/AtticaProvider#m_icon.; |
| 122 | QStringcxx . . $ QString# m_versioncxx . . $ KNSCore/AtticaProvider#m_version.; |
| 123 | QUrlcxx . . $ QUrl# m_websitecxx . . $ KNSCore/AtticaProvider#m_website.; |
| 124 | QUrlcxx . . $ QUrl# m_hostcxx . . $ KNSCore/AtticaProvider#m_host.; |
| 125 | QStringcxx . . $ QString# m_contactEmailcxx . . $ KNSCore/AtticaProvider#m_contactEmail.; |
| 126 | bool m_supportsSslcxx . . $ KNSCore/AtticaProvider#m_supportsSsl. = true; |
| 127 | |
| 128 | Q_DISABLE_COPYcxx . . $ `<external>/9561028201570787675/qtclasshelpermacros.h:23:9`!(AtticaProvider) |
| 129 | friend class AtticaRequestercxx . . $ KNSCore/AtticaRequester#; |
| 130 | }; |
| 131 | |
| 132 | } |
| 133 | |
| 134 | #endif |