MythTV  master
sockethandler.h
Go to the documentation of this file.
1 // -*- Mode: c++ -*-
2 
3 #ifndef SOCKETHANDLER_H
4 #define SOCKETHANDLER_H
5 
6 #include <QString>
7 #include <QMutex>
8 #include <QStringList>
9 
10 #include "mythsocket.h"
11 #include "referencecounter.h"
12 #include "mythprotoserverexp.h"
13 
14 class MythSocketManager;
15 
17 {
18  public:
20  QString hostname);
21  ~SocketHandler() override;
22 
23  bool DoesBlockShutdown(void) const { return m_blockShutdown; }
24  bool GetsStandardEvents(void) const { return m_standardEvents; }
25  bool GetsSystemEvents(void) const { return m_systemEvents; }
26 
27  QString GetHostname(void) { return m_hostname; }
28 
29  MythSocket *GetSocket(void) { return m_socket; }
30  MythSocketManager *GetParent(void) { return m_parent; }
31 
32  bool WriteStringList(const QStringList &strlist);
33  bool SendReceiveStringList(QStringList &strlist, uint min_reply_length=0);
34 
35  void BlockShutdown(bool block) { m_blockShutdown = block; }
36  void AllowStandardEvents(bool allow){ m_standardEvents = allow; }
37  void AllowSystemEvents(bool allow) { m_systemEvents = allow; }
38 
39  private:
43 
46 
47  QString m_hostname;
48 };
49 
50 #endif // SOCKETHANDLER_H
SocketHandler::AllowStandardEvents
void AllowStandardEvents(bool allow)
Definition: sockethandler.h:36
SocketHandler::GetParent
MythSocketManager * GetParent(void)
Definition: sockethandler.h:30
MythSocketManager
Definition: mythsocketmanager.h:35
SocketHandler::GetsSystemEvents
bool GetsSystemEvents(void) const
Definition: sockethandler.h:25
MythSocket
Class for communcating between myth backends and frontends.
Definition: mythsocket.h:27
SocketHandler::m_socket
MythSocket * m_socket
Definition: sockethandler.h:44
SocketHandler::GetSocket
MythSocket * GetSocket(void)
Definition: sockethandler.h:29
mythprotoserverexp.h
SocketHandler::m_systemEvents
bool m_systemEvents
Definition: sockethandler.h:42
uint
unsigned int uint
Definition: compat.h:140
PROTOSERVER_PUBLIC
#define PROTOSERVER_PUBLIC
Definition: mythprotoserverexp.h:9
referencecounter.h
SocketHandler::m_blockShutdown
bool m_blockShutdown
Definition: sockethandler.h:40
SocketHandler::GetHostname
QString GetHostname(void)
Definition: sockethandler.h:27
SocketHandler::m_parent
MythSocketManager * m_parent
Definition: sockethandler.h:45
SocketHandler::m_hostname
QString m_hostname
Definition: sockethandler.h:47
SocketHandler::DoesBlockShutdown
bool DoesBlockShutdown(void) const
Definition: sockethandler.h:23
SocketHandler::BlockShutdown
void BlockShutdown(bool block)
Definition: sockethandler.h:35
SocketHandler
Definition: sockethandler.h:17
SocketHandler::GetsStandardEvents
bool GetsStandardEvents(void) const
Definition: sockethandler.h:24
musicbrainzngs.caa.hostname
string hostname
Definition: caa.py:17
SocketHandler::AllowSystemEvents
void AllowSystemEvents(bool allow)
Definition: sockethandler.h:37
SocketHandler::m_standardEvents
bool m_standardEvents
Definition: sockethandler.h:41
mythsocket.h
ReferenceCounter
General purpose reference counter.
Definition: referencecounter.h:27