zmidimap/include/device.hpp
zawz 1c8c3ac9d2 v1.3 : added auto file reloading
+ Files now auto reload when changes are detected
+ Added --no-reload option to disable auto reloading
* Internal cleanups
2019-09-26 11:42:11 +02:00

44 lines
843 B
C++

#ifndef DEVICE_HPP
#define DEVICE_HPP
#include <string>
#include <vector>
#include <thread>
#include "command.hpp"
#include <ztd/filedat.hpp>
class Device
{
public:
Device();
virtual ~Device();
bool start_loop();
void run_signal(char* buff);
bool import_chunk(ztd::chunkdat const& ch);
ztd::chunkdat export_chunk();
std::string name;
int client_id;
bool busy;
uint32_t nb_command;
std::vector<NoteCommand> noteCommands[128];
std::vector<ControllerCommand> ctrlCommands[128];
std::vector<PitchCommand> pitchCommands;
std::vector<SystemCommand> sysCommands;
std::vector<ConnectCommand> connectCommands;
std::vector<DisconnectCommand> disconnectCommands;
pid_t thread_pid;
private:
static void loop(Device* dev);
};
extern std::vector<Device*> device_list;
void clean_devices();
#endif //DEVICE_HPP