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