11 LOG(VB_GENERAL, LOG_ERR,
"MessageHandler started with no CoreContext!");
37 const QString& command = commands[0];
40 if (command ==
"MESSAGE")
42 else if (command ==
"BACKEND_MESSAGE")
54 res <<
"ERROR" <<
"Insufficient Length";
59 const QString& message = slist[1];
60 QStringList extra_data;
61 extra_data.reserve(slist.size() - 2);
62 for (
uint i = 2; i < (
uint) slist.size(); i++)
63 extra_data.push_back(slist[i]);
65 if (extra_data.empty())
97 QStringList::const_iterator iter = slist.cbegin();
98 QString message = *(iter++);
99 QStringList extra_data( *(iter++) );
101 for (; iter != slist.cend(); ++iter)
108#include "moc_messagehandler.cpp"
void customEvent(QEvent *e) override
static bool HandleOutbound(SocketHandler *sock, QStringList &slist)
Handle an asynchronous message received from the master backend.
static bool HandleInbound(SocketHandler *sock, QStringList &slist)
bool HandleQuery(SocketHandler *socket, QStringList &commands, QStringList &slist) override
void dispatch(const MythEvent &event)
bool IsMasterBackend(void)
is this the actual MBE process
This class is used as a container for messages.
static const Type kMythEventMessage
void addListener(QObject *listener)
Add a listener to the observable.
bool WriteStringList(const QStringList &strlist)
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
#define LOG(_MASK_, _LEVEL_, _QSTRING_)