#ifndef SOCKETCLIENT_H
#define SOCKETCLIENT_H

#include "event.h"
#include <string>
#include <functional>


class SocketClient
{
public:
    SocketClient();
    ~SocketClient();

    void setEventCallback(std::function<void(Event)> fun){ sendEvent = fun; }
    void receiveEvent();
    bool isConnected();

private:
    std::function<void(Event)> sendEvent = nullptr;

    bool connectToServer();

    void printfPinchEvent(const PinchGestureEvent &e);
    void printfSwipeEvent(const SwipeGestureEvent &e);

    int m_socket;
};

#endif // SOCKETCLIENT_H
