MythTV master
sockethandler.cpp
Go to the documentation of this file.
1#include <QStringList>
2#include <utility>
3
4#include "sockethandler.h"
5
7 QString hostname) :
8 ReferenceCounter("SocketHandler"),
9 m_socket(sock), m_parent(parent),
10 m_hostname(std::move(hostname))
11{
12 if (m_socket)
14}
15
17{
18 if (m_socket)
19 {
21 m_socket = nullptr;
22 }
23}
24
25bool SocketHandler::WriteStringList(const QStringList &strlist)
26{
27 if (!m_socket)
28 return false;
29
30 return m_socket->WriteStringList(strlist);
31}
32
33bool SocketHandler::SendReceiveStringList(QStringList &strlist,
34 uint min_reply_length)
35{
36 if (!m_socket)
37 return false;
38
39 return m_socket->SendReceiveStringList(strlist, min_reply_length);
40}
Class for communcating between myth backends and frontends.
Definition: mythsocket.h:26
bool SendReceiveStringList(QStringList &list, uint min_reply_length=0, std::chrono::milliseconds timeoutMS=kLongTimeout)
Definition: mythsocket.cpp:326
bool WriteStringList(const QStringList &list)
Definition: mythsocket.cpp:301
General purpose reference counter.
virtual int DecrRef(void)
Decrements reference count and deletes on 0.
virtual int IncrRef(void)
Increments reference count.
SocketHandler(MythSocket *sock, MythSocketManager *parent, QString hostname)
~SocketHandler() override
MythSocket * m_socket
Definition: sockethandler.h:44
bool WriteStringList(const QStringList &strlist)
bool SendReceiveStringList(QStringList &strlist, uint min_reply_length=0)
unsigned int uint
Definition: freesurround.h:24
string hostname
Definition: caa.py:17
STL namespace.