From 624d16100e0c850e2c28e10638a9e5a37cd938f1 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Thu, 13 Nov 2014 19:15:37 +0100 Subject: [PATCH] bindings: Add Session::context(). --- bindings/cxx/classes.cpp | 5 +++++ bindings/cxx/include/libsigrok/libsigrok.hpp | 2 ++ 2 files changed, 7 insertions(+) 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);