15#include <QCoreApplication>
31#include "libmythbase/mythversion.h"
38#define LOC QString("MythJobQueue: ")
39#define LOC_WARN QString("MythJobQueue, Warning: ")
40#define LOC_ERR QString("MythJobQueue, Error: ")
44int main(
int argc,
char *argv[])
65 QCoreApplication a(argc, argv);
73 QString mask(
"general");
79 if (!context.Init(
false))
81 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Failed to init MythContext, exiting.");
89 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Failed to connect to master server");
99 #ifdef CONFIG_BINDINGS_PYTHON
103 housekeeping->Start();
105 int exitCode = QCoreApplication::exec();
107 delete sysEventHandler;
Manages registered HouseKeeperTasks and queues tasks for operation.
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 Daemonize(void) const
Fork application into background, and detatch from terminal.
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
static void PrintVersion(void)
Print application version information.
void PrintHelp(void) const
Print command line option help.
Startup context for MythTV.
bool ConnectToMasterServer(bool blockingClient=true, bool openEventSocket=true)
Handles incoming MythSystemEvent messages.
@ GENERIC_EXIT_CONNECT_ERROR
Can't connect to master backend.
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.
@ GENERIC_EXIT_OK
Exited with no error.
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
static constexpr const char * MYTH_APPNAME_MYTHJOBQUEUE
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
int main(int argc, char *argv[])
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
MythCommFlagCommandLineParser cmdline