Go to the documentation of this file.
3 #include <QCoreApplication>
5 #include <QApplication>
9 #include "mythconfig.h"
31 int main(
int argc,
char *argv[])
41 QString defaultVerbose =
"general";
42 LogLevel_t defaultLevel = LOG_INFO;
68 QCoreApplication a(argc, argv);
72 QApplication a(argc, argv);
85 QList<int> signallist;
86 signallist << SIGINT << SIGTERM << SIGSEGV << SIGABRT << SIGBUS << SIGFPE
89 signallist << SIGRTMIN;
98 LOG(VB_GENERAL, LOG_ERR,
"Failed to init MythContext, exiting.");
116 bool cmdFound =
false;
119 for (i = utilMap.begin(); i != utilMap.end(); ++i)
123 cmdResult = (i.value())(
cmdline);
void registerBackendUtils(UtilMap &utilMap)
#define GENERIC_EXIT_OK
Exited with no error.
void registerMarkupUtils(UtilMap &utilMap)
int main(int argc, char *argv[])
Startup context for MythTV.
void registerMessageUtils(UtilMap &utilMap)
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
#define GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
void registerFileUtils(UtilMap &utilMap)
static void PrintVersion(void)
Print application version information.
void PrintHelp(void) const
Print command line option help.
void ApplySettingsOverride(void)
Apply all overrides to the global context.
void registerMPEGUtils(UtilMap &utilMap)
#define MYTH_BINARY_VERSION
Update this whenever the plug-in ABI changes.
MythCommFlagCommandLineParser cmdline
QMap< QString, UtilFunc > UtilMap
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
void registerEITUtils(UtilMap &utilMap)
#define GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
static void SetHandler(int signum, SigHandlerFunc handler)
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
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)
#define MYTH_APPNAME_MYTHUTIL
void registerJobUtils(UtilMap &utilMap)
static void Init(QList< int > &signallist, QObject *parent=nullptr)