forked from YIO-Remote/remote-software
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcommandlinehandler.h
52 lines (43 loc) · 1.81 KB
/
commandlinehandler.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/******************************************************************************
*
* Copyright (C) 2020 Markus Zehnder <business@markuszehnder.ch>
*
* This file is part of the YIO-Remote software project.
*
* YIO-Remote software is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* YIO-Remote software is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with YIO-Remote software. If not, see <https://www.gnu.org/licenses/>.
*
* SPDX-License-Identifier: GPL-3.0-or-later
*****************************************************************************/
#pragma once
#include <QCoreApplication>
#include <QObject>
class CommandLineHandler : public QObject {
Q_OBJECT
public:
explicit CommandLineHandler(QObject *parent = nullptr);
void process(const QCoreApplication &app, const QString &resourcePath, const QString &configurationPath);
QString getProfile() const { return m_profile; }
QString configFile() const { return m_cfgFile; }
QString configSchemaFile() const { return m_cfgSchemaFile; }
QString hardwareConfigFile() const { return m_hwCfgFile; }
QString hardwareConfigSchemaFile() const { return m_hwCfgSchemaFile; }
private:
bool validateJson(const QString &filePath, const QString &schemaPath);
private:
QString m_profile;
QString m_cfgFile;
QString m_cfgSchemaFile;
QString m_hwCfgFile;
QString m_hwCfgSchemaFile;
};