X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fsession.hpp;h=69099b445df514658fc4df4fcc6a9ff3b52cbe38;hb=c6412b47eb1f5529fd76247caa7de09b6c9693d5;hp=d17c9dc364205344d157e7c271601cb5c6e9c5a7;hpb=78b0af3ebcbeab50e1c1634af729c0a7f97fb435;p=pulseview.git diff --git a/pv/session.hpp b/pv/session.hpp index d17c9dc3..69099b44 100644 --- a/pv/session.hpp +++ b/pv/session.hpp @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PULSEVIEW_PV_SIGSESSION_HPP -#define PULSEVIEW_PV_SIGSESSION_HPP +#ifndef PULSEVIEW_PV_SESSION_HPP +#define PULSEVIEW_PV_SESSION_HPP #include #include @@ -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_; @@ -199,4 +191,4 @@ Q_SIGNALS: } // namespace pv -#endif // PULSEVIEW_PV_SIGSESSION_HPP +#endif // PULSEVIEW_PV_SESSION_HPP