summaryrefslogtreecommitdiff
path: root/hostmanagerconn.h
blob: ab143a0545c7271efb4be2b957ef96966364006d (plain)
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
31
32
33
#ifndef HOSTMANAGERPEER_H
#define HOSTMANAGERPEER_H

#include <QtCore/QVariant>
#include "sapconnection.h"
#include "sapsocket.h"

class HostManagerConn : public QObject
{
	Q_OBJECT

public:
	HostManagerConn(SAPConnection *conn, QObject *parent = 0);

private:
	void sendMessage(const QString &json);
	void sendMessage(const QVariantMap &msg);
	void handleMessage(const QVariantMap &msg);

	void performTimeSync();

	QString generateHostXml();

private slots:
	void handleConnected();
	void handleMessageReceived();

private:
	SAPConnection *_conn;
	SAPSocket *_socket;
};

#endif // HOSTMANAGERPEER_H