00001
00002 using namespace std;
00003
00004 #include <QString>
00005
00006 #include "mythcorecontext.h"
00007 #include "commandlineparser.h"
00008
00009 MythFrontendCommandLineParser::MythFrontendCommandLineParser() :
00010 MythCommandLineParser(MYTH_APPNAME_MYTHFRONTEND)
00011 { LoadArguments(); }
00012
00013 void MythFrontendCommandLineParser::LoadArguments(void)
00014 {
00015 addHelp();
00016 addVersion();
00017 addWindowed();
00018 addMouse();
00019 addSettingsOverride();
00020 addGeometry();
00021 addDisplay();
00022 addUPnP();
00023 addLogging();
00024
00025 add(QStringList( QStringList() << "-r" << "--reset" ), "reset", false,
00026 "Resets appearance, settings, and language.", "");
00027 add(QStringList( QStringList() << "-p" << "--prompt" ), "prompt", false,
00028 "Always prompt for backend selection.", "");
00029 add(QStringList( QStringList() << "-d" << "--disable-autodiscovery" ),
00030 "noautodiscovery", false,
00031 "Prevent frontend from using UPnP autodiscovery.", "");
00032
00033 add("--jumppoint", "jumppoint", "",
00034 "Start the frontend at specified jump point.", "")
00035 ->SetGroup("Startup Behavior");
00036 add("--runplugin", "runplugin", "",
00037 "Start the frontend within specified plugin.", "")
00038 ->SetGroup("Startup Behavior")
00039 ->SetBlocks("jumppoint");
00040
00041 add(QStringList( QStringList() << "-G" << "--get-setting" ),
00042 "getsetting", "", "", "")
00043 ->SetRemoved("Use the Services API instead.", "0.25");
00044 add(QStringList( QStringList() << "-u" << "--upgrade-schema" ),
00045 "upgradeschema", "", "", "")
00046 ->SetRemoved("The frontend is no longer allowed to update\n"
00047 " the primary database schema. Use mythtv-setup\n"
00048 " or restart your primary backend to have it\n"
00049 " perform the task automatically.", "0.25");
00050 }
00051
00052 QString MythFrontendCommandLineParser::GetHelpHeader(void) const
00053 {
00054 return "MythFrontend is the primary playback application for MythTV. It \n"
00055 "is used for playback of scheduled and live recordings, and management \n"
00056 "of recording rules.";
00057 }
00058