summaryrefslogtreecommitdiffstats
path: root/messageengine.h
diff options
context:
space:
mode:
Diffstat (limited to 'messageengine.h')
-rw-r--r--messageengine.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/messageengine.h b/messageengine.h
index b682ec5..4639c97 100644
--- a/messageengine.h
+++ b/messageengine.h
@@ -19,6 +19,7 @@
#include <memory>
#include <atomic>
+#include <mutex>
#include <QUrl>
#include <QWebSocket>
@@ -28,7 +29,7 @@ class MessageEngine : public QObject
{
Q_OBJECT
public:
- explicit MessageEngine(const QUrl &url, QObject *parent = Q_NULLPTR);
+ explicit MessageEngine(const QUrl &url);
bool sendMessage(std::unique_ptr<Message> message);
Q_SIGNALS:
@@ -43,9 +44,11 @@ class MessageEngine : public QObject
private:
QWebSocket m_websocket;
+ std::mutex m_mutex;
QMap<qint32, QByteArray> m_calls;
QUrl m_url;
std::atomic<unsigned int> m_callid;
+ friend class MessageEngineFactory;
};
#endif // MESSAGEENGINE_H