File indexing completed on 2024-05-12 16:25:39
0001 /* 0002 SPDX-FileCopyrightText: 2020-2024 Laurent Montel <montel@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "libruqolacore_export.h" 0010 #include <QObject> 0011 #include <QSslError> 0012 class QNetworkAccessManager; 0013 class QNetworkReply; 0014 class LIBRUQOLACORE_EXPORT DownloadAppsLanguagesJob : public QObject 0015 { 0016 Q_OBJECT 0017 public: 0018 explicit DownloadAppsLanguagesJob(QObject *parent = nullptr); 0019 ~DownloadAppsLanguagesJob() override; 0020 0021 [[nodiscard]] bool canStart() const; 0022 void start(); 0023 0024 [[nodiscard]] QString serverUrl() const; 0025 void setServerUrl(const QString &serverUrl); 0026 0027 Q_SIGNALS: 0028 void fileDownloaded(const QByteArray &data); 0029 0030 private: 0031 LIBRUQOLACORE_NO_EXPORT void slotSslErrors(QNetworkReply *reply, const QList<QSslError> &error); 0032 LIBRUQOLACORE_NO_EXPORT void slotFileDownloaded(QNetworkReply *reply); 0033 QString mServerUrl; 0034 QNetworkAccessManager *const mNetworkAccessManager; 0035 };