X-Git-Url: http://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdevices%2Finputfile.cpp;fp=pv%2Fdevices%2Finputfile.cpp;h=13af3db9cd85c791935da6c80bf1a14220d492a0;hp=e92bf208bf17989039bed7b4dbbbbe277f49093f;hb=4d6c6ea3e6b069787c270d4911083dae05eae4c6;hpb=accd9c0506657c2444caef9aa3aa5de71a94b60a;ds=sidebyside diff --git a/pv/devices/inputfile.cpp b/pv/devices/inputfile.cpp index e92bf208..13af3db9 100644 --- a/pv/devices/inputfile.cpp +++ b/pv/devices/inputfile.cpp @@ -42,10 +42,18 @@ InputFile::InputFile(const std::shared_ptr &context, throw QString("Failed to create input"); } -void InputFile::create() { +void InputFile::open() { + if (session_) + close(); + session_ = context_->create_session(); } +void InputFile::close() { + if (session_) + session_->remove_devices(); +} + void InputFile::start() { }