2018-04-09 22:59:19 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QThread>
|
|
|
|
|
|
|
|
namespace chatterino {
|
|
|
|
namespace singletons {
|
|
|
|
|
|
|
|
class NativeMessagingManager
|
|
|
|
{
|
2018-04-28 15:20:18 +02:00
|
|
|
public:
|
2018-04-09 22:59:19 +02:00
|
|
|
NativeMessagingManager();
|
|
|
|
|
2018-04-27 22:11:19 +02:00
|
|
|
~NativeMessagingManager() = delete;
|
2018-04-09 22:59:19 +02:00
|
|
|
|
|
|
|
class ReceiverThread : public QThread
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
void run() override;
|
2018-04-12 01:17:25 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
void handleMessage(const QJsonObject &root);
|
2018-04-09 22:59:19 +02:00
|
|
|
};
|
|
|
|
|
2018-04-12 00:09:16 +02:00
|
|
|
void writeByteArray(QByteArray a);
|
2018-04-09 22:59:19 +02:00
|
|
|
void registerHost();
|
|
|
|
void openGuiMessageQueue();
|
|
|
|
void sendToGuiProcess(const QByteArray &array);
|
|
|
|
};
|
|
|
|
|
|
|
|
} // namespace singletons
|
|
|
|
} // namespace chatterino
|