[libcamera-devel] [PATCH v2 5/9] libcamera: signal: Specify connection type for signals
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Oct 28 11:49:09 CET 2019
Add a connection type parameter to the Signal::connect() method to
control signal delivery.
Signed-off-by: Laurent Pinchart <laurent.pinchart at ideasonboard.com>
---
include/libcamera/signal.h | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/include/libcamera/signal.h b/include/libcamera/signal.h
index b8a60281cceb..57598335932c 100644
--- a/include/libcamera/signal.h
+++ b/include/libcamera/signal.h
@@ -55,11 +55,12 @@ public:
#ifndef __DOXYGEN__
template<typename T, typename std::enable_if<std::is_base_of<Object, T>::value>::type * = nullptr>
- void connect(T *obj, void (T::*func)(Args...))
+ void connect(T *obj, void (T::*func)(Args...),
+ ConnectionType type = ConnectionTypeAuto)
{
Object *object = static_cast<Object *>(obj);
object->connect(this);
- slots_.push_back(new BoundMemberMethod<T, Args...>(obj, object, func));
+ slots_.push_back(new BoundMemberMethod<T, Args...>(obj, object, func, type));
}
template<typename T, typename std::enable_if<!std::is_base_of<Object, T>::value>::type * = nullptr>
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list