X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fstoresession.h;h=8eaddaa60f50ebb3138870a6463d5937973d5e54;hp=5ef92a33f49d9df39b88bf66d20d9c92a3e9f4f0;hb=8dbbc7f0b9ea59d0f0d62225772f8a56eee125f5;hpb=0fbda3c2dda9357776afa15e99c037eb0cc97214 diff --git a/pv/storesession.h b/pv/storesession.h index 5ef92a33..8eaddaa6 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,21 +66,25 @@ 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; + const std::string file_name_; + const SigSession &session_; + + std::shared_ptr output_; + + std::thread thread_; + + std::atomic interrupt_; - boost::thread _thread; + std::atomic units_stored_, unit_count_; - mutable boost::mutex _mutex; - uint64_t _units_stored; - uint64_t _unit_count; - QString _error; + mutable std::mutex mutex_; + QString error_; }; } // pv