* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef PULSEVIEW_PV_STORESESSION_H
-#define PULSEVIEW_PV_STORESESSION_H
+#ifndef PULSEVIEW_PV_STORESESSION_HPP
+#define PULSEVIEW_PV_STORESESSION_HPP
#include <stdint.h>
#include <atomic>
+#include <fstream>
+#include <map>
+#include <memory>
#include <mutex>
#include <string>
#include <thread>
+#include <glibmm/variant.h>
+
#include <QObject>
namespace sigrok {
class Output;
+class OutputFormat;
}
namespace pv {
-class SigSession;
+class Session;
namespace data {
-class LogicSnapshot;
+class LogicSegment;
}
class StoreSession : public QObject
public:
StoreSession(const std::string &file_name,
- const SigSession &session);
+ const std::shared_ptr<sigrok::OutputFormat> &output_format,
+ const std::map<std::string, Glib::VariantBase> &options,
+ const Session &session);
~StoreSession();
void cancel();
private:
- void store_proc(std::shared_ptr<pv::data::LogicSnapshot> snapshot);
+ void store_proc(std::shared_ptr<pv::data::LogicSegment> segment);
Q_SIGNALS:
void progress_updated();
private:
const std::string file_name_;
- const SigSession &session_;
+ const std::shared_ptr<sigrok::OutputFormat> output_format_;
+ const std::map<std::string, Glib::VariantBase> options_;
+ const Session &session_;
std::shared_ptr<sigrok::Output> output_;
+ std::ofstream output_stream_;
std::thread thread_;
} // pv
-#endif // PULSEVIEW_PV_STORESESSION_H
+#endif // PULSEVIEW_PV_STORESESSION_HPP