MythTV  master
controlrequesthandler.cpp
Go to the documentation of this file.
1 #include <QString>
2 #include <QStringList>
3 
4 #include "mythsocket.h"
5 #include "sockethandler.h"
6 #include "mythlogging.h"
7 #include "mythcorecontext.h"
8 
10 
12 {
13  if (!m_socket)
14  return false;
15 
16  QString ann = QString("ANN MediaServer %1")
17  .arg(gCoreContext->GetHostName());
18  QStringList strlist(ann);
19 
20  return m_socket->Announce(strlist);
21 }
22 
36  QStringList &/*commands*/,
37  QStringList &/*slist*/)
38 {
39  bool handled = false;
40 #if 0
41  QString command = commands[0];
42 
43  if (command == "GO_TO_SLEEP")
44  handled = HandleSleep();
45  else if (command == "SHUTDOWN_NOW")
46  handled = HandleShutdown();
47 #endif
48 
49  return handled;
50 }
bool Announce(const QStringList &new_announce)
Definition: mythsocket.cpp:466
MythCoreContext * gCoreContext
This global variable contains the MythCoreContext instance for the app.
bool HandleQuery(SocketHandler *socket, QStringList &commands, QStringList &slist) override
Dispatch query messages received from a client.
QString GetHostName(void)
bool AnnounceSocket(void) override