X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fsession.hpp;h=69099b445df514658fc4df4fcc6a9ff3b52cbe38;hp=f5c87f694f8e22a574307e7ae3568968423df9e8;hb=da30ecb7e72bd2547e524258efa5ec642988b70b;hpb=da5e6727a632752d19f975d84ea76f1683cd656f diff --git a/pv/session.hpp b/pv/session.hpp index f5c87f6..69099b4 100644 --- a/pv/session.hpp +++ b/pv/session.hpp @@ -65,6 +65,10 @@ class LogicSegment; class SignalData; } +namespace devices { +class Device; +} + namespace view { class DecodeTrace; class LogicSignal; @@ -91,20 +95,14 @@ public: const DeviceManager& device_manager() const; - const std::shared_ptr& session() const; + std::shared_ptr session() const; - std::shared_ptr device() const; + std::shared_ptr device() const; /** * Sets device instance that will be used in the next capture session. */ - void set_device(std::shared_ptr device); - - /** - * Sets a sigrok session file as the capture device. - * @param name the path to the file. - */ - void set_session_file(const std::string &name); + void set_device(std::shared_ptr device); void set_default_device(); @@ -133,21 +131,20 @@ public: private: void set_capture_state(capture_state state); - void update_signals(std::shared_ptr device); + void update_signals(std::shared_ptr device); std::shared_ptr signal_from_channel( std::shared_ptr channel) const; - void read_sample_rate(std::shared_ptr); + void read_sample_rate(std::shared_ptr device); private: - void sample_thread_proc(std::shared_ptr device, + void sample_thread_proc(std::shared_ptr device, std::function error_handler); - void feed_in_header(std::shared_ptr device); + void feed_in_header(); - void feed_in_meta(std::shared_ptr device, - std::shared_ptr meta); + void feed_in_meta(std::shared_ptr meta); void feed_in_frame_begin(); @@ -160,12 +157,7 @@ private: private: DeviceManager &device_manager_; - std::shared_ptr session_; - - /** - * The device instance that will be used in the next capture session. - */ - std::shared_ptr device_; + std::shared_ptr device_; std::vector< std::shared_ptr > decode_traces_;