Logo Search packages:      
Sourcecode: ardour version File versions  Download package

void ImageFrameSocketHandler::handle_item_update_message ( const char *  msg  )  [private]

Handle the update of a particular item

Parameters:
msg the received message

Definition at line 962 of file imageframe_socket_handler.cc.

References get_message_part(), handle_imageframe_position_lock_update(), handle_imageframe_view_duration_update(), handle_imageframe_view_max_duration_enable_update(), handle_imageframe_view_max_duration_update(), handle_imageframe_view_min_duration_enable_update(), handle_imageframe_view_min_duration_update(), handle_imageframe_view_position_update(), handle_marker_view_duration_update(), handle_marker_view_position_update(), and send_return_failure().

Referenced by image_socket_callback().

{
      // determin the object that requires updating, characters 2-3
      std::string oType = get_message_part(2,2,msg) ;
      
      // What needs updating? chars 4-5
      std::string  attr = get_message_part(4,2,msg) ;
      
      if(oType == ardourvis::IMAGEFRAME_ITEM)
      {
            if(attr == ardourvis::POSITION_CHANGE)
            {
                  handle_imageframe_view_position_update(msg) ;
            }
            else if(attr == ardourvis::DURATION_CHANGE)
            {
                  handle_imageframe_view_duration_update(msg) ;
            }
            else if(attr == ardourvis::POSITION_LOCK_CHANGE)
            {
                  handle_imageframe_position_lock_update(msg) ;
            }
            else if(attr == ardourvis::MAX_DURATION_CHANGE)
            {
                  handle_imageframe_view_max_duration_update(msg) ;
            }
            else if(attr == ardourvis::MAX_DURATION_ENABLE_CHANGE)
            {
                  handle_imageframe_view_max_duration_enable_update(msg) ;
            }
            else if(attr == ardourvis::MIN_DURATION_CHANGE)
            {
                  handle_imageframe_view_min_duration_update(msg) ;
            }
            else if(attr == ardourvis::MIN_DURATION_ENABLE_CHANGE)
            {
                  handle_imageframe_view_min_duration_enable_update(msg) ;
            }
            else
            {
                  std::string errMsg = "Unknown Attribute during Item Update: " ; 
                  errMsg.append(oType) ;
                  send_return_failure(errMsg) ;
            }
      }
      else if(oType == ardourvis::MARKER_ITEM)
      {
            if(attr == ardourvis::POSITION_CHANGE)
            {
                  handle_marker_view_position_update(msg) ;
            }
            else if(attr == ardourvis::DURATION_CHANGE)
            {
                  handle_marker_view_duration_update(msg) ;
            }
            else
            {
                  std::string errMsg = "Unknown Attribute during Item Update: " ; 
                  errMsg.append(oType) ;
                  send_return_failure(errMsg) ;
            }
      }
      else
      {
            std::string errMsg = "Unknown Object type during Item Update: " ; 
            errMsg.append(oType) ;
            send_return_failure(errMsg) ;
      }
}


Generated by  Doxygen 1.6.0   Back to index