mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-21 22:24:07 +01:00
1043f9f803
* refactor: remove unnecessary includes in headers * fix: formatting * chore: changelog * fix: scrollbar * fix: suggestions and old appbase remains * fix: suggestion * fix: missing Qt forward declarations * fix: another qt include * fix: includes for precompiled-headers=off * Add missing `<memory>` includes * Add missing `#pragma once` * Fix tests Co-authored-by: Rasmus Karlsson <rasmus.karlsson@pajlada.com>
44 lines
734 B
C++
44 lines
734 B
C++
#pragma once
|
|
|
|
#include "common/Atomic.hpp"
|
|
|
|
#include <boost/optional.hpp>
|
|
#include <QString>
|
|
#include <QThread>
|
|
|
|
namespace chatterino {
|
|
|
|
class Application;
|
|
class Paths;
|
|
|
|
void registerNmHost(Paths &paths);
|
|
std::string &getNmQueueName(Paths &paths);
|
|
|
|
Atomic<boost::optional<QString>> &nmIpcError();
|
|
|
|
class NativeMessagingClient final
|
|
{
|
|
public:
|
|
void sendMessage(const QByteArray &array);
|
|
void writeToCout(const QByteArray &array);
|
|
};
|
|
|
|
class NativeMessagingServer final
|
|
{
|
|
public:
|
|
void start();
|
|
|
|
private:
|
|
class ReceiverThread : public QThread
|
|
{
|
|
public:
|
|
void run() override;
|
|
|
|
private:
|
|
void handleMessage(const QJsonObject &root);
|
|
};
|
|
|
|
ReceiverThread thread;
|
|
};
|
|
|
|
} // namespace chatterino
|