00001
00002 using namespace std;
00003
00004 #include <QString>
00005
00006 #include "mythcorecontext.h"
00007 #include "commandlineparser.h"
00008
00009 MythBackendCommandLineParser::MythBackendCommandLineParser() :
00010 MythCommandLineParser(MYTH_APPNAME_MYTHBACKEND)
00011 { LoadArguments(); }
00012
00013 void MythBackendCommandLineParser::LoadArguments(void)
00014 {
00015 addHelp();
00016 addVersion();
00017 addDaemon();
00018 addSettingsOverride();
00019 addUPnP();
00020 addLogging();
00021 addPIDFile();
00022
00023 CommandLineArg::AllowOneOf(QList<CommandLineArg*>()
00024 << add("--printsched", "printsched", false,
00025 "Print upcoming list of scheduled recordings.", "")
00026
00027 << add("--testsched", "testsched", false,
00028 "do some scheduler testing.", "")
00029
00030 << add("--resched", "resched", false,
00031 "Trigger a run of the recording scheduler on the existing "
00032 "master backend.",
00033 "This command will connect to the master backend and trigger "
00034 "a run of the recording scheduler. The call will return "
00035 "immediately, however the scheduler run may take several "
00036 "seconds to a minute or longer to complete.")
00037 ->SetDeprecated("use mythutil instead")
00038 << add("--scanvideos", "scanvideos", false,
00039 "Trigger a rescan of media content in MythVideo.",
00040 "This command will connect to the master backend and trigger "
00041 "a run of the Video scanner. The call will return "
00042 "immediately, however the scanner may take several seconds "
00043 "to tens of minutes, depending on how much new or moved "
00044 "content it has to hash, and how quickly the scanner can "
00045 "access those files to do so. If enabled, this will also "
00046 "trigger the bulk metadata scanner upon completion.")
00047 ->SetDeprecated("use mythutil instead")
00048 << add("--event", "event", "",
00049 "Send a backend event test message.", "")
00050 ->SetDeprecated("use mythutil instead")
00051 << add("--systemevent", "systemevent", "",
00052 "Send a backend SYSTEM_EVENT test message.", "")
00053 ->SetDeprecated("use mythutil instead")
00054 << add("--clearcache", "clearcache", false,
00055 "Trigger a cache clear on all connected MythTV systems.",
00056 "This command will connect to the master backend and trigger "
00057 "a cache clear event, which will subsequently be pushed to "
00058 "all other connected programs. This event will clear the "
00059 "local database settings cache used by each program, causing "
00060 "options to be re-read from the database upon next use.")
00061 ->SetDeprecated("use mythutil instead")
00062 << add("--printexpire", "printexpire", "ALL",
00063 "Print upcoming list of recordings to be expired.", "")
00064
00065 << add("--setverbose", "setverbose", "",
00066 "Change debug mask of the existing master backend.", "")
00067
00068 << add("--setloglevel", "setloglevel", "",
00069 "Change logging level of the existing master backend.", "")
00070
00071 );
00072
00073 add("--nosched", "nosched", false, "",
00074 "Intended for debugging use only, disable the scheduler "
00075 "on this backend if it is the master backend, preventing "
00076 "any recordings from occuring until the backend is "
00077 "restarted without this option.");
00078 add("--nojobqueue", "nojobqueue", false, "",
00079 "Intended for debugging use only, disable the jobqueue "
00080 "on this backend. As each jobqueue independently selects "
00081 "jobs, this will only have any affect on this local "
00082 "backend.");
00083 add("--nohousekeeper", "nohousekeeper", false, "",
00084 "Intended for debugging use only, disable the housekeeper "
00085 "on this backend if it is the master backend, preventing "
00086 "any guide processing, recording cleanup, or any other "
00087 "task performed by the housekeeper.");
00088 add("--noautoexpire", "noautoexpire", false, "",
00089 "Intended for debugging use only, disable the autoexpirer "
00090 "on this backend if it is the master backend, preventing "
00091 "recordings from being expired to clear room for new "
00092 "recordings.");
00093 add("--user", "username", "",
00094 "Drop permissions to username after starting.", "");
00095
00096 add("--upnprebuild", "upnprebuild", false, "", "")
00097 ->SetRemoved("The UPnP server no longer maintains its own list\n"
00098 " of video content, and instead uses the shared\n"
00099 " list of the Video Library. Update the Video Library\n"
00100 " content list from within mythfrontend, or on the\n"
00101 " command line using 'mythutil --scanvideos'.",
00102 "0.25");
00103 add("--infile", "inputfile", "", "", "")
00104 ->SetRemoved("mythbackend is no longer used for preview\n"
00105 " generation. Please use mythpreviewgen.", "0.25");
00106 add("--outfile", "outputfile", "", "", "")
00107 ->SetRemoved("mythbackend is no longer used for preview\n"
00108 " generation. Please use mythpreviewgen.", "0.25");
00109 add("--chanid", "chanid", "", "", "")
00110 ->SetRemoved("mythbackend is no longer used for preview\n"
00111 " generation. Please use mythpreviewgen.", "0.25");
00112 add("--starttime", "starttime", "", "", "")
00113 ->SetRemoved("mythbackend is no longer used for preview\n"
00114 " generation. Please use mythpreviewgen.", "0.25");
00115 }
00116
00117 QString MythBackendCommandLineParser::GetHelpHeader(void) const
00118 {
00119 return "MythBackend is the primary server application for MythTV. It is \n"
00120 "used for recording and remote streaming access of media. Only one \n"
00121 "instance of this application is allowed to run on one host at a \n"
00122 "time, and one must be configured to operate as a master, performing \n"
00123 "additional scheduler and housekeeper tasks.";
00124 }