#ifndef mackie_port_h
#define mackie_port_h
-#include "surface_port.h"
-
#include <midi++/types.h>
-#include <sigc++/signal.h>
-#include <sigc++/connection.h>
-
#include <glibmm/thread.h>
+#include "pbd/signals.h"
+
+#include "surface_port.h"
#include "midi_byte_array.h"
#include "types.h"
virtual const MidiByteArray & sysex_hdr() const;
/// Handle device initialisation
- void handle_midi_sysex( MIDI::Parser &, MIDI::byte *, size_t );
+ void handle_midi_sysex( MIDI::Parser &, MIDI::byte *, size_t count );
/// Handle all control messags
- void handle_midi_any( MIDI::Parser &, MIDI::byte *, size_t );
+ void handle_midi_any( MIDI::Parser &, MIDI::byte *, size_t count );
- Control & lookup_control( const MidiByteArray & bytes );
+ Control & lookup_control( MIDI::byte *, size_t count );
/// return the number of strips associated with this port
virtual int strips() const;
emulation_t emulation() const { return _emulation; }
+ /// Connect the any signal from the parser to handle_midi_any
+ /// unless it's already connected
+ void connect_any();
+
protected:
/**
The initialisation sequence is fairly complex. First a lock is acquired
*/
void probe_emulation( const MidiByteArray & bytes );
+ /// Handle timeout events set for controls that don't emit
+ /// an off event
+ bool handle_control_timeout_event ( Control * );
+
private:
MackieControlProtocol & _mcp;
port_type_t _port_type;
- sigc::connection _any;
- sigc::connection _sysex;
+ PBD::ScopedConnection any_connection;
+ PBD::ScopedConnection sysex_connection;
emulation_t _emulation;
bool _initialising;