summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-28 05:16:31 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-29 16:44:43 +0200
commit8524e6261175549575d3bf82bcce31cb615a5717 (patch)
treea07038993189c5412dea12377e40d6d46bfcd148
parent3d75cc1bd209cf1de909ce5c8c9cec16789708f6 (diff)
libcamera: signal: Specify connection type for signals
Add a connection type parameter to the Signal::connect() method to control signal delivery. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
-rw-r--r--include/libcamera/signal.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/libcamera/signal.h b/include/libcamera/signal.h
index b8a60281..57598335 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>