File indexing completed on 2025-04-20 06:33:58
0001 /* 0002 SPDX-FileCopyrightText: 2016 Jasem Mutlaq <mutlaqja@ikarustech.com> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QNetworkAccessManager> 0010 #include <QFuture> 0011 0012 class QByteArray; 0013 class QJsonDocument; 0014 class QUrl; 0015 0016 class ProfileInfo; 0017 0018 namespace INDI 0019 { 0020 namespace WebManager 0021 { 0022 bool getWebManagerResponse(QNetworkAccessManager::Operation operation, const QUrl &url, QJsonDocument *reply, QByteArray *data = nullptr); 0023 bool isOnline(const QSharedPointer<ProfileInfo> &pi); 0024 bool checkVersion(const QSharedPointer<ProfileInfo> &pi); 0025 bool syncCustomDrivers(const QSharedPointer<ProfileInfo> &pi); 0026 bool areDriversRunning(const QSharedPointer<ProfileInfo> &pi); 0027 bool startProfile(const QSharedPointer<ProfileInfo> &pi); 0028 bool stopProfile(const QSharedPointer<ProfileInfo> &pi); 0029 bool restartDriver(const QSharedPointer<ProfileInfo> &pi, const QString &label); 0030 } 0031 0032 namespace AsyncWebManager 0033 { 0034 QFuture<bool> isOnline(const QSharedPointer<ProfileInfo> &pi); 0035 QFuture<bool> isStellarMate(const QSharedPointer<ProfileInfo> &pi); 0036 QFuture<bool> syncCustomDrivers(const QSharedPointer<ProfileInfo> &pi); 0037 QFuture<bool> areDriversRunning(const QSharedPointer<ProfileInfo> &pi); 0038 QFuture<bool> startProfile(const QSharedPointer<ProfileInfo> &pi); 0039 QFuture<bool> stopProfile(const QSharedPointer<ProfileInfo> &pi); 0040 } 0041 0042 }