1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef BACKENDCHECKER_H
6#define BACKENDCHECKER_H
7
8#include "framework/framework.h"
9
10#include <QWidget>
11#include <QUrl>
12#include <QProcess>
13#include <QProgressBar>
14#include <QDir>
15#include <QTextBrowser>
16#include <QCryptographicHash>
17
18class RemoteChecker
19{
20public:
21 explicit RemoteChecker();
22 static RemoteChecker &instance();
23 void checkLanguageBackend(const QString &language);
24 bool checkShasum(const QString &filePath, const QString &src_code, const QString &mode);
25 QString getRemoteFile(const QUrl &url);
26 bool saveRemoteFile(const QUrl &url, const QString &saveFilePath);
27 void checkJSServer(const QString &checkPath);
28
29private:
30 void doCheckClangd(const QString &language);
31 void doCheckJdtls(const QString &language);
32 void doCheckPyls(const QString &language);
33
34 bool checkClangdFlag = false;
35 bool checkJdtlsFlag = false;
36 bool checkPylsFlag = false;
37 bool checkJSServerFlag = false;
38};
39
40#endif // BACKENDCHECKER_H
41