QCAD
Open Source 2D CAD
Loading...
Searching...
No Matches
RLocalPeer.h
Go to the documentation of this file.
1
20#ifndef RLOCALPEER_H
21#define RLOCALPEER_H
22
23#include "core_global.h"
24
25#include "RLockedFile.h"
26
27class QLocalServer;
28
29class QCADCORE_EXPORT RLocalPeer : public QObject {
30 Q_OBJECT
31
32public:
33 RLocalPeer(QObject* parent=0, const QString& appId = QString());
34 bool isClient();
35 bool sendMessage(const QString &message, int timeout);
36 QString applicationId() const {
37 return id;
38 }
39
40signals:
41 void messageReceived(const QString& message);
42
43protected slots:
44 void receiveConnection();
45
46protected:
47 QString id;
48 QString socketName;
49 QLocalServer* server;
51
52private:
53 static const char* ack;
54};
55
56#endif
Definition RLocalPeer.h:29
RLockedFile lockFile
Definition RLocalPeer.h:50
static const char * ack
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RLocalPeer.h:53
QString id
Definition RLocalPeer.h:47
QLocalServer * server
Definition RLocalPeer.h:49
QString applicationId() const
Definition RLocalPeer.h:36
QString socketName
Definition RLocalPeer.h:48
void messageReceived(const QString &message)
Copyright (c) 2011-2018 by Andrew Mustun.
Definition RLockedFile.h:31
#define QCADCORE_EXPORT
Definition core_global.h:10