MythTV master
mythbackend_commandlineparser.cpp
Go to the documentation of this file.
1#include <QString>
2
5
9
11{
12 addHelp();
13 addVersion();
14 addDaemon();
16 addUPnP();
17 addDVBv3();
18 addLogging();
19 addPIDFile();
20
21 CommandLineArg::AllowOneOf(QList<CommandLineArg*>()
22 << add("--pidfile", "pidfile", "",
23 "Filename to save the application pid.", "")
24 << add("--printsched", "printsched", false,
25 "Print upcoming list of scheduled recordings.", "")
26// ->SetDeprecated("use mythutil instead")
27 << add("--testsched", "testsched", false,
28 "do some scheduler testing.", "")
29// ->SetDeprecated("use mythutil instead")
30 << add("--resched", "resched", false, "", "")
31 ->SetRemoved("mythbackend is no longer used to trigger\n"
32 " rescheduling. Please use mythutil.", "34")
33 << add("--scanvideos", "scanvideos", false,"", "")
34 ->SetRemoved("mythbackend is no longer used to trigger\n"
35 " scanning media content. Please use mythutil.", "34")
36 << add("--event", "event", "", "", "")
37 ->SetRemoved("mythbackend is no longer used send an event.", "34")
38 << add("--systemevent", "systemevent", "", "", "")
39 ->SetRemoved("mythbackend is no longer used send a SYSTEM_EVENT.", "34")
40 << add("--clearcache", "clearcache", false, "", "")
41 ->SetRemoved("mythbackend is no longer used to clear\n"
42 " the database caches. Please use mythutil.", "34")
43 << add("--printexpire", "printexpire", "ALL",
44 "Print upcoming list of recordings to be expired.", "")
45// ->SetDeprecated("use mythutil instead")
46 << add("--setverbose", "setverbose", "",
47 "Change debug mask of the existing master backend.", "")
48// ->SetDeprecated("use mythutil instead")
49 << add("--setloglevel", "setloglevel", "",
50 "Change logging level of the existing master backend.", "")
51// ->SetDeprecated("use mythutil instead");
52 );
53
54 add("--webonly", "webonly", false, "Start in web-server-only mode.",
55 "Start the backend in web server mode, where only the "
56 "web server is running. "
57 "This is only for use when the backend crashes due "
58 " to an invalid configuration, and you need to use setup "
59 "to rectify it. Scheduler is disabled in this mode.");
60 add("--nosched", "nosched", false, "",
61 "Intended for debugging use only, disable the scheduler "
62 "on this backend if it is the master backend, preventing "
63 "any recordings from occuring until the backend is "
64 "restarted without this option.");
65 add("--nojobqueue", "nojobqueue", false, "",
66 "Intended for debugging use only, disable the jobqueue "
67 "on this backend. As each jobqueue independently selects "
68 "jobs, this will only have any affect on this local "
69 "backend.");
70 add("--nohousekeeper", "nohousekeeper", false, "",
71 "Intended for debugging use only, disable the housekeeper "
72 "on this backend if it is the master backend, preventing "
73 "any guide processing, recording cleanup, or any other "
74 "task performed by the housekeeper.");
75 add("--noautoexpire", "noautoexpire", false, "",
76 "Intended for debugging use only, disable the autoexpirer "
77 "on this backend if it is the master backend, preventing "
78 "recordings from being expired to clear room for new "
79 "recordings.");
80 add("--user", "username", "",
81 "Drop permissions to username after starting.", "");
82#ifndef NDEBUG
83 add("--upgradedbonly", "upgradedbonly", false,
84 "Upgrade the database and then exit.",
85 "Intended for development use only, Upgrade the database "
86 "and then immediately exit.");
87#endif
88}
89
91{
92 return "MythBackend is the primary server application for MythTV. It is \n"
93 "used for recording and remote streaming access of media. Only one \n"
94 "instance of this application is allowed to run on one host at a \n"
95 "time, and one must be configured to operate as a master, performing \n"
96 "additional scheduler and housekeeper tasks.";
97}
static void AllowOneOf(const QList< CommandLineArg * > &args)
Mark a list of arguments as mutually exclusive.
QString GetHelpHeader(void) const override
Parent class for defining application command line parsers.
void addVersion(void)
Canned argument definition for –version.
void addPIDFile(void)
Canned argument definition for –pidfile.
void addSettingsOverride(void)
Canned argument definition for –override-setting and –override-settings-file.
void addLogging(const QString &defaultVerbosity="general", LogLevel_t defaultLogLevel=LOG_INFO)
Canned argument definition for all logging options, including –verbose, –logpath, –quiet,...
void addDVBv3(void)
Canned argument definition for –dvbv3.
CommandLineArg * add(const QString &arg, const QString &name, bool def, QString help, QString longhelp)
void addHelp(void)
Canned argument definition for –help.
void addUPnP(void)
Canned argument definition for –noupnp.
void addDaemon(void)
Canned argument definition for –daemon.
static constexpr const char * MYTH_APPNAME_MYTHBACKEND
Definition: mythappname.h:4