Go to the documentation of this file.
12 #include <sys/types.h>
16 #include <QCoreApplication>
31 #include "libmythbase/mythversion.h"
39 #define LOC QString("MythJobQueue: ")
40 #define LOC_WARN QString("MythJobQueue, Warning: ")
41 #define LOC_ERR QString("MythJobQueue, Error: ")
54 unlink(
pidfile.toLatin1().constData());
61 int main(
int argc,
char *argv[])
82 QCoreApplication a(argc, argv);
90 QString mask(
"general");
104 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Failed to init MythContext, exiting.");
112 LOG(VB_GENERAL, LOG_ERR,
LOC +
"Failed to connect to master server");
122 #ifdef CONFIG_BINDINGS_PYTHON
126 housekeeping->Start();
128 int exitCode = QCoreApplication::exec();
130 delete sysEventHandler;
Manages registered HouseKeeperTasks and queues tasks for operation.
MythCommFlagCommandLineParser cmdline
bool ConnectToMasterServer(bool blockingClient=true, bool openEventSocket=true)
Startup context for MythTV.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
virtual bool Parse(int argc, const char *const *argv)
Loop through argv and populate arguments with values.
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
@ GENERIC_EXIT_OK
Exited with no error.
static void PrintVersion(void)
Print application version information.
@ GENERIC_EXIT_CONNECT_ERROR
Can't connect to master backend.
void PrintHelp(void) const
Print command line option help.
int Daemonize(void) const
Fork application into background, and detatch from terminal.
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
void ApplySettingsOverride(void)
Apply all overrides to the global context.
static void Init(QObject *parent=nullptr)
static constexpr const char * MYTH_APPNAME_MYTHJOBQUEUE
static void cleanup(void)
bool toBool(const QString &key) const
Returns stored QVariant as a boolean.
int ConfigureLogging(const QString &mask="general", bool progress=false)
Read in logging options and initialize the logging interface.
int main(int argc, char *argv[])
Handles incoming MythSystemEvent messages.
MythContext * gContext
This global variable contains the MythContext instance for the application.
bool Init(bool gui=true, bool promptForBackend=false, bool disableAutoDiscovery=false, bool ignoreDB=false)
@ GENERIC_EXIT_NO_MYTHCONTEXT
No MythContext available.