ToolX 1.11.1 [e3f477f]
A GUI debug tool chain for diagnosing GVA systems
Loading...
Searching...
No Matches
config_file.h
Go to the documentation of this file.
1//
2// Copyright (c) 2026, Astute Systems PTY LTD
3//
4// This file is part of the VivoeX project developed by Astute Systems.
5//
6// License. See the LICENSE file in the project root for full license details.
7//
13
14#ifndef CONFIG_FILE_H
15#define CONFIG_FILE_H
16
17#include <QJsonObject>
18#include <QString>
19
20namespace toolx::config {
21
23constexpr const char *kApplication = "ToolX";
24
27constexpr int kFileVersion = 1;
28
30constexpr qint64 kMaxFileSize = 4 * 1024 * 1024;
31
33namespace section {
35constexpr const char *kOverlays = "overlays";
37constexpr const char *kRtp = "rtp";
39constexpr const char *kGige = "gige";
41constexpr const char *kSrtTransmit = "srtTransmit";
43constexpr const char *kSrtReceive = "srtReceive";
45constexpr const char *kRtsp = "rtsp";
47constexpr const char *kHls = "hls";
49constexpr const char *kChromecast = "chromecast";
50} // namespace section
51
65bool writeFile(const QString &path, const QJsonObject &sections, const QString &toolx_version,
66 QString &error);
67
76bool readFile(const QString &path, QJsonObject &document, QString &error);
77
78} // namespace toolx::config
79
80#endif // CONFIG_FILE_H
bool readFile(const QString &path, QJsonObject &document, QString &error)
Read and check a configuration file.
Definition config_file.cpp:51
bool writeFile(const QString &path, const QJsonObject &sections, const QString &toolx_version, QString &error)
Write a configuration file.
Definition config_file.cpp:23
constexpr int kFileVersion
Definition config_file.h:27
constexpr qint64 kMaxFileSize
The largest configuration file that is read, in bytes.
Definition config_file.h:30
constexpr const char * kApplication
The value of the "application" member that marks a ToolX configuration file.
Definition config_file.h:23
The members (sections) of a configuration file, besides the header.
Definition config_file.h:33
constexpr const char * kGige
GigE > Device tab: the emulated device.
Definition config_file.h:39
constexpr const char * kHls
HLS table: [ ... ].
Definition config_file.h:47
constexpr const char * kRtsp
RTSP table: [ ... ].
Definition config_file.h:45
constexpr const char * kSrtReceive
SRT > Receive table: [ ... ].
Definition config_file.h:43
constexpr const char * kSrtTransmit
SRT > Transmit table: [ ... ].
Definition config_file.h:41
constexpr const char * kRtp
RTP > RTP table: { "sapAnnouncements": bool, "streams": [ ... ] }.
Definition config_file.h:37
constexpr const char * kOverlays
Time and stream name overlays: { "time": bool, "streamName": bool }.
Definition config_file.h:35
constexpr const char * kChromecast
Chromecast tab: the picture and test card settings.
Definition config_file.h:49