MythTV  master
mythexternrecorder/commandlineparser.cpp
Go to the documentation of this file.
1 #include <QString>
2 
3 #include "mythcorecontext.h"
4 #include "commandlineparser.h"
5 
9 
11 {
12  return "MythFileRecorder is a go-between app which interfaces "
13  "between a recording device and mythbackend.";
14 }
15 
17 {
18  allowArgs();
19  addHelp();
21  addVersion();
22  addLogging();
23 
24  add("--conf", "conf", "", "Path to a configuration file in INI format.", "")
25  ->SetGroup("ExternalRecorder");
26 
27  add("--inputid", "inputid", "", "MythTV input this app is attached to.", "")
28  ->SetGroup("ExternalRecorder");
29 
30  add(QStringList{"--exec"},
31  "exec", false,
32  "Execute a program to retrieve Transport Stream from. "
33  "Data is expected to be on stdout.", "")
34  ->SetGroup("ExternalRecorder");
35 
36 }
void allowArgs(bool allow=true)
Specify that parser should allow and collect values provided independent of any keyword.
CommandLineArg * add(QString arg, QString name, bool def, QString help, QString longhelp)
Parent class for defining application command line parsers.
void addVersion(void)
Canned argument definition for –version.
void addLogging(const QString &defaultVerbosity="general", LogLevel_t defaultLogLevel=LOG_INFO)
Canned argument definition for all logging options, including –verbose, –logpath, –quiet,...
void addHelp(void)
Canned argument definition for –help.
#define MYTH_APPNAME_MYTHEXTERNRECORDER
CommandLineArg * SetGroup(const QString &group)
void addSettingsOverride(void)
Canned argument definition for –override-setting and –override-settings-file.