X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fdevice%2Ffile.cpp;h=e82c5ece16c89e8f7d00da6da9fcb3bdda4506b9;hb=6842b5fc481eb43d9aeea81f17e211820d6dc405;hp=0286a2581471225fae43fa0ea4f793b23e1ee1af;hpb=bb3030b34e44733036acdfe5b4d4ec0705146831;p=pulseview.git diff --git a/pv/device/file.cpp b/pv/device/file.cpp index 0286a25..e82c5ec 100644 --- a/pv/device/file.cpp +++ b/pv/device/file.cpp @@ -19,13 +19,14 @@ */ #include "file.h" -#include "inputfile.h" #include "sessionfile.h" #include #include +using std::make_pair; +using std::map; using std::string; namespace pv { @@ -41,6 +42,18 @@ std::string File::format_device_title() const return boost::filesystem::path(_path).filename().string(); } +map File::get_device_info() const +{ + map result; + + result.insert(make_pair("vendor", "sigrok")); + result.insert(make_pair("model", "file")); + result.insert(make_pair("connection_id", + boost::filesystem::path(_path).filename().string())); + + return result; +} + File* File::create(const string &name) { if (sr_session_load(name.c_str(), &SigSession::_sr_session) == SR_OK) { @@ -59,7 +72,7 @@ File* File::create(const string &name) } } - return new InputFile(name); + return NULL; } } // device