MythTV  master
mythlcdserver/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  addHelp();
13  addVersion();
14  addDaemon();
15  addLogging();
16  //addPIDFile();
17 
18  add(QStringList{"-p", "--port"}, "port", 6545, "listen port",
19  "This is the port MythLCDServer will listen on for events.");
20  add(QStringList{"-m", "--startupmessage"}, "message", "",
21  "Message to display on startup.", "");
22  add(QStringList{"-t", "--messagetime"}, "messagetime", 30,
23  "Message display duration (in seconds)", "");
24  add(QStringList{"-x", "--debuglevel"}, "debug", 0,
25  "debug verbosity", "Control debugging verbosity, values from 0-10");
26 
27  add("--nodaemon", "nodaemon", false, "", "")
28  ->SetRemoved("This is the default behavior. No need for an argument.",
29  "0.25");
30 }
31 
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 addDaemon(void)
Canned argument definition for –daemon.
#define MYTH_APPNAME_MYTHLCDSERVER
CommandLineArg * SetRemoved(QString remstr="", QString remver="")
Set option as removed.