20 if (eventStringList.isEmpty() || eventStringList[0].isEmpty())
25 QStringList message(
"MESSAGE");
26 message << eventStringList;
38 LOG(VB_GENERAL, LOG_INFO,
"Sent CLEAR_SETTINGS_CACHE message");
42 LOG(VB_GENERAL, LOG_ERR,
"Unable to connect to backend, settings "
43 "cache will not be cleared.");
54 return RawSendEvent(QStringList(QString(
"SYSTEM_EVENT %1 SENDER %2")
65 LOG(VB_GENERAL, LOG_INFO,
"Reschedule command sent to master");
69 LOG(VB_GENERAL, LOG_ERR,
"Cannot connect to master for reschedule");
78 LOG(VB_GENERAL, LOG_INFO,
"Requested image scan");
82 LOG(VB_GENERAL, LOG_ERR,
"Cannot connect to master for iamge scan");
91 LOG(VB_GENERAL, LOG_INFO,
"Requested video scan");
95 LOG(VB_GENERAL, LOG_ERR,
"Cannot connect to master for video scan");
103 .toLocal8Bit().constData() << endl
105 .toLocal8Bit().constData() << endl
107 .toLocal8Bit().constData() << endl
109 .toLocal8Bit().constData() << endl;
static int ScanVideos(const MythUtilCommandLineParser &)
static int ScanImages(const MythUtilCommandLineParser &)
static int ClearSettingsCache(const MythUtilCommandLineParser &)
static int SendEvent(const MythUtilCommandLineParser &cmdline)
static int SendSystemEvent(const MythUtilCommandLineParser &cmdline)
static int ParseVideoFilename(const MythUtilCommandLineParser &cmdline)
static int RawSendEvent(const QStringList &eventStringList)
void registerBackendUtils(UtilMap &utilMap)
static int Reschedule(const MythUtilCommandLineParser &)
QString toString(const QString &key) const
Returns stored QVariant as a QString, falling to default if not provided.
QStringList toStringList(const QString &key, const QString &sep="") const
Returns stored QVariant as a QStringList, falling to default if not provided.
QString GetHostName(void)
bool ConnectToMasterServer(bool blockingClient=true, bool openEventSocket=true)
void SendMessage(const QString &message)
bool SendReceiveStringList(QStringList &strlist, bool quickTimeout=false, bool block=true)
Send a message to the backend and wait for a response.
static void RescheduleMatch(uint recordid, uint sourceid, uint mplexid, const QDateTime &maxstarttime, const QString &why)
@ GENERIC_EXIT_CONNECT_ERROR
Can't connect to master backend.
@ GENERIC_EXIT_OK
Exited with no error.
@ GENERIC_EXIT_INVALID_CMDLINE
Command line parse error.
MythCommFlagCommandLineParser cmdline
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)
QMap< QString, UtilFunc > UtilMap