From fb1a5c0416ebd516a5ef01ba76deed1b602828ba Mon Sep 17 00:00:00 2001 From: Jacopo Mondi Date: Sun, 27 Oct 2019 02:45:17 +0200 Subject: libcamera: object: Add connection type parameter to invokeMethod() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow specifying a different connection type than ConnectionTypeQueued for Object::invokeMethod(). Signed-off-by: Jacopo Mondi Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- include/libcamera/object.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/libcamera/object.h b/include/libcamera/object.h index 603a2292..91b56596 100644 --- a/include/libcamera/object.h +++ b/include/libcamera/object.h @@ -30,12 +30,11 @@ public: void postMessage(std::unique_ptr msg); template::value>::type * = nullptr> - void invokeMethod(void (T::*func)(Args...), Args... args) + void invokeMethod(void (T::*func)(Args...), ConnectionType type, Args... args) { T *obj = static_cast(this); BoundMethodBase *method = - new BoundMemberMethod(obj, this, func, - ConnectionTypeQueued); + new BoundMemberMethod(obj, this, func, type); void *pack = new typename BoundMemberMethod::PackType{ args... }; method->activatePack(pack, true); -- cgit v1.2.1