Files
qcma/clientmanager.h
codestation 92f4572814 Make sure that BaseWorker deletes the thread when is finished.
Implemented ClientManager so it can manage the usb and wireless threads.
Impelmented better mutex logic on CmaClient.
Execute the cma events in a different thread so the event listener is
available.
Code refactoring.
Fix memory leaks in threads.
Updated readme.
2013-08-25 01:40:14 -04:30

38 lines
602 B
C++

#ifndef CLIENTMANAGER_H
#define CLIENTMANAGER_H
#include "database.h"
#include <QObject>
#include <QThread>
class ClientManager : public QObject
{
Q_OBJECT
public:
explicit ClientManager(QObject *parent = 0);
void start();
void stop();
private:
int thread_count;
QMutex mutex;
Database db;
QThread *usb_thread;
QThread *wireless_thread;
signals:
void deviceConnected(QString);
void deviceDisconnected();
void receivedPin(int);
void stopped();
private slots:
void refreshDatabase();
void threadStopped();
};
#endif // CLIENTMANAGER_H