X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fstoresession.h;h=d365730e5217adc3cb352a30770cc346884d8136;hp=5ef92a33f49d9df39b88bf66d20d9c92a3e9f4f0;hb=7223eb629eb8eb3b03fa26b9f22770dd7f98c4d1;hpb=0fbda3c2dda9357776afa15e99c037eb0cc97214 diff --git a/pv/storesession.h b/pv/storesession.h index 5ef92a33..d365730e 100644 --- a/pv/storesession.h +++ b/pv/storesession.h @@ -23,12 +23,17 @@ #include +#include +#include #include - -#include +#include #include +namespace sigrok { +class Output; +} + namespace pv { class SigSession; @@ -50,7 +55,7 @@ public: ~StoreSession(); - std::pair progress() const; + std::pair progress() const; const QString& error() const; @@ -61,20 +66,24 @@ public: void cancel(); private: - void store_proc(boost::shared_ptr snapshot); + void store_proc(std::shared_ptr snapshot); -signals: +Q_SIGNALS: void progress_updated(); private: const std::string _file_name; const SigSession &_session; - boost::thread _thread; + std::shared_ptr _output; + + std::thread _thread; + + std::atomic _interrupt; + + std::atomic _units_stored, _unit_count; - mutable boost::mutex _mutex; - uint64_t _units_stored; - uint64_t _unit_count; + mutable std::mutex _mutex; QString _error; };