MythTV  master
mythfilerecorder/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 "MythFilelRecorder's allow a go-between app to interface "
13  "with a recording device before the data is processed by mythbackend.";
14 }
15 
17 {
18  allowArgs();
19  addHelp();
21  addVersion();
22  addLogging();
23 
24  addInFile();
25 
26  add("--inputid", "inputid", "", "MythTV input this app is attached to.", "")
27  ->SetGroup("ExternalRecorder");
28 
29  add(QStringList{"--noloop"},
30  "noloop", false,
31  "Don't loop input back to beginning on EOF.", "");
32 
33  add(QStringList{"--data-rate"},
34  "data_rate", 188*50000,
35  "Rate at which to read data from the file.", "");
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.
void addInFile(bool addOutFile=false)
Canned argument definition for –infile and –outfile.
CommandLineArg * SetGroup(const QString &group)
#define MYTH_APPNAME_MYTHAVTEST
void addSettingsOverride(void)
Canned argument definition for –override-setting and –override-settings-file.