From patchwork Thu Feb 11 13:34:39 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kieran Bingham X-Patchwork-Id: 11239 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id EFDCABD162 for ; Thu, 11 Feb 2021 13:34:51 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 0578563745; Thu, 11 Feb 2021 14:34:51 +0100 (CET) Authentication-Results: lancelot.ideasonboard.com; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=ideasonboard.com header.i=@ideasonboard.com header.b="GwaZlBOw"; dkim-atps=neutral Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 4FE6561661 for ; Thu, 11 Feb 2021 14:34:48 +0100 (CET) Received: from Q.local (cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id CD5F045E; Thu, 11 Feb 2021 14:34:47 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1613050488; bh=+5h03PsthcwfZKzhw/S8i9/yWivYhHzcNQHhd3vXTJc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=GwaZlBOwBXMN2KYqBaO2Sn17QHGWxYKU1DYPMa7iN8OtSSmXmuvbu6X3v6ZKV0dz1 WdU82yDFVTWJQW0YbOTOKDo+5N1RfeOX6W89oMI2m0AM35CQcACsLC40Ofc3q7jn8G n89MGQ+ZZdQ72Mz86z5pYi3BbbXQLlVR06+8i+Rs= From: Kieran Bingham To: libcamera devel Date: Thu, 11 Feb 2021 13:34:39 +0000 Message-Id: <20210211133444.764808-2-kieran.bingham@ideasonboard.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210211133444.764808-1-kieran.bingham@ideasonboard.com> References: <20210211133444.764808-1-kieran.bingham@ideasonboard.com> MIME-Version: 1.0 Subject: [libcamera-devel] [PATCH v2 1/6] libcamera: Move extensible to class 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: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" The Extensible concept is a generic Class helper. To prepare for further class helper additions, move the specific extensible implementation and header to a more generic class header and source. Signed-off-by: Kieran Bingham Reviewed-by: Laurent Pinchart --- include/libcamera/camera.h | 2 +- include/libcamera/camera_manager.h | 2 +- include/libcamera/{extensible.h => class.h} | 8 ++++---- include/libcamera/meson.build | 1 - src/libcamera/{extensible.cpp => class.cpp} | 11 +++++++---- src/libcamera/meson.build | 2 +- 6 files changed, 14 insertions(+), 12 deletions(-) rename include/libcamera/{extensible.h => class.h} (86%) rename src/libcamera/{extensible.cpp => class.cpp} (94%) diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h index f94f859988fe..cff9f46e801b 100644 --- a/include/libcamera/camera.h +++ b/include/libcamera/camera.h @@ -12,8 +12,8 @@ #include #include +#include #include -#include #include #include #include diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h index 8c8830e7ff1d..7b8e533fadd6 100644 --- a/include/libcamera/camera_manager.h +++ b/include/libcamera/camera_manager.h @@ -12,7 +12,7 @@ #include #include -#include +#include #include #include diff --git a/include/libcamera/extensible.h b/include/libcamera/class.h similarity index 86% rename from include/libcamera/extensible.h rename to include/libcamera/class.h index 3f25a47c5064..2d9b7ebfdb08 100644 --- a/include/libcamera/extensible.h +++ b/include/libcamera/class.h @@ -2,10 +2,10 @@ /* * Copyright (C) 2020, Google Inc. * - * extensible.h - Utilities to create extensible public classes with stable ABIs + * class.h - Utilities and helpers for public classes */ -#ifndef __LIBCAMERA_EXTENSIBLE_H__ -#define __LIBCAMERA_EXTENSIBLE_H__ +#ifndef __LIBCAMERA_CLASS_H__ +#define __LIBCAMERA_CLASS_H__ #include @@ -84,4 +84,4 @@ private: } /* namespace libcamera */ -#endif /* __LIBCAMERA_EXTENSIBLE_H__ */ +#endif /* __LIBCAMERA_CLASS_H__ */ diff --git a/include/libcamera/meson.build b/include/libcamera/meson.build index 13e9eeb6d6ad..aefc60d8c9b4 100644 --- a/include/libcamera/meson.build +++ b/include/libcamera/meson.build @@ -7,7 +7,6 @@ libcamera_public_headers = files([ 'camera_manager.h', 'compiler.h', 'controls.h', - 'extensible.h', 'file_descriptor.h', 'framebuffer_allocator.h', 'geometry.h', diff --git a/src/libcamera/extensible.cpp b/src/libcamera/class.cpp similarity index 94% rename from src/libcamera/extensible.cpp rename to src/libcamera/class.cpp index 1dcb0bf1b12f..8a608edb369b 100644 --- a/src/libcamera/extensible.cpp +++ b/src/libcamera/class.cpp @@ -2,14 +2,17 @@ /* * Copyright (C) 2020, Google Inc. * - * extensible.cpp - Utilities to create extensible public classes with stable ABIs + * class.cpp - Utilities and helpers for public classes */ -#include +#include /** - * \file extensible.h - * \brief Utilities to create extensible public classes with stable ABIs + * \file class.h + * \brief Utilities to help constructing public class interfaces + * + * The extensible class can be inheritted to create public classes with stable + * ABIs. */ namespace libcamera { diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build index 5a4bf0d7ba4f..552893a29dc0 100644 --- a/src/libcamera/meson.build +++ b/src/libcamera/meson.build @@ -9,6 +9,7 @@ libcamera_sources = files([ 'camera_controls.cpp', 'camera_manager.cpp', 'camera_sensor.cpp', + 'class.cpp', 'controls.cpp', 'control_serializer.cpp', 'control_validator.cpp', @@ -18,7 +19,6 @@ libcamera_sources = files([ 'event_dispatcher.cpp', 'event_dispatcher_poll.cpp', 'event_notifier.cpp', - 'extensible.cpp', 'file.cpp', 'file_descriptor.cpp', 'formats.cpp',