| 8 | #include <QtCore/QUrl> |
| 9 | |
| 10 | RrupDevice::RrupDevice(const QString& address, int port, QObject* parent) |
| 11 | : QObject(parent), |
| 12 | command(RrupDevice::NONE), port(port), state(RrupDevice::ExpectingHeader), connected(false), address(address) |
| 13 | { |
| 14 | this->socket = new QTcpSocket(this); |
| 15 | |
| 16 | this->decoder = new QTextDecoder(QTextCodec::codecForName("UTF-8")); |
| 17 | |
| 18 | QObject::connect(this->socket, SIGNAL(readyRead()), this, SLOT(readMessage())); |
| 19 | QObject::connect(this->socket, SIGNAL(connected()), this, SLOT(setConnected())); |
| 20 | QObject::connect(this->socket, SIGNAL(disconnected()), this, SLOT(setDisconnected())); |
| 21 | } |
| 22 | |
| 23 | RrupDevice::~RrupDevice() |
| 24 | { |
nothing calls this directly
no outgoing calls
no test coverage detected