34 lines
724 B
C++
34 lines
724 B
C++
//
|
|
// Created by rhetenor on 27.11.18.
|
|
//
|
|
|
|
#ifndef FLIPPR_DRIVER_INPUTSOCKETHANDLER_H
|
|
#define FLIPPR_DRIVER_INPUTSOCKETHANDLER_H
|
|
|
|
#include "SocketHandler.h"
|
|
|
|
#include "input/EventHandler.h"
|
|
|
|
#include <string>
|
|
|
|
namespace flippR_driver
|
|
{
|
|
namespace utility
|
|
{
|
|
class InputSocketHandler : public SocketHandler, public input::EventHandler
|
|
{
|
|
public:
|
|
explicit InputSocketHandler(boost::asio::io_service &service, std::string socket_file = "/var/run/user/" + std::to_string(getuid())
|
|
+ "flippR/S.flippR_input");
|
|
|
|
void handle(input::Event &event) override;
|
|
|
|
private:
|
|
nlohmann::json serialize_event(input::Event &event);
|
|
|
|
};
|
|
}
|
|
}
|
|
|
|
#endif //FLIPPR_DRIVER_INPUTSOCKETHANDLER_H
|