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
12#include "mythprotoserverexp.h"
13
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) const { return m_hostname; }
28
29 MythSocket *GetSocket(void) const { return m_socket; }
30 MythSocketManager *GetParent(void) const { 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:
40 bool m_blockShutdown { false };
41 bool m_standardEvents { false };
42 bool m_systemEvents { false };
43
44 MythSocket *m_socket { nullptr };
45 MythSocketManager *m_parent { nullptr };
46
47 QString m_hostname;
48};
49
50#endif // SOCKETHANDLER_H
Class for communcating between myth backends and frontends.
Definition: mythsocket.h:26
General purpose reference counter.
void BlockShutdown(bool block)
Definition: sockethandler.h:35
QString GetHostname(void) const
Definition: sockethandler.h:27
QString m_hostname
Definition: sockethandler.h:47
bool GetsSystemEvents(void) const
Definition: sockethandler.h:25
MythSocket * GetSocket(void) const
Definition: sockethandler.h:29
bool GetsStandardEvents(void) const
Definition: sockethandler.h:24
void AllowStandardEvents(bool allow)
Definition: sockethandler.h:36
void AllowSystemEvents(bool allow)
Definition: sockethandler.h:37
bool DoesBlockShutdown(void) const
Definition: sockethandler.h:23
MythSocketManager * GetParent(void) const
Definition: sockethandler.h:30
unsigned int uint
Definition: freesurround.h:24
#define PROTOSERVER_PUBLIC
string hostname
Definition: caa.py:17