Fix broken whitespace. I'd apologize for the compile times if it was my fault :D
[ardour.git] / libs / ardour / ardour / export_profile_manager.h
index 793ceac1f589a430ecd915a22099283e6d53c62d..b7a3b950387f4cd42124083f148d76dceeda811f 100644 (file)
 #include <vector>
 #include <map>
 #include <stdexcept>
+#include <string>
 
 #include <boost/shared_ptr.hpp>
 #include <boost/weak_ptr.hpp>
-#include <glibmm/ustring.h>
 
 #include "pbd/uuid.h"
 #include "pbd/file_utils.h"
@@ -55,7 +55,7 @@ class ExportProfileManager
 {
   public:
 
-       ExportProfileManager (Session & s);
+       ExportProfileManager (Session & s, std::string xml_node_name);
        ~ExportProfileManager ();
 
        void load_profile ();
@@ -66,6 +66,7 @@ class ExportProfileManager
 
        PresetList const & get_presets () { return preset_list; }
        bool load_preset (PresetPtr preset);
+       PresetPtr new_preset (std::string const & name);
        PresetPtr save_preset (std::string const & name);
        void remove_preset ();
 
@@ -75,9 +76,11 @@ class ExportProfileManager
        typedef std::pair<PBD::UUID, PBD::sys::path> FilePair;
        typedef std::map<PBD::UUID, PBD::sys::path> FileMap;
 
+       std::string const xml_node_name;
        HandlerPtr  handler;
        Session &   session;
 
+       std::string preset_filename (std::string const & preset_name);
        void load_presets ();
        void load_preset_from_disk (PBD::sys::path const & path);
 
@@ -124,21 +127,20 @@ class ExportProfileManager
 
                TimespanState (boost::shared_ptr<Location> session_range,
                               boost::shared_ptr<Location> selection_range,
-                              boost::shared_ptr<LocationList> ranges) :
-                 timespans (new TimespanList ()),
-                 time_format (Timecode),
-
-                 session_range (session_range),
-                 selection_range (selection_range),
-                 ranges (ranges)
+                              boost::shared_ptr<LocationList> ranges)
+                 : timespans (new TimespanList ())
+                 , time_format (Timecode)
+                 , session_range (session_range)
+                 , selection_range (selection_range)
+                 , ranges (ranges)
                {}
        };
 
        typedef boost::shared_ptr<TimespanState> TimespanStatePtr;
        typedef std::list<TimespanStatePtr> TimespanStateList;
 
-       void set_selection_range (nframes_t start = 0, nframes_t end = 0);
-       std::string set_single_range (nframes_t start, nframes_t end, Glib::ustring name);
+       void set_selection_range (framepos_t start = 0, framepos_t end = 0);
+       std::string set_single_range (framepos_t start, framepos_t end, std::string name);
        TimespanStateList const & get_timespans () { return check_list (timespans); }
 
   private:
@@ -175,6 +177,8 @@ class ExportProfileManager
        typedef std::list<ChannelConfigStatePtr> ChannelConfigStateList;
 
        ChannelConfigStateList const & get_channel_configs () { return check_list (channel_configs); }
+       void clear_channel_configs () { channel_configs.clear(); }
+       ChannelConfigStatePtr add_channel_config ();
 
   private:
 
@@ -251,9 +255,9 @@ class ExportProfileManager
 /* Warnings */
   public:
        struct Warnings {
-               std::list<Glib::ustring> errors;
-               std::list<Glib::ustring> warnings;
-               std::list<Glib::ustring> conflicting_filenames;
+               std::list<std::string> errors;
+               std::list<std::string> warnings;
+               std::list<std::string> conflicting_filenames;
        };
 
        boost::shared_ptr<Warnings> get_warnings ();
@@ -264,7 +268,7 @@ class ExportProfileManager
                           ChannelConfigStatePtr channel_config_state,
                           FormatStatePtr format_state,
                           FilenameStatePtr filename_state);
-       
+
        bool check_format (FormatPtr format, uint32_t channels);
        bool check_sndfile_format (FormatPtr format, unsigned int channels);