MythTV  master
mythbackend/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();
16  addUPnP();
17  addLogging();
18  addPIDFile();
19 
20  CommandLineArg::AllowOneOf(QList<CommandLineArg*>()
21  << add("--printsched", "printsched", false,
22  "Print upcoming list of scheduled recordings.", "")
23 // ->SetDeprecated("use mythutil instead")
24  << add("--testsched", "testsched", false,
25  "do some scheduler testing.", "")
26 // ->SetDeprecated("use mythutil instead")
27  << add("--resched", "resched", false,
28  "Trigger a run of the recording scheduler on the existing "
29  "master backend.",
30  "This command will connect to the master backend and trigger "
31  "a run of the recording scheduler. The call will return "
32  "immediately, however the scheduler run may take several "
33  "seconds to a minute or longer to complete.")
34  ->SetDeprecated("use mythutil instead")
35  << add("--scanvideos", "scanvideos", false,
36  "Trigger a rescan of media content in MythVideo.",
37  "This command will connect to the master backend and trigger "
38  "a run of the Video scanner. The call will return "
39  "immediately, however the scanner may take several seconds "
40  "to tens of minutes, depending on how much new or moved "
41  "content it has to hash, and how quickly the scanner can "
42  "access those files to do so. If enabled, this will also "
43  "trigger the bulk metadata scanner upon completion.")
44  ->SetDeprecated("use mythutil instead")
45  << add("--event", "event", "",
46  "Send a backend event test message.", "")
47  ->SetDeprecated("use mythutil instead")
48  << add("--systemevent", "systemevent", "",
49  "Send a backend SYSTEM_EVENT test message.", "")
50  ->SetDeprecated("use mythutil instead")
51  << add("--clearcache", "clearcache", false,
52  "Trigger a cache clear on all connected MythTV systems.",
53  "This command will connect to the master backend and trigger "
54  "a cache clear event, which will subsequently be pushed to "
55  "all other connected programs. This event will clear the "
56  "local database settings cache used by each program, causing "
57  "options to be re-read from the database upon next use.")
58  ->SetDeprecated("use mythutil instead")
59  << add("--printexpire", "printexpire", "ALL",
60  "Print upcoming list of recordings to be expired.", "")
61 // ->SetDeprecated("use mythutil instead")
62  << add("--setverbose", "setverbose", "",
63  "Change debug mask of the existing master backend.", "")
64 // ->SetDeprecated("use mythutil instead")
65  << add("--setloglevel", "setloglevel", "",
66  "Change logging level of the existing master backend.", "")
67 // ->SetDeprecated("use mythutil instead");
68  );
69 
70  add("--nosched", "nosched", false, "",
71  "Intended for debugging use only, disable the scheduler "
72  "on this backend if it is the master backend, preventing "
73  "any recordings from occuring until the backend is "
74  "restarted without this option.");
75  add("--nojobqueue", "nojobqueue", false, "",
76  "Intended for debugging use only, disable the jobqueue "
77  "on this backend. As each jobqueue independently selects "
78  "jobs, this will only have any affect on this local "
79  "backend.");
80  add("--nohousekeeper", "nohousekeeper", false, "",
81  "Intended for debugging use only, disable the housekeeper "
82  "on this backend if it is the master backend, preventing "
83  "any guide processing, recording cleanup, or any other "
84  "task performed by the housekeeper.");
85  add("--noautoexpire", "noautoexpire", false, "",
86  "Intended for debugging use only, disable the autoexpirer "
87  "on this backend if it is the master backend, preventing "
88  "recordings from being expired to clear room for new "
89  "recordings.");
90  add("--user", "username", "",
91  "Drop permissions to username after starting.", "");
92 
93  add("--upnprebuild", "upnprebuild", false, "", "")
94  ->SetRemoved("The UPnP server no longer maintains its own list\n"
95  " of video content, and instead uses the shared\n"
96  " list of the Video Library. Update the Video Library\n"
97  " content list from within mythfrontend, or on the\n"
98  " command line using 'mythutil --scanvideos'.",
99  "0.25");
100  add("--infile", "inputfile", "", "", "")
101  ->SetRemoved("mythbackend is no longer used for preview\n"
102  " generation. Please use mythpreviewgen.", "0.25");
103  add("--outfile", "outputfile", "", "", "")
104  ->SetRemoved("mythbackend is no longer used for preview\n"
105  " generation. Please use mythpreviewgen.", "0.25");
106  add("--chanid", "chanid", "", "", "")
107  ->SetRemoved("mythbackend is no longer used for preview\n"
108  " generation. Please use mythpreviewgen.", "0.25");
109  add("--starttime", "starttime", "", "", "")
110  ->SetRemoved("mythbackend is no longer used for preview\n"
111  " generation. Please use mythpreviewgen.", "0.25");
112 }
113 
115 {
116  return "MythBackend is the primary server application for MythTV. It is \n"
117  "used for recording and remote streaming access of media. Only one \n"
118  "instance of this application is allowed to run on one host at a \n"
119  "time, and one must be configured to operate as a master, performing \n"
120  "additional scheduler and housekeeper tasks.";
121 }
CommandLineArg * add(QString arg, QString name, bool def, QString help, QString longhelp)
void addPIDFile(void)
Canned argument definition for –pidfile.
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.
void addUPnP(void)
Canned argument definition for –noupnp.
QString GetHelpHeader(void) const override
static void AllowOneOf(QList< CommandLineArg * > args)
Mark a list of arguments as mutually exclusive.
CommandLineArg * SetRemoved(QString remstr="", QString remver="")
Set option as removed.
#define MYTH_APPNAME_MYTHBACKEND
void addSettingsOverride(void)
Canned argument definition for –override-setting and –override-settings-file.