#include "pbd/stateful.h"
#include "pbd/signals.h"
+#include "control_protocol/visibility.h"
#include "control_protocol/basic_ui.h"
#include "control_protocol/types.h"
-#include "ardour/visibility.h"
-
-#ifdef ARDOURSURFACE_DLL_EXPORTS // defined if we are building the ARDOUR surface DLLs (instead of using them)
- #define ARDOURSURFACE_API LIBARDOUR_HELPER_DLL_EXPORT
-#else
- #define ARDOURSURFACE_API LIBARDOUR_HELPER_DLL_IMPORT
-#endif
-#define ARDOURSURFACE_LOCAL LIBARDOUR_HELPER_DLL_LOCAL
-
namespace ARDOUR {
class Route;
class Session;
class Bundle;
-class ARDOURSURFACE_API ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI
+class LIBCONTROLCP_API ControlProtocol : public PBD::Stateful, public PBD::ScopedConnectionList, public BasicUI
{
public:
ControlProtocol (Session&, std::string name);
std::string name() const { return _name; }
- virtual int set_active (bool yn) = 0;
- bool get_active() const { return _active; }
+ virtual int set_active (bool yn);
+ bool active() const { return _active; }
virtual int set_feedback (bool /*yn*/) { return 0; }
virtual bool get_feedback () const { return false; }
virtual void* get_gui() const { return 0; }
virtual void tear_down_gui() { }
+ XMLNode& get_state ();
+ int set_state (XMLNode const &, int version);
+
+ static const std::string state_node_name;
+
protected:
std::vector<boost::shared_ptr<ARDOUR::Route> > route_table;
std::string _name;
- bool _active;
void next_track (uint32_t initial_id);
void prev_track (uint32_t initial_id);
private:
- ARDOURSURFACE_LOCAL ControlProtocol (const ControlProtocol&); /* noncopyable */
+ LIBCONTROLCP_LOCAL ControlProtocol (const ControlProtocol&); /* noncopyable */
+ bool _active;
};
extern "C" {