MythTV  master
socketrequesthandler.h
Go to the documentation of this file.
1 #ifndef SOCKETREQUESTHANDLER_H
2 #define SOCKETREQUESTHANDLER_H
3 
4 #include <QString>
5 
6 #include "mythsocket.h"
7 #include "mythprotoserverexp.h"
8 #include "sockethandler.h"
9 
10 class MythSocketManager;
11 
13 {
14  Q_OBJECT
15  public:
16  SocketRequestHandler() = default;
17  ~SocketRequestHandler() override = default;
18 
19  virtual bool HandleAnnounce(MythSocket */*socket*/, QStringList &/*commands*/,
20  QStringList &/*slist*/)
21  { return false; }
22  virtual bool HandleQuery(SocketHandler */*socket*/, QStringList &/*commands*/,
23  QStringList &/*slist*/)
24  { return false; }
25  virtual QString GetHandlerName(void) { return "BASE"; }
26  virtual void connectionAnnounced(MythSocket */*socket*/, QStringList &/*commands*/,
27  QStringList &/*slist*/) { }
28  virtual void connectionClosed(MythSocket */*socket*/) { }
29  virtual void SetParent(MythSocketManager *parent) { m_parent = parent; }
30  MythSocketManager *GetParent(void) { return m_parent; }
31 
32  protected:
33  MythSocketManager *m_parent { nullptr };
34 };
35 
36 #endif // SOCKETREQUESTHANDLER_H
SocketRequestHandler::GetParent
MythSocketManager * GetParent(void)
Definition: socketrequesthandler.h:30
SocketRequestHandler::GetHandlerName
virtual QString GetHandlerName(void)
Definition: socketrequesthandler.h:25
SocketRequestHandler::connectionClosed
virtual void connectionClosed(MythSocket *)
Definition: socketrequesthandler.h:28
MythSocketManager
Definition: mythsocketmanager.h:34
MythSocket
Class for communcating between myth backends and frontends.
Definition: mythsocket.h:26
SocketRequestHandler::connectionAnnounced
virtual void connectionAnnounced(MythSocket *, QStringList &, QStringList &)
Definition: socketrequesthandler.h:26
mythprotoserverexp.h
sockethandler.h
SocketRequestHandler::SetParent
virtual void SetParent(MythSocketManager *parent)
Definition: socketrequesthandler.h:29
SocketRequestHandler::HandleQuery
virtual bool HandleQuery(SocketHandler *, QStringList &, QStringList &)
Definition: socketrequesthandler.h:22
PROTOSERVER_PUBLIC
#define PROTOSERVER_PUBLIC
Definition: mythprotoserverexp.h:9
SocketRequestHandler::HandleAnnounce
virtual bool HandleAnnounce(MythSocket *, QStringList &, QStringList &)
Definition: socketrequesthandler.h:19
SocketHandler
Definition: sockethandler.h:16
SocketRequestHandler
Definition: socketrequesthandler.h:12
mythsocket.h