summaryrefslogtreecommitdiff
path: root/libs/surfaces/powermate/powermate.h
blob: d03fb1fce4320e87fd1d56ce69099c479b7afd21 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef ardour_powermate_h
#define ardour_powermate_h

#include <sys/time.h>
#include <pthread.h>

#include "control_protocol/control_protocol.h"

class PowermateControlProtocol : public ARDOUR::ControlProtocol
{
  public:
	PowermateControlProtocol (ARDOUR::Session&);
	virtual ~PowermateControlProtocol();

	int set_active (bool yn);
	static bool probe ();

	XMLNode& get_state ();
	int set_state (const XMLNode&, int version = 3000);

  private:
	
	static void* SerialThreadEntry (void* arg);
	void* SerialThread ();
	
	void	ProcessEvent(struct input_event *ev);
	
	int			mPort;
	pthread_t		mThread;

};


#endif