tweak Stateful/StatefulDiffCommand changes so that SessionObject's actually get a...
[ardour.git] / libs / ardour / ardour / ticker.h
index f87bca665d15b2a5e65c156c5b3ea6ea3201517c..e133ad5d237fe6a19a0b6427fa3e1fbcafef7a56 100644 (file)
     $Id$
 */
 
-#include <sigc++/sigc++.h>
 
-#include "ardour/types.h"
 #include "midi++/jack.h"
+#include "pbd/signals.h"
+
+#include "ardour/types.h"
+#include "ardour/session_handle.h"
+
 
 #ifndef TICKER_H_
 #define TICKER_H_
@@ -31,22 +34,18 @@ namespace ARDOUR
 
 class Session;
 
-class Ticker : public sigc::trackable
+class Ticker : public SessionHandlePtr
 {
 public:
-       Ticker() : _session(0) {};
-       virtual ~Ticker() {};
+       Ticker() {};
+       virtual ~Ticker() {}
 
        virtual void tick(
                const nframes_t& transport_frames,
                const BBT_Time& transport_bbt,
-               const SMPTE::Time& transport_smpte) = 0;
-
-       virtual void set_session(Session& s);
-       virtual void going_away() { _session = 0; }
+               const Timecode::Time& transport_timecode) = 0;
 
-protected:
-       Session* _session;
+       void set_session (Session* s);
 };
 
 class MidiClockTicker : public Ticker
@@ -68,10 +67,10 @@ public:
        void tick(
                const nframes_t& transport_frames,
                const BBT_Time& transport_bbt,
-               const SMPTE::Time& transport_smpte);
+               const Timecode::Time& transport_timecode);
 
-       void set_session(Session& s);
-       void going_away() { _midi_port = 0; Ticker::going_away(); }
+       void set_session (Session* s);
+       void session_going_away();
 
        /// slot for the signal session::MIDIClock_PortChanged
        void update_midi_clock_port();