File indexing completed on 2025-01-05 03:53:37
0001 /* ============================================================ 0002 * 0003 * This file is a part of digiKam project 0004 * https://www.digikam.org 0005 * 0006 * Date : 2011-03-22 0007 * Description : a Iface C++ interface 0008 * 0009 * SPDX-FileCopyrightText: 2011-2024 by Gilles Caulier <caulier dot gilles at gmail dot com> 0010 * SPDX-FileCopyrightText: 2011 by Hormiere Guillaume <hormiere dot guillaume at gmail dot com> 0011 * SPDX-FileCopyrightText: 2011 by Manuel Campomanes <campomanes dot manuel at gmail dot com> 0012 * 0013 * SPDX-License-Identifier: GPL-2.0-or-later 0014 * 0015 * ============================================================ */ 0016 0017 #ifndef DIGIKAM_MEDIAWIKI_QUERYSITEINFOGENERAL_H 0018 #define DIGIKAM_MEDIAWIKI_QUERYSITEINFOGENERAL_H 0019 0020 // Qt includes 0021 0022 #include <QList> 0023 #include <QString> 0024 0025 // Local includes 0026 0027 #include "mediawiki_job.h" 0028 #include "mediawiki_generalinfo.h" 0029 0030 namespace MediaWiki 0031 { 0032 0033 class Iface; 0034 class QuerySiteInfoGeneralPrivate; 0035 0036 /** 0037 * @brief QuerySiteInfoGeneral job. 0038 * 0039 * Uses for fetch a generals information about the wiki. 0040 */ 0041 class QuerySiteInfoGeneral : public Job 0042 { 0043 Q_OBJECT 0044 Q_DECLARE_PRIVATE(QuerySiteInfoGeneral) 0045 0046 public: 0047 0048 enum 0049 { 0050 IncludeAllDenied = Job::UserDefinedError + 1 0051 }; 0052 0053 public: 0054 0055 /** 0056 * @brief Constructs a QuerySiteInfoGeneral job. 0057 * @param MediaWiki the MediaWiki concerned by the job 0058 * @param parent the QObject parent 0059 */ 0060 explicit QuerySiteInfoGeneral(Iface& MediaWiki, QObject* const parent = nullptr); 0061 0062 /** 0063 * @brief Destroys the QuerySiteInfoGeneral job. 0064 */ 0065 ~QuerySiteInfoGeneral() override; 0066 0067 /** 0068 * @brief Starts the job asynchronously. 0069 */ 0070 void start() override; 0071 0072 Q_SIGNALS: 0073 0074 /** 0075 * @brief Provide general info. 0076 * @param generalinfo the general info 0077 */ 0078 void result(const Generalinfo& generalinfo); 0079 0080 private Q_SLOTS: 0081 0082 void doWorkSendRequest(); 0083 void doWorkProcessReply(); 0084 }; 0085 0086 } // namespace MediaWiki 0087 0088 #endif // DIGIKAM_MEDIAWIKI_QUERYSITEINFOGENERAL_H