Remove redundant view <-> model value mapping stuff from AudioRegionGainLine.
[ardour.git] / gtk2_ardour / imageframe_socket_handler.h
index 93a82b63bb88a2da12b1504577ca145ca0dbde10..3a87f5bf718e446a2267e37fa9bbe0acc4e97c55 100644 (file)
     along with this program; if not, write to the Free Software
     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
-    $Id$
 */
 
 #ifndef __ardour_gtk_imageframe_socket_handler_h__
 #define __ardour_gtk_imageframe_socket_handler_h__
 
 #include <string>
-#include <gtk--.h>
 #include <list>
 #include "editor.h"
 #include "ardour_image_compositor_socket.h"
@@ -38,7 +36,7 @@ class ImageFrameTimeAxisGroup ;
  * message passing through a socket.
  *
  */
-class ImageFrameSocketHandler : public SigC::Object
+class ImageFrameSocketHandler : public sigc::trackable
 {
        public:
                /**
@@ -78,7 +76,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @return true if the connection was a succees
                 *         false otherwise
                 */
-               bool connect(std::string hostIp, int32_t port) ;
+               bool connect(const char * hostIp, int32_t port) ;
                
                /**
                 * Closes the connection to th Image Compositor
@@ -129,7 +127,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param track_id the unique id of the removed image frame time axis
                 * @param src the identity of the object that initiated the change
                 */
-               void send_imageframe_time_axis_removed(std::string track_id, void* src) ;
+               void send_imageframe_time_axis_removed(const string & track_id, void* src) ;
                
                /**
                 * Sends a message indicating that an ImageFrameTimeAxis has been renamed
@@ -139,7 +137,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param src the identity of the object that initiated the change
                 * @param time_axis the time axis that has changed
                 */
-               void send_imageframe_time_axis_renamed(std::string new_id, std::string old_id, void* src, ImageFrameTimeAxis* time_axis) ;
+               void send_imageframe_time_axis_renamed(const string & new_id, const string & old_id, void* src, ImageFrameTimeAxis* time_axis) ;
                
                //------------------------
                // MarkerTimeAxis Messages
@@ -150,7 +148,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param track_id the unique id of the removed image frame time axis
                 * @param src the identity of the object that initiated the change
                 */
-               void send_marker_time_axis_removed(std::string track_id, void* src) ;
+               void send_marker_time_axis_removed(const string & track_id, void* src) ;
                
                /**
                 * Sends a message indicating that an MarkerTimeAxis has been renamed
@@ -160,7 +158,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param src the identity of the object that initiated the change
                 * @param time_axis the time axis that has changed
                 */
-               void send_marker_time_axis_renamed(std::string new_id, std::string old_id, void* src, MarkerTimeAxis* time_axis) ;
+               void send_marker_time_axis_renamed(const string & new_id, const string & old_id, void* src, MarkerTimeAxis* time_axis) ;
                
                
                //---------------------------------
@@ -173,7 +171,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param src the identity of the object that initiated the change
                 * @param group the group that has changed
                 */
-               void send_imageframe_time_axis_group_removed(std::string group_id, void* src, ImageFrameTimeAxisGroup* group) ;
+               void send_imageframe_time_axis_group_removed(const string & group_id, void* src, ImageFrameTimeAxisGroup* group) ;
                
                /**
                 * Send a message indicating that an ImageFrameTimeAxisGroup has been renamed
@@ -183,7 +181,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param src the identity of the object that initiated the change
                 * @param group the group that has changed
                 */
-               void send_imageframe_time_axis_group_renamed(std::string new_id, std::string old_id, void* src, ImageFrameTimeAxisGroup* group) ;
+               void send_imageframe_time_axis_group_renamed(const string & new_id, const string & old_id, void* src, ImageFrameTimeAxisGroup* group) ;
 
 
                //---------------------------------
@@ -196,7 +194,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param src the identity of the object that initiated the change
                 * @param item the time axis item whos position has changed
                 */
-               void send_imageframe_view_position_change(jack_nframes_t pos, void* src, ImageFrameView* item) ;
+               void send_imageframe_view_position_change(nframes_t pos, void* src, ImageFrameView* item) ;
                
                /**
                 * Send a Image Frame View item duration changed message
@@ -205,7 +203,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param src the identity of the object that initiated the change
                 * @param item the item which has had a duration change
                 */
-               void send_imageframe_view_duration_change(jack_nframes_t dur, void* src, ImageFrameView* item) ;
+               void send_imageframe_view_duration_change(nframes_t dur, void* src, ImageFrameView* item) ;
                
                /**
                 * Send a message indicating that an ImageFrameView has been renamed
@@ -214,7 +212,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param src the identity of the object that initiated the change
                 * @param item the renamed item
                 */
-               void send_imageframe_view_renamed(std::string new_id, std::string old_id, void* src, ImageFrameView* item) ;
+               void send_imageframe_view_renamed(const string & new_id, const string & old_id, void* src, ImageFrameView* item) ;
                
                /**
                 * Send a message indicating that an ImageFrameView item has been removed message
@@ -223,7 +221,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param src the identity of the object that initiated the change
                 * @param item the removed item
                 */
-               void send_imageframe_view_removed(std::string item_id, void* src, ImageFrameView* item) ;
+               void send_imageframe_view_removed(const string & item_id, void* src, ImageFrameView* item) ;
                
                //---------------------------------
                // MarkerView Messages
@@ -235,7 +233,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param src the identity of the object that initiated the change
                 * @param item the time axis item whos position has changed
                 */
-               void send_marker_view_position_change(jack_nframes_t pos, void* src, MarkerView* item) ;
+               void send_marker_view_position_change(nframes_t pos, void* src, MarkerView* item) ;
                
                /**
                 * Send a Marker View item duration changed message
@@ -244,7 +242,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param src the identity of the object that initiated the change
                 * @param item the time axis item whos position has changed
                 */
-               void send_marker_view_duration_change(jack_nframes_t dur, void* src, MarkerView* item) ;
+               void send_marker_view_duration_change(nframes_t dur, void* src, MarkerView* item) ;
                
                /**
                 * Send a message indicating that a MarkerView has been renamed
@@ -254,7 +252,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param src the identity of the object that initiated the change
                 * @param item the MarkerView which has been renamed
                 */
-               void send_marker_view_renamed(std::string new_id, std::string old_id, void* src, MarkerView* item) ;
+               void send_marker_view_renamed(const string & new_id, const string & old_id, void* src, MarkerView* item) ;
                
                /**
                 * Send a message indicating that a MarkerView  item has been removed message
@@ -263,17 +261,17 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param src the identity of the object that initiated the change
                 * @param item the MarkerView which has been removed
                 */
-               void send_marker_view_removed(std::string item_id, void* src, MarkerView* item) ;
+               void send_marker_view_removed(const string & item_id, void* src, MarkerView* item) ;
 
                
                //---------------------------------------------------------------------------------------//
                // Emitted Signals
                
                /** Emitted if the socket connection is shutdown at the other end */
-               SigC::Signal0<void> CompositorSocketShutdown ;
+               sigc::signal<void> CompositorSocketShutdown ;
                
                /** Emitted as a generic error is captured from the socket connection to the animatic compositor */
-               SigC::Signal0<void> CompositorSocketError ;
+               sigc::signal<void> CompositorSocketError ;
                
                
        protected:
@@ -651,7 +649,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param errmsg populated with a description of the error on failure
                 * @return the described item on success, 0 otherwise
                 */
-               ImageFrameView* get_imageframe_view_from_desc(const std::string& track_id, const std::string& group_ud, const std::string& item_id, int& errcode, std::string& errmsg) ;
+               ImageFrameView* get_imageframe_view_from_desc(const string & track_id, const string & group_ud, const string & item_id, int& errcode, std::string& errmsg) ;
         
                //---------------------------------------------------------------------------------------//
                // Convenince Message Send Methods
@@ -662,7 +660,7 @@ class ImageFrameSocketHandler : public SigC::Object
                 * @param msg the message to send
                 * @return the return value of the socket call
                 */
-               int send_message(const std::string& msg) ;
+               int send_message(const string & msg) ;
                
                /**
                 * Reads a message from the Socket