From patchwork Sun Oct 27 20:33:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jacopo Mondi X-Patchwork-Id: 2232 X-Patchwork-Delegate: jacopo@jmondi.org Return-Path: Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 8FDCD6017A for ; Sun, 27 Oct 2019 21:31:48 +0100 (CET) X-Originating-IP: 93.2.121.143 Received: from uno.localdomain (143.121.2.93.rev.sfr.net [93.2.121.143]) (Authenticated sender: jacopo@jmondi.org) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id 456EEC0005; Sun, 27 Oct 2019 20:31:48 +0000 (UTC) From: Jacopo Mondi To: libcamera-devel@lists.libcamera.org Date: Sun, 27 Oct 2019 21:33:30 +0100 Message-Id: <20191027203335.26888-2-jacopo@jmondi.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191027203335.26888-1-jacopo@jmondi.org> References: <20191027203335.26888-1-jacopo@jmondi.org> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH 1/6] libcamera: object: Define message invocation type 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: Sun, 27 Oct 2019 20:31:48 -0000 Define an enumeration of invocation types to be used to describe the delivery method of messages through the Object::invokeMethod operation. Signed-off-by: Jacopo Mondi --- include/libcamera/object.h | 7 +++++++ src/libcamera/object.cpp | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/include/libcamera/object.h b/include/libcamera/object.h index 3308330af857..017d3f8aa915 100644 --- a/include/libcamera/object.h +++ b/include/libcamera/object.h @@ -21,6 +21,13 @@ class Signal; class SignalBase; class Thread; +enum InvocationType { + InvocationTypeAuto, + InvocationTypeDirect, + InvocationTypeQueued, + InvocationTypeBlocking, +}; + class Object { public: diff --git a/src/libcamera/object.cpp b/src/libcamera/object.cpp index 98aa0af2f9b9..82df3893d052 100644 --- a/src/libcamera/object.cpp +++ b/src/libcamera/object.cpp @@ -25,6 +25,33 @@ namespace libcamera { LOG_DEFINE_CATEGORY(Object) +/** + * \enum InvocationType + * \brief Method invocation type + * + * This enumeration describes the possible methods invocation types + * that can be used to invoke methods on an Object running in a different + * execution context. + * + * Method invocation is performed by appending an InvokeMessage message to the + * receiver's message queue. This enumeration defines how the caller behaves + * once the message has been delivered to the receiver's queue. + * + * \var InvocationType::InvocationTypeAuto + * \brief === I'm not sure how we would use this for method invocation === + * + * \var InvocationType::InvocationTypeDirect + * \brief === I'm not sure how we would use this for method invocation === + * + * \var InvocationType::InvocationTypeQueued + * \brief The method is invoked on the Object and the caller immediately returns + * as soon as the message is queued to the receiver's message queue + * + * \var InvocationType::InvocationTypeBlocking + * \brief The method is invoked on the Object and the caller is blocked until + * the called method is not executed + */ + /** * \class Object * \brief Base object to support automatic signal disconnection