From: Uwe Hermann Date: Thu, 13 Nov 2014 18:15:37 +0000 (+0100) Subject: bindings: Add Session::context(). X-Git-Tag: libsigrok-0.4.0~781 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=624d16100e0c850e2c28e10638a9e5a37cd938f1;p=libsigrok.git bindings: Add Session::context(). --- diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index 7becfb65..da21086c 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -1147,6 +1147,11 @@ string Session::filename() return _filename; } +shared_ptr Session::context() +{ + return _context; +} + Packet::Packet(shared_ptr device, const struct sr_datafeed_packet *structure) : UserOwned(structure), diff --git a/bindings/cxx/include/libsigrok/libsigrok.hpp b/bindings/cxx/include/libsigrok/libsigrok.hpp index 1c996703..e338f782 100644 --- a/bindings/cxx/include/libsigrok/libsigrok.hpp +++ b/bindings/cxx/include/libsigrok/libsigrok.hpp @@ -706,6 +706,8 @@ public: void append(void *data, size_t length, unsigned int unit_size); /** Get current trigger setting. */ shared_ptr trigger(); + /** Get the context. */ + shared_ptr context(); /** Set trigger setting. * @param trigger Trigger object to use. */ void set_trigger(shared_ptr trigger);