Moved conection logic from Qcma/ListenerWorker to CmaServer/CmaClient.
Added tray icon. Quit now really quits the application.
This commit is contained in:
45
cmaserver.h
Normal file
45
cmaserver.h
Normal file
@@ -0,0 +1,45 @@
|
||||
#ifndef CMASERVER_H
|
||||
#define CMASERVER_H
|
||||
|
||||
#include "wirelessworker.h"
|
||||
|
||||
extern "C" {
|
||||
#include <vitamtp.h>
|
||||
}
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#include <QObject>
|
||||
#include <QTimer>
|
||||
#include <QThread>
|
||||
#include <QWaitCondition>
|
||||
|
||||
class CmaServer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CmaServer(QObject *parent = 0);
|
||||
void listen();
|
||||
void close();
|
||||
|
||||
int num_retries;
|
||||
QTimer timer;
|
||||
QThread *thread;
|
||||
char hostname[256];
|
||||
BroadcastSignal broadcast;
|
||||
|
||||
signals:
|
||||
void newConnection(vita_device_t *);
|
||||
void createdPin(int);
|
||||
void finished();
|
||||
|
||||
public slots:
|
||||
void continueProcess();
|
||||
void stopProcess();
|
||||
|
||||
private slots:
|
||||
void connectWireless();
|
||||
void connectUsb();
|
||||
};
|
||||
|
||||
#endif // CMASERVER_H
|
Reference in New Issue
Block a user