summaryrefslogtreecommitdiffstats
path: root/pica-client/nodethread.h
diff options
context:
space:
mode:
Diffstat (limited to 'pica-client/nodethread.h')
-rw-r--r--pica-client/nodethread.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/pica-client/nodethread.h b/pica-client/nodethread.h
new file mode 100644
index 0000000..1d17fda
--- /dev/null
+++ b/pica-client/nodethread.h
@@ -0,0 +1,40 @@
+#ifndef NODETHREAD_H
+#define NODETHREAD_H
+
+#include <QThread>
+#include <QMutex>
+#include "nodes.h"
+#include "../PICA_client.h"
+#include "accounts.h"
+
+
+class NodeThread : public QThread
+{
+ Q_OBJECT
+public:
+ explicit NodeThread( Nodes::NodeRecord &addr, bool *completed,Accounts::AccountRecord &acc,struct PICA_conninfo **pica_conn, QMutex *wm);
+ void CloseThread();
+private:
+ void run();
+ static QMutex finished_mutex;
+
+ QMutex *write_mutex;
+
+ bool *finished_flag;
+ Nodes::NodeRecord node_addr;
+ struct PICA_conninfo *ci;
+ Accounts::AccountRecord user_account;
+ struct PICA_conninfo **connection;
+
+ int exit;
+
+
+signals:
+ void NodeStatusChanged(QString addr, quint16 port, bool alive);
+ void ConnectedToNode(QString addr, quint16 port, NodeThread *thread);
+
+public slots:
+
+};
+
+#endif // NODETHREAD_H