MCPcopy Create free account
hub / github.com/BaseXdb/basex / BaseXThread

Class BaseXThread

basex-api/src/main/qt/basexthread.h:9–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7#include <QtNetwork>
8
9class BaseXThread : public QThread
10{
11 Q_OBJECT
12public:
13 explicit BaseXThread(QString &host, quint16 port, QObject *parent = 0);
14 ~BaseXThread();
15
16 int addRequest(QString request);
17 void run();
18
19
20signals:
21 void newResult(const QByteArray *res);
22 void socketError(int socketError, const QString &message);
23 void error(int error, const QString &message);
24private:
25 QString hostName;
26 quint16 port;
27 QMutex mutex;
28 QWaitCondition cond;
29 bool quit;
30 bool firstRun;
31
32 QString dbuser;
33 QString dbpasswd;
34 QQueue<QString> requestQueue;
35
36 QByteArray END_RES;
37 QByteArray RES_FAIL;
38
39 QTcpSocket *socket;
40
41 bool connectToBasex();
42 const int Timeout;
43
44};
45
46#endif // BASEXTHREAD_H

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected