From 0e65ed81453ce0ae8534b3fbc3f44a846d816910 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Mon, 12 Aug 2019 02:36:37 +0300 Subject: libcamera: signal: Split Slot implementation to reusable classes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Move the Slot* classes to bound_method.{h,cpp} and rename them to Bound*Method*. They will be reused to implement asynchronous method invocation similar to cross-thread signal delivery. This is only a move and rename, no functional changes are included. Signed-off-by: Laurent Pinchart Reviewed-by: Jacopo Mondi Reviewed-by: Niklas Söderlund --- src/libcamera/signal.cpp | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/libcamera/signal.cpp') diff --git a/src/libcamera/signal.cpp b/src/libcamera/signal.cpp index ab7dba50..6ee348ac 100644 --- a/src/libcamera/signal.cpp +++ b/src/libcamera/signal.cpp @@ -7,10 +7,6 @@ #include -#include "message.h" -#include "thread.h" -#include "utils.h" - /** * \file signal.h * \brief Signal & slot implementation @@ -57,25 +53,6 @@ namespace libcamera { * passed through the signal will remain valid after the signal is emitted. */ -void SlotBase::disconnect(SignalBase *signal) -{ - if (object_) - object_->disconnect(signal); -} - -void SlotBase::activatePack(void *pack) -{ - Object *obj = static_cast(object_); - - if (Thread::current() == obj->thread()) { - invokePack(pack); - } else { - std::unique_ptr msg = - utils::make_unique(this, pack); - obj->postMessage(std::move(msg)); - } -} - /** * \fn Signal::connect(T *object, void(T::*func)(Args...)) * \brief Connect the signal to a member function slot -- cgit v1.2.1