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

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

Handle a request for the sessnio naem fo the current session We return a failure state if no session is open

Parameters:
msg the received message

Definition at line 1604 of file imageframe_socket_handler.cc.

References Glib::build_filename(), send_message(), send_return_failure(), and thePublicEditor.

Referenced by handle_request_data().

{
      ARDOUR::Session* currentSession = thePublicEditor.current_session() ;
      
      if(currentSession == 0)
      {
            // no current session, return failure
            std::string msg("No Current Session") ;
            send_return_failure(msg) ;
      }
      else
      {
            std::string sessionName = currentSession->name() ;
            std::string sessionPath = currentSession->path() ;
            
                sessionPath = Glib::build_filename (sessionPath, sessionName);
            
            std::ostringstream msgBuf ;
            msgBuf << ardourvis::RETURN_DATA << ardourvis::SESSION_NAME ;
            msgBuf << std::setfill('0') ;
            msgBuf << std::setw(ardourvis::TEXT_SIZE_CHARS) << sessionPath.length() ;
            msgBuf << sessionPath ;
            send_message(msgBuf.str()) ;
      }
}


Generated by  Doxygen 1.6.0   Back to index