4#include <QCoreApplication>
15#include "libmythbase/mythconfig.h"
17#include "libmythbase/mythversion.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));
72int 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);
126 if (!context.Init(
false))
128 LOG(VB_GENERAL, LOG_ERR,
"Failed to init MythContext, exiting.");
146 bool cmdFound =
false;
149 for (i = utilMap.begin(); i != utilMap.end(); ++i)
153 cmdResult = (i.value())(
cmdline);
void registerBackendUtils(UtilMap &utilMap)
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
void ApplySettingsOverride(void)
Apply all overrides to the global context.
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
QString toString(const QString &key) const
Returns stored QVariant as a QString, falling to default if not provided.
static void PrintVersion(void)
Print application version information.
QDateTime toDateTime(const QString &key) const
Returns stored QVariant as a QDateTime, falling to default if not provided.
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.
Startup context for MythTV.
Holds information on recordings and videos.
uint GetChanID(void) const
This is the unique key used in the database to locate tuning information.
void registerEITUtils(UtilMap &utilMap)
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
@ GENERIC_EXIT_OK
Exited with no error.
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
void registerFileUtils(UtilMap &utilMap)
void registerJobUtils(UtilMap &utilMap)
void registerMarkupUtils(UtilMap &utilMap)
void registerMessageUtils(UtilMap &utilMap)
void registerMPEGUtils(UtilMap &utilMap)
static constexpr const char * MYTH_APPNAME_MYTHUTIL
MythCommFlagCommandLineParser cmdline
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
int main(int argc, char *argv[])
bool GetProgramInfo(const MythUtilCommandLineParser &cmdline, ProgramInfo &pginfo)
QMap< QString, UtilFunc > UtilMap
void registerRecordingUtils(UtilMap &utilMap)