forked from andresilvasantos/top-couchdb
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcouchdblistener.h
45 lines (32 loc) · 984 Bytes
/
couchdblistener.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
#ifndef COUCHDBLISTENER_H
#define COUCHDBLISTENER_H
#include <QObject>
#include <QNetworkReply>
class CouchDBServer;
class CouchDBListenerPrivate;
class CouchDBListener : public QObject
{
Q_OBJECT
public:
CouchDBListener(CouchDBServer *server);
virtual ~CouchDBListener();
CouchDBServer* server() const;
QString database() const;
void setDatabase(const QString& database);
QString documentID() const;
void setDocumentID(const QString& documentID);
QString revision(const QString& documentID = "") const;
void setCookieJar(QNetworkCookieJar *cookieJar);
void setParam(const QString &name, const QString &value);
void launch();
signals:
void changesMade(const QString& revision);
private slots:
void start();
void readChanges();
void listenFinished(QNetworkReply *reply);
private:
Q_DECLARE_PRIVATE(CouchDBListener)
CouchDBListenerPrivate * const d_ptr;
};
#endif // COUCHDBLISTENER_H