revert font sizing on audio/midi setup dialog
[ardour.git] / gtk2_ardour / sfdb_freesound_mootcher.h
index ee650200210a1ca4e9cfe1f7386f67b2d3dcb233..48fb11b638fa4a311ea49cdb440df99481db83be 100644 (file)
@@ -65,7 +65,7 @@ enum sortMethod {
 };
 
 
-class Mootcher
+class Mootcher: public sigc::trackable, public PBD::ScopedConnectionList
 {
 public:
        Mootcher();
@@ -80,6 +80,14 @@ public:
        std::string     audioFileName;
        std::string     ID;
 
+       /** signal emitted when mootcher reports progress updates during download.
+        * The parameters are current and total numbers of bytes downloaded.
+        */
+       PBD::Signal2<void, double, double> Progress;
+       /** signal emitted when the mootcher has finished downloading. */
+       PBD::Signal0<void> Finished;
+
+
 private:
 
        void            ensureWorkingDir();
@@ -97,6 +105,9 @@ private:
 
        FILE* theFile;
 
+       void updateProgress(double dlnow, double dltotal);
+       void doneWithMootcher();
+
        Gtk::HBox progress_hbox;
        Gtk::ProgressBar progress_bar;
        Gtk::Button cancel_download_btn;