-
Notifications
You must be signed in to change notification settings - Fork 0
/
poller.h
48 lines (41 loc) · 1.05 KB
/
poller.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#ifndef POLLER_H
#define POLLER_H
#include <QObject>
#include "libmaia/xmlRPCTextServer.h"
#include "databasehandler.h"
/**
* @brief The Poller class is responsible to poll the web interface to see
* if any action is required.
*/
class Poller : public QObject
{
Q_OBJECT
private:
XmlRPCTextServer* server;
DatabaseHandler* qSql;
static Poller* instance;
explicit Poller(QObject *parent = 0);
public:
static Poller* getInstance();
private slots:
/**
* @brief fetchXmlRPC fetches the last XMLRPC request from the database
*/
void fetchXmlRPC();
void run();
public slots:
/**
* @brief setUid is an available XMLRPC method that the web interface can access using XMLRPC.
* This is used to set the uid of the application user.
* @param uid
* @return
*/
bool setUid(QString uid);
/**
* @brief bonjourChanged XMLRPC when bonjour record has changed, emits bonjourChanged
*/
bool emitBonjourChanged(QString teststr);
signals:
void bonjourChanged();
};
#endif // POLLER_H