X-Git-Url: https://sigrok.org/gitweb/?a=blobdiff_plain;f=pv%2Fsigsession.h;h=08a0fd0fadb5cbe23b89e8e93acea84dae027599;hb=50f97924a2de49393de617a891190f053825454f;hp=55da3735cbdb574df7576aaaf9d7f1691eb0313c;hpb=d260d425863efa6d80a5a5f3d920373a6d159aef;p=pulseview.git diff --git a/pv/sigsession.h b/pv/sigsession.h index 55da3735..08a0fd0f 100644 --- a/pv/sigsession.h +++ b/pv/sigsession.h @@ -79,6 +79,12 @@ public: ~SigSession(); + DeviceManager& device_manager(); + + const DeviceManager& device_manager() const; + + const std::shared_ptr& session() const; + std::shared_ptr device() const; /** @@ -140,6 +146,7 @@ private: private: DeviceManager &_device_manager; + std::shared_ptr _session; /** * The device instance that will be used in the next capture session. @@ -172,14 +179,6 @@ Q_SIGNALS: void data_received(); void frame_ended(); - -public: - // Hack. The libsigrok API now allows for multiple sessions. However, - // sigrok::Session calls are scattered around the PV architecture and a - // single SigSession object is being used across multiple sequential - // sessions. This is a mess. For now just keep a single sigrok::Session - // pointer here which we can use for all those scattered calls. - static std::shared_ptr _sr_session; }; } // namespace pv