Remove ifstream / ofstream when accessing session template files (or creating a new...
[ardour.git] / libs / ardour / ardour / export_handler.h
index 1bc80a80e976693c7e194ca7c2fcfaf23634680e..526d32b4c6614b36aab7ee016292e43b88bdb3f2 100644 (file)
@@ -31,6 +31,7 @@
 #include "ardour/session.h"
 #include "ardour/libardour_visibility.h"
 #include "ardour/types.h"
+#include "pbd/signals.h"
 
 namespace AudioGrapher {
        class BroadcastInfo;
@@ -68,7 +69,7 @@ class LIBARDOUR_API ExportElementFactory
        Session & session;
 };
 
-class LIBARDOUR_API ExportHandler : public ExportElementFactory
+class LIBARDOUR_API ExportHandler : public ExportElementFactory, public sigc::trackable
 {
   public:
        struct FileSpec {
@@ -95,6 +96,8 @@ class LIBARDOUR_API ExportHandler : public ExportElementFactory
        friend boost::shared_ptr<ExportHandler> Session::get_export_handler();
        ExportHandler (Session & session);
 
+       void command_output(std::string output, size_t size);
+
   public:
        ~ExportHandler ();
 
@@ -105,6 +108,18 @@ class LIBARDOUR_API ExportHandler : public ExportElementFactory
 
        std::string get_cd_marker_filename(std::string filename, CDMarkerFormat format);
 
+       /** signal emitted when soundcloud export reports progress updates during upload.
+        * The parameters are total and current bytes downloaded, and the current filename
+        */
+       PBD::Signal3<void, double, double, std::string> SoundcloudProgress;
+
+       /* upload credentials & preferences */
+       std::string soundcloud_username;
+       std::string soundcloud_password;
+       bool soundcloud_make_public;
+       bool soundcloud_open_page;
+       bool soundcloud_downloadable;
+
   private:
 
        void handle_duplicate_format_extensions();
@@ -170,14 +185,19 @@ class LIBARDOUR_API ExportHandler : public ExportElementFactory
 
        void write_cue_header (CDMarkerStatus & status);
        void write_toc_header (CDMarkerStatus & status);
+       void write_mp4ch_header (CDMarkerStatus & status);
 
        void write_track_info_cue (CDMarkerStatus & status);
        void write_track_info_toc (CDMarkerStatus & status);
+       void write_track_info_mp4ch (CDMarkerStatus & status);
 
        void write_index_info_cue (CDMarkerStatus & status);
        void write_index_info_toc (CDMarkerStatus & status);
+       void write_index_info_mp4ch (CDMarkerStatus & status);
 
        void frames_to_cd_frames_string (char* buf, framepos_t when);
+       void frames_to_chapter_marks_string (char* buf, framepos_t when);
+
        std::string toc_escape_cdtext (const std::string&);
        std::string toc_escape_filename (const std::string&);
        std::string cue_escape_cdtext (const std::string& txt);