1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef ROUTE_H
6#define ROUTE_H
7
8#include "common/lsp/protocol/newprotocol.h"
9
10#include <QObject>
11#include <QProcess>
12
13namespace newlsp {
14class Route : public QObject
15{
16 Q_OBJECT
17public:
18 explicit Route(QObject *parent = nullptr) : QObject(parent){}
19 ProjectKey key(QProcess *value) const;
20 QList<ProjectKey> keys() const;
21 QProcess *value(const ProjectKey &key);
22 void save(const ProjectKey &key, QProcess *const value);
23
24private Q_SLOTS:
25 void deleteProc(int exitCode, QProcess::ExitStatus exitstatus);
26
27private:
28 Route(){}
29 QHash<ProjectKey, QProcess*> savedProcs;
30};
31
32}
33#endif // ROUTE_H
34