OSC: Check for no markers yet (crash fix)
[ardour.git] / libs / surfaces / osc / osc_cue_observer.h
index fe318c9d916418f434687c0d556bfff1b5029538..576314e04cec50975a2d6d64b278e3c534e45f5f 100644 (file)
@@ -33,7 +33,7 @@ class OSCCueObserver
 {
 
   public:
-       OSCCueObserver (boost::shared_ptr<ARDOUR::Stripable>, std::vector<boost::shared_ptr<ARDOUR::Stripable> >& sends, lo_address addr);
+       OSCCueObserver (ArdourSurface::OSC& o, ArdourSurface::OSC::OSCSurface* sur);
        ~OSCCueObserver ();
 
        boost::shared_ptr<ARDOUR::Stripable> strip () const { return _strip; }
@@ -41,16 +41,20 @@ class OSCCueObserver
        void tick (void);
        typedef std::vector<boost::shared_ptr<ARDOUR::Stripable> > Sorted;
        Sorted sends;
+       void clear_observer (void);
+       void refresh_strip (boost::shared_ptr<ARDOUR::Stripable> new_strip, Sorted new_sends, bool force);
 
   private:
 
        boost::shared_ptr<ARDOUR::Stripable> _strip;
+       ArdourSurface::OSC& _osc;
 
        PBD::ScopedConnectionList strip_connections;
        PBD::ScopedConnectionList send_connections;
 
        lo_address addr;
        std::string path;
+       ArdourSurface::OSC::OSCSurface* sur;
        float _last_meter;
        std::vector<uint32_t> gain_timeout;
        bool tick_enable;
@@ -58,12 +62,10 @@ class OSCCueObserver
 
        void name_changed (const PBD::PropertyChange& what_changed, uint32_t id);
        void send_change_message (std::string path, uint32_t id, boost::shared_ptr<PBD::Controllable> controllable);
-       void text_with_id (std::string path, uint32_t id, std::string val);
-       void send_gain_message (uint32_t id, boost::shared_ptr<PBD::Controllable> controllable);
-       void send_enabled_message (std::string path, uint32_t id, bool enabled);
-       void clear_strip (std::string path, float val);
+       void send_gain_message (uint32_t id, boost::shared_ptr<PBD::Controllable> controllable, bool force);
+       void send_enabled_message (std::string path, uint32_t id, boost::shared_ptr<ARDOUR::Processor> proc);
        void send_init (void);
-       void send_end (void);
+       void send_end (uint32_t new_sends_size);
        void send_restart (void);
 };