From patchwork Mon Oct 28 10:49:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 2278 Return-Path: Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 96C3760C14 for ; Mon, 28 Oct 2019 11:49:26 +0100 (CET) Received: from pendragon.ideasonboard.com (unknown [91.217.168.176]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4C01B9C2 for ; Mon, 28 Oct 2019 11:49:26 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1572259766; bh=dhSMSoGff5nMEeAkkqC736uZ5lQgBGNG5b33Ev5fQC8=; h=From:To:Subject:Date:In-Reply-To:References:From; b=e6FNA0zTSfFL/mf8014iZNNAf99Do8QzQqK5b8mO3RN/juz1BzSEHN/I1EslA+FnO IPRoxeCYVNcZj2HOUV+HjPRtJGLigVsZlJBctEuF2ocxeU8lobeqjvllJpR69+DEP4 HNlmmPMLQmHlP2/Uk5cxxIl17Z33W1YqWt+zZjOI= From: Laurent Pinchart To: libcamera-devel@lists.libcamera.org Date: Mon, 28 Oct 2019 12:49:09 +0200 Message-Id: <20191028104913.14985-6-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191028104913.14985-1-laurent.pinchart@ideasonboard.com> References: <20191028104913.14985-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 5/9] libcamera: signal: Specify connection type for signals X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Oct 2019 10:49:28 -0000 Add a connection type parameter to the Signal::connect() method to control signal delivery. Signed-off-by: Laurent Pinchart Reviewed-by: Niklas Söderlund --- 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::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(obj); object->connect(this); - slots_.push_back(new BoundMemberMethod(obj, object, func)); + slots_.push_back(new BoundMemberMethod(obj, object, func, type)); } template::value>::type * = nullptr>