Go to the documentation of this file.
4 #include <QCoreApplication>
6 #include <QApplication>
14 #include "libmythbase/mythconfig.h"
43 LOG(VB_GENERAL, LOG_ERR,
"No chanid specified");
49 LOG(VB_GENERAL, LOG_ERR,
"No start time specified");
55 QString startstring = starttime.toString(
"yyyyMMddhhmmss");
61 LOG(VB_GENERAL, LOG_ERR,
62 QString(
"No program data exists for channel %1 at %2")
63 .arg(chanid).arg(startstring));
72 int main(
int argc,
char *argv[])
82 QString defaultVerbose =
"general";
83 LogLevel_t defaultLevel = LOG_INFO;
109 QCoreApplication a(argc, argv);
113 QApplication a(argc, argv);
132 LOG(VB_GENERAL, LOG_ERR,
"Failed to init MythContext, exiting.");
150 bool cmdFound =
false;
153 for (i = utilMap.begin(); i != utilMap.end(); ++i)
157 cmdResult = (i.value())(
cmdline);
void registerBackendUtils(UtilMap &utilMap)
void registerMarkupUtils(UtilMap &utilMap)
MythCommFlagCommandLineParser cmdline
Startup context for MythTV.
void registerMessageUtils(UtilMap &utilMap)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
@ GENERIC_EXIT_OK
Exited with no error.
bool GetProgramInfo(const MythUtilCommandLineParser &cmdline, ProgramInfo &pginfo)
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
void registerFileUtils(UtilMap &utilMap)
static void PrintVersion(void)
Print application version information.
uint toUInt(const QString &key) const
Returns stored QVariant as an unsigned integer, falling to default if not provided.
void PrintHelp(void) const
Print command line option help.
static constexpr const char * MYTH_BINARY_VERSION
Update this whenever the plug-in ABI changes.
void ApplySettingsOverride(void)
Apply all overrides to the global context.
int main(int argc, char *argv[])
void registerMPEGUtils(UtilMap &utilMap)
static void Init(QObject *parent=nullptr)
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
Holds information on recordings and videos.
QMap< QString, UtilFunc > UtilMap
QString toString(const QString &key) const
Returns stored QVariant as a QString, falling to default if not provided.
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
void registerEITUtils(UtilMap &utilMap)
static constexpr const char * MYTH_APPNAME_MYTHUTIL
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
QDateTime toDateTime(const QString &key) const
Returns stored QVariant as a QDateTime, falling to default if not provided.
MythContext * gContext
This global variable contains the MythContext instance for the application.
void registerRecordingUtils(UtilMap &utilMap)
bool Init(bool gui=true, bool promptForBackend=false, bool disableAutoDiscovery=false, bool ignoreDB=false)
void registerJobUtils(UtilMap &utilMap)