summaryrefslogtreecommitdiffstats
path: root/daemon/Listener.h
blob: 065cf77ab5ed37980ba29e485933864dac0d1944 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#ifndef LISTENER_H
#define LISTENER_H

#include "Controller.h"
#include "TitleInformation.h"

#include <QObject>
#include <QTcpServer>

class Listener : public QObject
{
	Q_OBJECT
public:
	Listener(QObject *parent = 0);
	bool start(const QHostAddress &address, quint16 port);

private:
	QTcpServer m_server;
	Controller m_controller;
	const QChar SPACER;
	const QLatin1String MULTIENTRY;
	const QLatin1String MULTILINE;

private slots:
	void newConnection();
	void readyRead();

};

#endif // LISTENER_H