3#include <ossia/network/base/protocol.hpp>
4#include <ossia/network/common/complex_type.hpp>
5#include <ossia/network/common/device_parameter.hpp>
6#include <ossia/network/context_functions.hpp>
7#include <ossia/network/domain/domain.hpp>
11typedef struct _SDL_Joystick SDL_Joystick;
15class joystick_protocol_manager;
16struct joystick_event_processor;
18struct OSSIA_EXPORT joystick_info
20 static unsigned int get_joystick_count();
21 static const char* get_joystick_name(
const int index);
22 static bool get_joystick_is_gamepad(
const int index);
23 static int32_t get_joystick_id(
const int index);
24 static void write_joystick_uuid(
const int index, uint8_t* dst);
27 static std::pair<int32_t, int32_t> get_available_id_for_uid(
const uint8_t* uid);
32 friend class joystick_protocol_manager;
33 friend struct joystick_event_processor;
37 ossia::net::network_context_ptr,
const int32_t joystick_id,
38 const int joystick_index);
39 joystick_protocol(
const joystick_protocol&) =
delete;
40 joystick_protocol(joystick_protocol&&) =
delete;
41 joystick_protocol& operator=(
const joystick_protocol&) =
delete;
42 joystick_protocol& operator=(joystick_protocol&&) =
delete;
43 ~joystick_protocol()
override;
56 joystick_protocol_manager& m_manager;
57 joystick_event_processor& m_processor;
58 ossia::net::network_context_ptr m_ctx{};
62 std::vector<device_parameter*> m_axis_parameters;
63 std::vector<device_parameter*> m_hat_parameters;
64 std::vector<device_parameter*> m_ball_parameters;
65 std::vector<device_parameter*> m_button_parameters;
67 int32_t m_joystick_id{};
68 SDL_Joystick* m_joystick{};
Root of a device tree.
Definition ossia/network/base/device.hpp:58
The node_base class.
Definition node.hpp:48
The parameter_base class.
Definition ossia/network/base/parameter.hpp:48
The protocol_base class.
Definition protocol.hpp:40
The value class.
Definition value.hpp:173
Full information about a parameter.
Definition parameter_data.hpp:61