mirror of
https://github.com/YACReader/yacreader
synced 2025-07-22 15:04:40 -04:00
incoming connections to local server are now proccessed in threads
This commit is contained in:
@ -2,27 +2,43 @@
|
||||
#define YACREADER_LOCAL_SERVER_H
|
||||
|
||||
#include <QObject>
|
||||
#include <QThread>
|
||||
|
||||
class QLocalServer;
|
||||
class QLocalSocket;
|
||||
class ComicDB;
|
||||
|
||||
class YACReaderLocalServer : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit YACReaderLocalServer(QObject *parent = 0);
|
||||
|
||||
explicit YACReaderLocalServer(QObject *parent = 0);
|
||||
|
||||
signals:
|
||||
void comicUpdated(quint64 libraryId, const ComicDB & comic);
|
||||
void comicUpdated(quint64 libraryId, const ComicDB & comic);
|
||||
public slots:
|
||||
bool isListening();
|
||||
void sendResponse();
|
||||
bool isListening();
|
||||
void sendResponse();
|
||||
static bool isRunning();
|
||||
private:
|
||||
QLocalServer * localServer;
|
||||
|
||||
};
|
||||
|
||||
class YACReaderClientConnectionWorker : public QThread
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
YACReaderClientConnectionWorker( QLocalSocket *clientConnection);
|
||||
signals:
|
||||
void comicUpdated(quint64 libraryId, const ComicDB & comic);
|
||||
private:
|
||||
void run();
|
||||
|
||||
void getComicInfo(quint64 libraryId, ComicDB & comic, QList<ComicDB> & sibling);
|
||||
void updateComic(quint64 libraryId, ComicDB & comic);
|
||||
private:
|
||||
QLocalServer * localServer;
|
||||
|
||||
|
||||
QLocalSocket *clientConnection;
|
||||
};
|
||||
|
||||
#endif // YACREADER_LOCAL_SERVER_H
|
||||
|
Reference in New Issue
Block a user