summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2019-10-27 02:45:17 +0200
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-10-29 16:44:46 +0200
commitfb1a5c0416ebd516a5ef01ba76deed1b602828ba (patch)
tree58a18ff78d6179a3deedb74750aca2214fce7d39 /include
parent06008b9156b74885aa2382dec9dc8c7854ca6f2e (diff)
libcamera: object: Add connection type parameter to invokeMethod()
Allow specifying a different connection type than ConnectionTypeQueued for Object::invokeMethod(). Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/object.h5
1 files changed, 2 insertions, 3 deletions
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<Message> msg);
template<typename T, typename... Args, typename std::enable_if<std::is_base_of<Object, T>::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<T *>(this);
BoundMethodBase *method =
- new BoundMemberMethod<T, Args...>(obj, this, func,
- ConnectionTypeQueued);
+ new BoundMemberMethod<T, Args...>(obj, this, func, type);
void *pack = new typename BoundMemberMethod<T, Args...>::PackType{ args... };
method->activatePack(pack, true);