lua MidiBuffer bindings
[ardour.git] / libs / ardour / ardour / audio_track_importer.h
index 212762ee0441e55c10713897e4be703686e4ec83..eddf6c67a2fbe3abe92d6a1f6b2f9b01206a995e 100644 (file)
 #ifndef __ardour_audio_track_importer_h__
 #define __ardour_audio_track_importer_h__
 
-#include <pbd/xml++.h>
+#include <list>
 
-#include <ardour/element_importer.h>
-#include <ardour/element_import_handler.h>
+#include "pbd/xml++.h"
+#include "pbd/id.h"
+
+#include "ardour/element_importer.h"
+#include "ardour/element_import_handler.h"
 
 namespace ARDOUR {
 
+class AudioPlaylistImportHandler;
+class AudioPlaylistImporter;
 
-class AudioTrackImportHandler : public ElementImportHandler
+class LIBARDOUR_API AudioTrackImportHandler : public ElementImportHandler
 {
   public:
-       AudioTrackImportHandler (XMLTree const & source, Session & session);
+       AudioTrackImportHandler (XMLTree const & source, Session & session, AudioPlaylistImportHandler & pl_handler);
        virtual ~AudioTrackImportHandler () {}
-       virtual string get_info () const;
+       virtual std::string get_info () const;
 };
 
 
-class AudioTrackImporter : public ElementImporter
+class LIBARDOUR_API AudioTrackImporter : public ElementImporter
 {
   public:
-       AudioTrackImporter (XMLTree const & source, Session & session, AudioTrackImportHandler & handler, XMLNode const & node);
+       AudioTrackImporter (XMLTree const & source,
+                           Session & session,
+                           AudioTrackImportHandler & track_handler,
+                           XMLNode const & node,
+                           AudioPlaylistImportHandler & pl_handler);
+       ~AudioTrackImporter ();
+
+       std::string get_info () const;
 
-       string get_info () const;
-       bool prepare_move ();
-       void cancel_move ();
-       void move ();
+  protected:
+       bool _prepare_move ();
+       void _cancel_move ();
+       void _move ();
 
   private:
 
-       bool parse_io (XMLNode const & node);
-       bool parse_processor (XMLNode const & node);
-       
-       bool parse_controllable (XMLNode const & node, XMLNode & dest_parent);
-       
+       typedef boost::shared_ptr<AudioPlaylistImporter> PlaylistPtr;
+       typedef std::list<PlaylistPtr> PlaylistList;
+
+       bool parse_route_xml ();
+       bool parse_io ();
+
+       bool parse_processor (XMLNode & node);
+       bool parse_controllable (XMLNode & node);
+       bool parse_automation (XMLNode & node);
+       bool rate_convert_events (XMLNode & node);
+
+       AudioTrackImportHandler & track_handler;
        XMLNode xml_track;
-       
+
+       PBD::ID old_ds_id;
+       PBD::ID new_ds_id;
+
+       PlaylistList playlists;
+       AudioPlaylistImportHandler & pl_handler;
 };
 
 } // namespace ARDOUR