X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fdevices%2Finputfile.cpp;h=13af3db9cd85c791935da6c80bf1a14220d492a0;hb=812c0e3592e51946947b55c54b906bf4a0cb30e9;hp=e92bf208bf17989039bed7b4dbbbbe277f49093f;hpb=dd3fd4df34d129c83f7f5d80ff1e8b998beca63d;p=pulseview.git 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() { }