1// SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: GPL-3.0-or-later
4
5#ifndef SERVERCMDPARSE_H
6#define SERVERCMDPARSE_H
7
8#include <QCoreApplication>
9#include <QCommandLineParser>
10#include <optional>
11
12namespace newlsp {
13extern const QString port;
14extern const QString mode;
15extern const QString parentPid;
16extern const QString stdio;
17extern const QString tcp;
18extern const QString portDefault;
19extern const QString parentPidDefault;
20class ServerCmdParsePrivate;
21class ServerCmdParse : QCommandLineParser
22{
23 ServerCmdParsePrivate *const d;
24public:
25 ServerCmdParse(const QCoreApplication &app);
26 virtual ~ServerCmdParse();
27 std::optional<uint> parentPid() const;
28 std::optional<std::string> mode() const;
29 std::optional<uint> port() const;
30 virtual void bindOptions();
31};
32
33}
34#endif // SERVERCMDPARSE_H
35