From: Martin Ling Date: Sat, 27 Sep 2014 15:29:34 +0000 (+0100) Subject: bindings: Update for input API changes. X-Git-Tag: libsigrok-0.4.0~915 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=9c51e8ec56715074ca756fd54e63b360096113e2;p=libsigrok.git bindings: Update for input API changes. --- diff --git a/bindings/cxx/classes.cpp b/bindings/cxx/classes.cpp index 7a6daa92..986d4a73 100644 --- a/bindings/cxx/classes.cpp +++ b/bindings/cxx/classes.cpp @@ -1289,11 +1289,16 @@ void Input::send(string data) check(ret); } +void Input::end() +{ + check(sr_input_end(_structure)); +} + Input::~Input() { if (_device) delete _device; - check(sr_input_free(_structure)); + sr_input_free(_structure); } InputDevice::InputDevice(shared_ptr input, diff --git a/bindings/cxx/include/libsigrok/libsigrok.hpp b/bindings/cxx/include/libsigrok/libsigrok.hpp index 972bde88..9c211837 100644 --- a/bindings/cxx/include/libsigrok/libsigrok.hpp +++ b/bindings/cxx/include/libsigrok/libsigrok.hpp @@ -821,6 +821,8 @@ public: /** Send next stream data. * @param data Next stream data. */ void send(string data); + /** Signal end of input data. */ + void end(); protected: Input(shared_ptr context, const struct sr_input *structure); ~Input();