]> sigrok.org Git - libsigrok.git/commitdiff
bindings: Add Session::context().
authorUwe Hermann <redacted>
Thu, 13 Nov 2014 18:15:37 +0000 (19:15 +0100)
committerUwe Hermann <redacted>
Thu, 13 Nov 2014 18:15:37 +0000 (19:15 +0100)
bindings/cxx/classes.cpp
bindings/cxx/include/libsigrok/libsigrok.hpp

index 7becfb65e4ae472b44c0843e96d3f26731ea8089..da21086c50510199456e8b0a18c2a85815be825c 100644 (file)
@@ -1147,6 +1147,11 @@ string Session::filename()
        return _filename;
 }
 
+shared_ptr<Context> Session::context()
+{
+       return _context;
+}
+
 Packet::Packet(shared_ptr<Device> device,
        const struct sr_datafeed_packet *structure) :
        UserOwned(structure),
index 1c99670360c5657a82b62f3f7c4866ecfbf54ce8..e338f782a6b5fa65f5f5e31c2f4a936eadc66662 100644 (file)
@@ -706,6 +706,8 @@ public:
        void append(void *data, size_t length, unsigned int unit_size);
        /** Get current trigger setting. */
        shared_ptr<Trigger> trigger();
+       /** Get the context. */
+       shared_ptr<Context> context();
        /** Set trigger setting.
         * @param trigger Trigger object to use. */
        void set_trigger(shared_ptr<Trigger> trigger);