]> sigrok.org Git - pulseview.git/blobdiff - pv/device/file.cpp
Remove obsolete input module support.
[pulseview.git] / pv / device / file.cpp
index 190b53846bc08071d60df99cd1e759b070b060be..edc2da2bdd96cad6ba3a56eb39d13c2a1a2b2e4e 100644 (file)
  */
 
 #include "file.h"
-#include "inputfile.h"
 #include "sessionfile.h"
 
+#include <boost/filesystem.hpp>
+
 #include <libsigrok/libsigrok.h>
 
 using std::string;
@@ -36,15 +37,15 @@ File::File(const std::string path) :
 
 std::string File::format_device_title() const
 {
-       return _path;
+       return boost::filesystem::path(_path).filename().string();
 }
 
 File* File::create(const string &name)
 {
-       if (sr_session_load(name.c_str()) == SR_OK) {
+       if (sr_session_load(name.c_str(), &SigSession::_sr_session) == SR_OK) {
                GSList *devlist = NULL;
-               sr_session_dev_list(&devlist);
-               sr_session_destroy();
+               sr_session_dev_list(SigSession::_sr_session, &devlist);
+               sr_session_destroy(SigSession::_sr_session);
 
                if (devlist) {
                        sr_dev_inst *const sdi = (sr_dev_inst*)devlist->data;
@@ -57,7 +58,7 @@ File* File::create(const string &name)
                }
        }
 
-       return new InputFile(name);
+       return NULL;
 }
 
 } // device