[{"id":17762,"web_url":"https://patchwork.libcamera.org/comment/17762/","msgid":"<CAO5uPHNQ02kTKV3eZTwLW7v-cTfN8Bk2112+VBHirWCHJhFtyw@mail.gmail.com>","date":"2021-06-25T03:46:42","subject":"Re: [libcamera-devel] [PATCH 10/16] libcamera/base: Move File to\n\tbase library","submitter":{"id":63,"url":"https://patchwork.libcamera.org/api/people/63/","name":"Hirokazu Honda","email":"hiroh@chromium.org"},"content":"Hi Kieran, thank you for the patch.\n\nOn Fri, Jun 25, 2021 at 10:35 AM Kieran Bingham\n<kieran.bingham@ideasonboard.com> wrote:\n>\n> The File abstraction is a base helper and not part of the libcamera\n> API.  Move it to the base library to allow usage when reading and\n> writing to files.\n>\n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Hirokazu Honda <hiroh@chromium.org>\n\n> ---\n>  include/libcamera/{internal => base}/file.h |  6 +++---\n>  include/libcamera/base/meson.build          |  1 +\n>  include/libcamera/internal/meson.build      |  1 -\n>  src/ipa/vimc/vimc.cpp                       | 11 ++++-------\n>  src/libcamera/{ => base}/file.cpp           |  4 ++--\n>  src/libcamera/base/meson.build              |  1 +\n>  src/libcamera/ipa_manager.cpp               |  2 +-\n>  src/libcamera/ipa_module.cpp                |  2 +-\n>  src/libcamera/meson.build                   |  1 -\n>  src/libcamera/sysfs.cpp                     |  3 +--\n>  test/file.cpp                               |  2 +-\n>  test/hotplug-cameras.cpp                    |  3 +--\n>  12 files changed, 16 insertions(+), 21 deletions(-)\n>  rename include/libcamera/{internal => base}/file.h (91%)\n>  rename src/libcamera/{ => base}/file.cpp (99%)\n>\n> diff --git a/include/libcamera/internal/file.h b/include/libcamera/base/file.h\n> similarity index 91%\n> rename from include/libcamera/internal/file.h\n> rename to include/libcamera/base/file.h\n> index 44621ceb4c19..e8e4b76e1a4e 100644\n> --- a/include/libcamera/internal/file.h\n> +++ b/include/libcamera/base/file.h\n> @@ -4,8 +4,8 @@\n>   *\n>   * file.h - File I/O operations\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_FILE_H__\n> -#define __LIBCAMERA_INTERNAL_FILE_H__\n> +#ifndef __LIBCAMERA_BASE_FILE_H__\n> +#define __LIBCAMERA_BASE_FILE_H__\n>\n>  #include <map>\n>  #include <string>\n> @@ -75,4 +75,4 @@ private:\n>\n>  } /* namespace libcamera */\n>\n> -#endif /* __LIBCAMERA_INTERNAL_FILE_H__ */\n> +#endif /* __LIBCAMERA_BASE_FILE_H__ */\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> index 7a858dcb6f1a..6fc6c138a5fd 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -7,6 +7,7 @@ libcamera_base_headers = files([\n>      'class.h',\n>      'event_dispatcher.h',\n>      'event_dispatcher_poll.h',\n> +    'file.h',\n>      'log.h',\n>      'message.h',\n>      'object.h',\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index 64f50373a7fb..b10285edac27 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -23,7 +23,6 @@ libcamera_internal_headers = files([\n>      'device_enumerator_sysfs.h',\n>      'device_enumerator_udev.h',\n>      'event_notifier.h',\n> -    'file.h',\n>      'formats.h',\n>      'ipa_manager.h',\n>      'ipa_module.h',\n> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\n> index 9ffd07f493a1..cb9414e7b97a 100644\n> --- a/src/ipa/vimc/vimc.cpp\n> +++ b/src/ipa/vimc/vimc.cpp\n> @@ -5,21 +5,18 @@\n>   * ipa_vimc.cpp - Vimc Image Processing Algorithm module\n>   */\n>\n> -#include <libcamera/ipa/vimc_ipa_interface.h>\n> -\n>  #include <fcntl.h>\n> +#include <iostream>\n>  #include <string.h>\n>  #include <sys/stat.h>\n>  #include <unistd.h>\n>\n> -#include <iostream>\n> +#include <libcamera/base/file.h>\n> +#include <libcamera/base/log.h>\n>\n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/ipa_module_info.h>\n> -\n> -#include <libcamera/base/log.h>\n> -\n> -#include \"libcamera/internal/file.h\"\n> +#include <libcamera/ipa/vimc_ipa_interface.h>\n>\n>  namespace libcamera {\n>\n> diff --git a/src/libcamera/file.cpp b/src/libcamera/base/file.cpp\n> similarity index 99%\n> rename from src/libcamera/file.cpp\n> rename to src/libcamera/base/file.cpp\n> index def0f60d044b..073666fa6f66 100644\n> --- a/src/libcamera/file.cpp\n> +++ b/src/libcamera/base/file.cpp\n> @@ -5,7 +5,7 @@\n>   * file.cpp - File I/O operations\n>   */\n>\n> -#include \"libcamera/internal/file.h\"\n> +#include <libcamera/base/file.h>\n>\n>  #include <errno.h>\n>  #include <fcntl.h>\n> @@ -17,7 +17,7 @@\n>  #include <libcamera/base/log.h>\n>\n>  /**\n> - * \\file file.h\n> + * \\file base/file.h\n>   * \\brief File I/O operations\n>   */\n>\n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index 7a19c67c51b8..fb8ed79acd8e 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -5,6 +5,7 @@ libcamera_base_sources = files([\n>      'bound_method.cpp',\n>      'event_dispatcher.cpp',\n>      'event_dispatcher_poll.cpp',\n> +    'file.cpp',\n>      'log.cpp',\n>      'message.cpp',\n>      'object.cpp',\n> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> index 35c7259801fa..b4606c6159e5 100644\n> --- a/src/libcamera/ipa_manager.cpp\n> +++ b/src/libcamera/ipa_manager.cpp\n> @@ -12,10 +12,10 @@\n>  #include <string.h>\n>  #include <sys/types.h>\n>\n> +#include <libcamera/base/file.h>\n>  #include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/ipa_proxy.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\n> index 7ab5557916e7..984c1fed9bdb 100644\n> --- a/src/libcamera/ipa_module.cpp\n> +++ b/src/libcamera/ipa_module.cpp\n> @@ -23,10 +23,10 @@\n>\n>  #include <libcamera/span.h>\n>\n> +#include <libcamera/base/file.h>\n>  #include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>\n> -#include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>\n>  /**\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 86212cec0281..58eee14aed97 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -16,7 +16,6 @@ libcamera_sources = files([\n>      'device_enumerator.cpp',\n>      'device_enumerator_sysfs.cpp',\n>      'event_notifier.cpp',\n> -    'file.cpp',\n>      'file_descriptor.cpp',\n>      'formats.cpp',\n>      'framebuffer_allocator.cpp',\n> diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp\n> index 4372b1348178..44c3331b4e1c 100644\n> --- a/src/libcamera/sysfs.cpp\n> +++ b/src/libcamera/sysfs.cpp\n> @@ -12,10 +12,9 @@\n>  #include <sys/stat.h>\n>  #include <sys/sysmacros.h>\n>\n> +#include <libcamera/base/file.h>\n>  #include <libcamera/base/log.h>\n>\n> -#include \"libcamera/internal/file.h\"\n> -\n>  /**\n>   * \\file sysfs.h\n>   * \\brief Miscellaneous utility functions to access sysfs\n> diff --git a/test/file.cpp b/test/file.cpp\n> index b80667ae5b2f..d768e3235b8c 100644\n> --- a/test/file.cpp\n> +++ b/test/file.cpp\n> @@ -13,7 +13,7 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>\n> -#include \"libcamera/internal/file.h\"\n> +#include <libcamera/base/file.h>\n>\n>  #include \"test.h\"\n>\n> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp\n> index bb160537c5d5..df56040350c5 100644\n> --- a/test/hotplug-cameras.cpp\n> +++ b/test/hotplug-cameras.cpp\n> @@ -15,11 +15,10 @@\n>  #include <libcamera/camera_manager.h>\n>\n>  #include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/file.h>\n>  #include <libcamera/base/thread.h>\n>  #include <libcamera/base/timer.h>\n>\n> -#include \"libcamera/internal/file.h\"\n> -\n>  #include \"test.h\"\n>\n>  using namespace libcamera;\n> --\n> 2.30.2\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 0C018C321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 03:46:54 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id C2B4A684CA;\n\tFri, 25 Jun 2021 05:46:53 +0200 (CEST)","from mail-ed1-x533.google.com (mail-ed1-x533.google.com\n\t[IPv6:2a00:1450:4864:20::533])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 8789F60508\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 05:46:52 +0200 (CEST)","by mail-ed1-x533.google.com with SMTP id i24so11527906edx.4\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tThu, 24 Jun 2021 20:46:52 -0700 (PDT)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=chromium.org header.i=@chromium.org\n\theader.b=\"HF8k34kV\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org;\n\ts=google; \n\th=mime-version:references:in-reply-to:from:date:message-id:subject:to\n\t:cc; bh=ZhzdOy9DxGOO+vg6JOcRM8tJe8DB8RkxFgQFwqo3vcY=;\n\tb=HF8k34kVX8pm6OB0Uk3+Nc7gQA9IQvVm4pukxpHSm/NqfvZN63k6t2xA5UZh/OMC+B\n\tsZA8X/ntrUfZw6zcOVQjGF/rBnhaDfuaRXNWy49CAjRJ+C7w6NzmaGleFY0obzCl3SS9\n\tdwi9TptCRUMAv/U6cPtJ+BbvMUv+c8TCXbdiQ=","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:references:in-reply-to:from:date\n\t:message-id:subject:to:cc;\n\tbh=ZhzdOy9DxGOO+vg6JOcRM8tJe8DB8RkxFgQFwqo3vcY=;\n\tb=gN4GYSp4565PS0PI8ToCfd0tYcqAvoDBZ1eyRKtk1X7beene6LfVgkUjcJ7REX9KTU\n\tHkfznr5dfDdQL+CknhmXJ+F+fTLy58XEuMkCcJuqmx/vWvRgk6fLuhqP+iVlftmXIl50\n\tcdpWNdo9i8gQzqUrD8IGZGZdKzM5uysakDL13gjbUket7ze1GOQG7paw0Aubk/9LvivA\n\tDC3oDJiwQOQuDMutmEq+BoICAaixD8OW9oc+ZTgOSp4vQHSRDwXCKNtO/q39smf6ELpk\n\t5YtjZW7M1gxF104AAja0EI5EG7KyNKTbg8BKpAzYGd1KJK/+Ex1CdYl5Nk2IUPlXKsGz\n\tjuMA==","X-Gm-Message-State":"AOAM530YNWqoKpHUiInd5IDvFdWUv8GM/rj0mUiTYPjkdxo+G4YaZocG\n\tCI2DNzpa+iv6HVG/wA8X0cD35pfiVcCh6errie3bWA==","X-Google-Smtp-Source":"ABdhPJxxpzwj2toZF45XqUFgoZYRwcJd9eoU0iOUy7yf9pn+sD0Z4P86ATy8VqwHPsxKtw9Oa1gLKfzen0VlKzihSyI=","X-Received":"by 2002:a50:f692:: with SMTP id\n\td18mr11546449edn.202.1624592812297; \n\tThu, 24 Jun 2021 20:46:52 -0700 (PDT)","MIME-Version":"1.0","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-11-kieran.bingham@ideasonboard.com>","In-Reply-To":"<20210625013539.625803-11-kieran.bingham@ideasonboard.com>","From":"Hirokazu Honda <hiroh@chromium.org>","Date":"Fri, 25 Jun 2021 12:46:42 +0900","Message-ID":"<CAO5uPHNQ02kTKV3eZTwLW7v-cTfN8Bk2112+VBHirWCHJhFtyw@mail.gmail.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Content-Type":"text/plain; charset=\"UTF-8\"","Subject":"Re: [libcamera-devel] [PATCH 10/16] libcamera/base: Move File to\n\tbase library","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17769,"web_url":"https://patchwork.libcamera.org/comment/17769/","msgid":"<20210625043526.GK2599@pyrite.rasen.tech>","date":"2021-06-25T04:35:26","subject":"Re: [libcamera-devel] [PATCH 10/16] libcamera/base: Move File to\n\tbase library","submitter":{"id":17,"url":"https://patchwork.libcamera.org/api/people/17/","name":"Paul Elder","email":"paul.elder@ideasonboard.com"},"content":"Hi Kieran,\n\nOn Fri, Jun 25, 2021 at 02:35:33AM +0100, Kieran Bingham wrote:\n> The File abstraction is a base helper and not part of the libcamera\n> API.  Move it to the base library to allow usage when reading and\n> writing to files.\n\nIsn't that... a description of the File abstraction? Did you mean \"usage\nby users of the base library\" or something along those lines?\n\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n\nReviewed-by: Paul Elder  <paul.elder@ideasonboard.com>\n\n> ---\n>  include/libcamera/{internal => base}/file.h |  6 +++---\n>  include/libcamera/base/meson.build          |  1 +\n>  include/libcamera/internal/meson.build      |  1 -\n>  src/ipa/vimc/vimc.cpp                       | 11 ++++-------\n>  src/libcamera/{ => base}/file.cpp           |  4 ++--\n>  src/libcamera/base/meson.build              |  1 +\n>  src/libcamera/ipa_manager.cpp               |  2 +-\n>  src/libcamera/ipa_module.cpp                |  2 +-\n>  src/libcamera/meson.build                   |  1 -\n>  src/libcamera/sysfs.cpp                     |  3 +--\n>  test/file.cpp                               |  2 +-\n>  test/hotplug-cameras.cpp                    |  3 +--\n>  12 files changed, 16 insertions(+), 21 deletions(-)\n>  rename include/libcamera/{internal => base}/file.h (91%)\n>  rename src/libcamera/{ => base}/file.cpp (99%)\n> \n> diff --git a/include/libcamera/internal/file.h b/include/libcamera/base/file.h\n> similarity index 91%\n> rename from include/libcamera/internal/file.h\n> rename to include/libcamera/base/file.h\n> index 44621ceb4c19..e8e4b76e1a4e 100644\n> --- a/include/libcamera/internal/file.h\n> +++ b/include/libcamera/base/file.h\n> @@ -4,8 +4,8 @@\n>   *\n>   * file.h - File I/O operations\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_FILE_H__\n> -#define __LIBCAMERA_INTERNAL_FILE_H__\n> +#ifndef __LIBCAMERA_BASE_FILE_H__\n> +#define __LIBCAMERA_BASE_FILE_H__\n>  \n>  #include <map>\n>  #include <string>\n> @@ -75,4 +75,4 @@ private:\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_INTERNAL_FILE_H__ */\n> +#endif /* __LIBCAMERA_BASE_FILE_H__ */\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> index 7a858dcb6f1a..6fc6c138a5fd 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -7,6 +7,7 @@ libcamera_base_headers = files([\n>      'class.h',\n>      'event_dispatcher.h',\n>      'event_dispatcher_poll.h',\n> +    'file.h',\n>      'log.h',\n>      'message.h',\n>      'object.h',\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index 64f50373a7fb..b10285edac27 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -23,7 +23,6 @@ libcamera_internal_headers = files([\n>      'device_enumerator_sysfs.h',\n>      'device_enumerator_udev.h',\n>      'event_notifier.h',\n> -    'file.h',\n>      'formats.h',\n>      'ipa_manager.h',\n>      'ipa_module.h',\n> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\n> index 9ffd07f493a1..cb9414e7b97a 100644\n> --- a/src/ipa/vimc/vimc.cpp\n> +++ b/src/ipa/vimc/vimc.cpp\n> @@ -5,21 +5,18 @@\n>   * ipa_vimc.cpp - Vimc Image Processing Algorithm module\n>   */\n>  \n> -#include <libcamera/ipa/vimc_ipa_interface.h>\n> -\n>  #include <fcntl.h>\n> +#include <iostream>\n>  #include <string.h>\n>  #include <sys/stat.h>\n>  #include <unistd.h>\n>  \n> -#include <iostream>\n> +#include <libcamera/base/file.h>\n> +#include <libcamera/base/log.h>\n>  \n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/ipa_module_info.h>\n> -\n> -#include <libcamera/base/log.h>\n> -\n> -#include \"libcamera/internal/file.h\"\n> +#include <libcamera/ipa/vimc_ipa_interface.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/src/libcamera/file.cpp b/src/libcamera/base/file.cpp\n> similarity index 99%\n> rename from src/libcamera/file.cpp\n> rename to src/libcamera/base/file.cpp\n> index def0f60d044b..073666fa6f66 100644\n> --- a/src/libcamera/file.cpp\n> +++ b/src/libcamera/base/file.cpp\n> @@ -5,7 +5,7 @@\n>   * file.cpp - File I/O operations\n>   */\n>  \n> -#include \"libcamera/internal/file.h\"\n> +#include <libcamera/base/file.h>\n>  \n>  #include <errno.h>\n>  #include <fcntl.h>\n> @@ -17,7 +17,7 @@\n>  #include <libcamera/base/log.h>\n>  \n>  /**\n> - * \\file file.h\n> + * \\file base/file.h\n>   * \\brief File I/O operations\n>   */\n>  \n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index 7a19c67c51b8..fb8ed79acd8e 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -5,6 +5,7 @@ libcamera_base_sources = files([\n>      'bound_method.cpp',\n>      'event_dispatcher.cpp',\n>      'event_dispatcher_poll.cpp',\n> +    'file.cpp',\n>      'log.cpp',\n>      'message.cpp',\n>      'object.cpp',\n> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> index 35c7259801fa..b4606c6159e5 100644\n> --- a/src/libcamera/ipa_manager.cpp\n> +++ b/src/libcamera/ipa_manager.cpp\n> @@ -12,10 +12,10 @@\n>  #include <string.h>\n>  #include <sys/types.h>\n>  \n> +#include <libcamera/base/file.h>\n>  #include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/ipa_proxy.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\n> index 7ab5557916e7..984c1fed9bdb 100644\n> --- a/src/libcamera/ipa_module.cpp\n> +++ b/src/libcamera/ipa_module.cpp\n> @@ -23,10 +23,10 @@\n>  \n>  #include <libcamera/span.h>\n>  \n> +#include <libcamera/base/file.h>\n>  #include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 86212cec0281..58eee14aed97 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -16,7 +16,6 @@ libcamera_sources = files([\n>      'device_enumerator.cpp',\n>      'device_enumerator_sysfs.cpp',\n>      'event_notifier.cpp',\n> -    'file.cpp',\n>      'file_descriptor.cpp',\n>      'formats.cpp',\n>      'framebuffer_allocator.cpp',\n> diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp\n> index 4372b1348178..44c3331b4e1c 100644\n> --- a/src/libcamera/sysfs.cpp\n> +++ b/src/libcamera/sysfs.cpp\n> @@ -12,10 +12,9 @@\n>  #include <sys/stat.h>\n>  #include <sys/sysmacros.h>\n>  \n> +#include <libcamera/base/file.h>\n>  #include <libcamera/base/log.h>\n>  \n> -#include \"libcamera/internal/file.h\"\n> -\n>  /**\n>   * \\file sysfs.h\n>   * \\brief Miscellaneous utility functions to access sysfs\n> diff --git a/test/file.cpp b/test/file.cpp\n> index b80667ae5b2f..d768e3235b8c 100644\n> --- a/test/file.cpp\n> +++ b/test/file.cpp\n> @@ -13,7 +13,7 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include \"libcamera/internal/file.h\"\n> +#include <libcamera/base/file.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp\n> index bb160537c5d5..df56040350c5 100644\n> --- a/test/hotplug-cameras.cpp\n> +++ b/test/hotplug-cameras.cpp\n> @@ -15,11 +15,10 @@\n>  #include <libcamera/camera_manager.h>\n>  \n>  #include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/file.h>\n>  #include <libcamera/base/thread.h>\n>  #include <libcamera/base/timer.h>\n>  \n> -#include \"libcamera/internal/file.h\"\n> -\n>  #include \"test.h\"\n>  \n>  using namespace libcamera;\n> -- \n> 2.30.2\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id BAF3CC321D\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 04:35:34 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 3A098684CE;\n\tFri, 25 Jun 2021 06:35:34 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 5CC9F684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 06:35:33 +0200 (CEST)","from pyrite.rasen.tech (unknown\n\t[IPv6:2400:4051:61:600:2c71:1b79:d06d:5032])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 8D133501;\n\tFri, 25 Jun 2021 06:35:31 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"UCfU8mlW\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624595733;\n\tbh=6vSmoqhxEK7hIQpXp3dWNU76mS9pwIuXlC4c6RggqMU=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=UCfU8mlWC6BlC0L/iYulVnVW95IJ51xnP/NU1j+u6P1RogxkbFzQ4C4icXv/bNXLL\n\t2ShSXTv7nHnKrksvf+DhjZ4hSGXT/eBEBSVOG1/4M0ck/6syYJo/BK6EDjHAvQUKa8\n\t4ZlOs2KskK8bgCKaRVFKMVaDwWyVZBnoeyQCuAl8=","Date":"Fri, 25 Jun 2021 13:35:26 +0900","From":"paul.elder@ideasonboard.com","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<20210625043526.GK2599@pyrite.rasen.tech>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-11-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-11-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 10/16] libcamera/base: Move File to\n\tbase library","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17783,"web_url":"https://patchwork.libcamera.org/comment/17783/","msgid":"<7f0aebf3-ff89-8154-ace5-435b723886c6@ideasonboard.com>","date":"2021-06-25T09:23:42","subject":"Re: [libcamera-devel] [PATCH 10/16] libcamera/base: Move File to\n\tbase library","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Paul,\n\nOn 25/06/2021 05:35, paul.elder@ideasonboard.com wrote:\n> Hi Kieran,\n> \n> On Fri, Jun 25, 2021 at 02:35:33AM +0100, Kieran Bingham wrote:\n>> The File abstraction is a base helper and not part of the libcamera\n>> API.  Move it to the base library to allow usage when reading and\n>> writing to files.\n> \n> Isn't that... a description of the File abstraction? Did you mean \"usage\n> by users of the base library\" or something along those lines?\n> \n\nHaha probably yes - I'll update.\n\n\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> \n> Reviewed-by: Paul Elder  <paul.elder@ideasonboard.com>\n> \n>> ---\n>>  include/libcamera/{internal => base}/file.h |  6 +++---\n>>  include/libcamera/base/meson.build          |  1 +\n>>  include/libcamera/internal/meson.build      |  1 -\n>>  src/ipa/vimc/vimc.cpp                       | 11 ++++-------\n>>  src/libcamera/{ => base}/file.cpp           |  4 ++--\n>>  src/libcamera/base/meson.build              |  1 +\n>>  src/libcamera/ipa_manager.cpp               |  2 +-\n>>  src/libcamera/ipa_module.cpp                |  2 +-\n>>  src/libcamera/meson.build                   |  1 -\n>>  src/libcamera/sysfs.cpp                     |  3 +--\n>>  test/file.cpp                               |  2 +-\n>>  test/hotplug-cameras.cpp                    |  3 +--\n>>  12 files changed, 16 insertions(+), 21 deletions(-)\n>>  rename include/libcamera/{internal => base}/file.h (91%)\n>>  rename src/libcamera/{ => base}/file.cpp (99%)\n>>\n>> diff --git a/include/libcamera/internal/file.h b/include/libcamera/base/file.h\n>> similarity index 91%\n>> rename from include/libcamera/internal/file.h\n>> rename to include/libcamera/base/file.h\n>> index 44621ceb4c19..e8e4b76e1a4e 100644\n>> --- a/include/libcamera/internal/file.h\n>> +++ b/include/libcamera/base/file.h\n>> @@ -4,8 +4,8 @@\n>>   *\n>>   * file.h - File I/O operations\n>>   */\n>> -#ifndef __LIBCAMERA_INTERNAL_FILE_H__\n>> -#define __LIBCAMERA_INTERNAL_FILE_H__\n>> +#ifndef __LIBCAMERA_BASE_FILE_H__\n>> +#define __LIBCAMERA_BASE_FILE_H__\n>>  \n>>  #include <map>\n>>  #include <string>\n>> @@ -75,4 +75,4 @@ private:\n>>  \n>>  } /* namespace libcamera */\n>>  \n>> -#endif /* __LIBCAMERA_INTERNAL_FILE_H__ */\n>> +#endif /* __LIBCAMERA_BASE_FILE_H__ */\n>> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n>> index 7a858dcb6f1a..6fc6c138a5fd 100644\n>> --- a/include/libcamera/base/meson.build\n>> +++ b/include/libcamera/base/meson.build\n>> @@ -7,6 +7,7 @@ libcamera_base_headers = files([\n>>      'class.h',\n>>      'event_dispatcher.h',\n>>      'event_dispatcher_poll.h',\n>> +    'file.h',\n>>      'log.h',\n>>      'message.h',\n>>      'object.h',\n>> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n>> index 64f50373a7fb..b10285edac27 100644\n>> --- a/include/libcamera/internal/meson.build\n>> +++ b/include/libcamera/internal/meson.build\n>> @@ -23,7 +23,6 @@ libcamera_internal_headers = files([\n>>      'device_enumerator_sysfs.h',\n>>      'device_enumerator_udev.h',\n>>      'event_notifier.h',\n>> -    'file.h',\n>>      'formats.h',\n>>      'ipa_manager.h',\n>>      'ipa_module.h',\n>> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\n>> index 9ffd07f493a1..cb9414e7b97a 100644\n>> --- a/src/ipa/vimc/vimc.cpp\n>> +++ b/src/ipa/vimc/vimc.cpp\n>> @@ -5,21 +5,18 @@\n>>   * ipa_vimc.cpp - Vimc Image Processing Algorithm module\n>>   */\n>>  \n>> -#include <libcamera/ipa/vimc_ipa_interface.h>\n>> -\n>>  #include <fcntl.h>\n>> +#include <iostream>\n>>  #include <string.h>\n>>  #include <sys/stat.h>\n>>  #include <unistd.h>\n>>  \n>> -#include <iostream>\n>> +#include <libcamera/base/file.h>\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include <libcamera/ipa/ipa_interface.h>\n>>  #include <libcamera/ipa/ipa_module_info.h>\n>> -\n>> -#include <libcamera/base/log.h>\n>> -\n>> -#include \"libcamera/internal/file.h\"\n>> +#include <libcamera/ipa/vimc_ipa_interface.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/src/libcamera/file.cpp b/src/libcamera/base/file.cpp\n>> similarity index 99%\n>> rename from src/libcamera/file.cpp\n>> rename to src/libcamera/base/file.cpp\n>> index def0f60d044b..073666fa6f66 100644\n>> --- a/src/libcamera/file.cpp\n>> +++ b/src/libcamera/base/file.cpp\n>> @@ -5,7 +5,7 @@\n>>   * file.cpp - File I/O operations\n>>   */\n>>  \n>> -#include \"libcamera/internal/file.h\"\n>> +#include <libcamera/base/file.h>\n>>  \n>>  #include <errno.h>\n>>  #include <fcntl.h>\n>> @@ -17,7 +17,7 @@\n>>  #include <libcamera/base/log.h>\n>>  \n>>  /**\n>> - * \\file file.h\n>> + * \\file base/file.h\n>>   * \\brief File I/O operations\n>>   */\n>>  \n>> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n>> index 7a19c67c51b8..fb8ed79acd8e 100644\n>> --- a/src/libcamera/base/meson.build\n>> +++ b/src/libcamera/base/meson.build\n>> @@ -5,6 +5,7 @@ libcamera_base_sources = files([\n>>      'bound_method.cpp',\n>>      'event_dispatcher.cpp',\n>>      'event_dispatcher_poll.cpp',\n>> +    'file.cpp',\n>>      'log.cpp',\n>>      'message.cpp',\n>>      'object.cpp',\n>> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n>> index 35c7259801fa..b4606c6159e5 100644\n>> --- a/src/libcamera/ipa_manager.cpp\n>> +++ b/src/libcamera/ipa_manager.cpp\n>> @@ -12,10 +12,10 @@\n>>  #include <string.h>\n>>  #include <sys/types.h>\n>>  \n>> +#include <libcamera/base/file.h>\n>>  #include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/file.h\"\n>>  #include \"libcamera/internal/ipa_module.h\"\n>>  #include \"libcamera/internal/ipa_proxy.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\n>> index 7ab5557916e7..984c1fed9bdb 100644\n>> --- a/src/libcamera/ipa_module.cpp\n>> +++ b/src/libcamera/ipa_module.cpp\n>> @@ -23,10 +23,10 @@\n>>  \n>>  #include <libcamera/span.h>\n>>  \n>> +#include <libcamera/base/file.h>\n>>  #include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/file.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  \n>>  /**\n>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n>> index 86212cec0281..58eee14aed97 100644\n>> --- a/src/libcamera/meson.build\n>> +++ b/src/libcamera/meson.build\n>> @@ -16,7 +16,6 @@ libcamera_sources = files([\n>>      'device_enumerator.cpp',\n>>      'device_enumerator_sysfs.cpp',\n>>      'event_notifier.cpp',\n>> -    'file.cpp',\n>>      'file_descriptor.cpp',\n>>      'formats.cpp',\n>>      'framebuffer_allocator.cpp',\n>> diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp\n>> index 4372b1348178..44c3331b4e1c 100644\n>> --- a/src/libcamera/sysfs.cpp\n>> +++ b/src/libcamera/sysfs.cpp\n>> @@ -12,10 +12,9 @@\n>>  #include <sys/stat.h>\n>>  #include <sys/sysmacros.h>\n>>  \n>> +#include <libcamera/base/file.h>\n>>  #include <libcamera/base/log.h>\n>>  \n>> -#include \"libcamera/internal/file.h\"\n>> -\n>>  /**\n>>   * \\file sysfs.h\n>>   * \\brief Miscellaneous utility functions to access sysfs\n>> diff --git a/test/file.cpp b/test/file.cpp\n>> index b80667ae5b2f..d768e3235b8c 100644\n>> --- a/test/file.cpp\n>> +++ b/test/file.cpp\n>> @@ -13,7 +13,7 @@\n>>  #include <sys/types.h>\n>>  #include <unistd.h>\n>>  \n>> -#include \"libcamera/internal/file.h\"\n>> +#include <libcamera/base/file.h>\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp\n>> index bb160537c5d5..df56040350c5 100644\n>> --- a/test/hotplug-cameras.cpp\n>> +++ b/test/hotplug-cameras.cpp\n>> @@ -15,11 +15,10 @@\n>>  #include <libcamera/camera_manager.h>\n>>  \n>>  #include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/file.h>\n>>  #include <libcamera/base/thread.h>\n>>  #include <libcamera/base/timer.h>\n>>  \n>> -#include \"libcamera/internal/file.h\"\n>> -\n>>  #include \"test.h\"\n>>  \n>>  using namespace libcamera;\n>> -- \n>> 2.30.2\n>>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 96AEEC321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 09:23:48 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id D84E2684D0;\n\tFri, 25 Jun 2021 11:23:47 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 6E60E684CB\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 11:23:46 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id ECAB2501;\n\tFri, 25 Jun 2021 11:23:45 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"D5pHPJNz\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624613026;\n\tbh=x1hUeHKRj6G0cfNVJeMdL/W2wSUeNyGoPdUy4FYt5M0=;\n\th=From:Subject:To:Cc:References:Date:In-Reply-To:From;\n\tb=D5pHPJNzoPNvdfgLaar++ZRKp9Dy+qPW/TKo789PQAuQV0YcnkWMU7VyoNAxK9wU3\n\t7zV9XnwIBqYvO02tovY71axFZ4ycDlHmooVNKUyDrB87fM+V6U21Bg9XQZx1oG379V\n\t3og2NcH1C0SmwP4B8qmGl66d8tS3Gnha+2QKXF4E=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"paul.elder@ideasonboard.com","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-11-kieran.bingham@ideasonboard.com>\n\t<20210625043526.GK2599@pyrite.rasen.tech>","Message-ID":"<7f0aebf3-ff89-8154-ace5-435b723886c6@ideasonboard.com>","Date":"Fri, 25 Jun 2021 10:23:42 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<20210625043526.GK2599@pyrite.rasen.tech>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"7bit","Subject":"Re: [libcamera-devel] [PATCH 10/16] libcamera/base: Move File to\n\tbase library","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17806,"web_url":"https://patchwork.libcamera.org/comment/17806/","msgid":"<YNXOXil//NCZBhTc@pendragon.ideasonboard.com>","date":"2021-06-25T12:38:54","subject":"Re: [libcamera-devel] [PATCH 10/16] libcamera/base: Move File to\n\tbase library","submitter":{"id":2,"url":"https://patchwork.libcamera.org/api/people/2/","name":"Laurent Pinchart","email":"laurent.pinchart@ideasonboard.com"},"content":"Hi Kieran,\n\nThank you for the patch.\n\nOn Fri, Jun 25, 2021 at 02:35:33AM +0100, Kieran Bingham wrote:\n> The File abstraction is a base helper and not part of the libcamera\n> API.  Move it to the base library to allow usage when reading and\n> writing to files.\n> \n> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n> ---\n>  include/libcamera/{internal => base}/file.h |  6 +++---\n>  include/libcamera/base/meson.build          |  1 +\n>  include/libcamera/internal/meson.build      |  1 -\n>  src/ipa/vimc/vimc.cpp                       | 11 ++++-------\n>  src/libcamera/{ => base}/file.cpp           |  4 ++--\n>  src/libcamera/base/meson.build              |  1 +\n>  src/libcamera/ipa_manager.cpp               |  2 +-\n>  src/libcamera/ipa_module.cpp                |  2 +-\n>  src/libcamera/meson.build                   |  1 -\n>  src/libcamera/sysfs.cpp                     |  3 +--\n>  test/file.cpp                               |  2 +-\n>  test/hotplug-cameras.cpp                    |  3 +--\n>  12 files changed, 16 insertions(+), 21 deletions(-)\n>  rename include/libcamera/{internal => base}/file.h (91%)\n>  rename src/libcamera/{ => base}/file.cpp (99%)\n> \n> diff --git a/include/libcamera/internal/file.h b/include/libcamera/base/file.h\n> similarity index 91%\n> rename from include/libcamera/internal/file.h\n> rename to include/libcamera/base/file.h\n> index 44621ceb4c19..e8e4b76e1a4e 100644\n> --- a/include/libcamera/internal/file.h\n> +++ b/include/libcamera/base/file.h\n> @@ -4,8 +4,8 @@\n>   *\n>   * file.h - File I/O operations\n>   */\n> -#ifndef __LIBCAMERA_INTERNAL_FILE_H__\n> -#define __LIBCAMERA_INTERNAL_FILE_H__\n> +#ifndef __LIBCAMERA_BASE_FILE_H__\n> +#define __LIBCAMERA_BASE_FILE_H__\n>  \n>  #include <map>\n>  #include <string>\n> @@ -75,4 +75,4 @@ private:\n>  \n>  } /* namespace libcamera */\n>  \n> -#endif /* __LIBCAMERA_INTERNAL_FILE_H__ */\n> +#endif /* __LIBCAMERA_BASE_FILE_H__ */\n> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n> index 7a858dcb6f1a..6fc6c138a5fd 100644\n> --- a/include/libcamera/base/meson.build\n> +++ b/include/libcamera/base/meson.build\n> @@ -7,6 +7,7 @@ libcamera_base_headers = files([\n>      'class.h',\n>      'event_dispatcher.h',\n>      'event_dispatcher_poll.h',\n> +    'file.h',\n>      'log.h',\n>      'message.h',\n>      'object.h',\n> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n> index 64f50373a7fb..b10285edac27 100644\n> --- a/include/libcamera/internal/meson.build\n> +++ b/include/libcamera/internal/meson.build\n> @@ -23,7 +23,6 @@ libcamera_internal_headers = files([\n>      'device_enumerator_sysfs.h',\n>      'device_enumerator_udev.h',\n>      'event_notifier.h',\n> -    'file.h',\n>      'formats.h',\n>      'ipa_manager.h',\n>      'ipa_module.h',\n> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\n> index 9ffd07f493a1..cb9414e7b97a 100644\n> --- a/src/ipa/vimc/vimc.cpp\n> +++ b/src/ipa/vimc/vimc.cpp\n> @@ -5,21 +5,18 @@\n>   * ipa_vimc.cpp - Vimc Image Processing Algorithm module\n>   */\n>  \n> -#include <libcamera/ipa/vimc_ipa_interface.h>\n> -\n\nI think this was done on purpose to ensure self-contained compilation\ntest of libcamera/ipa/vimc_ipa_interface.h.\n\n>  #include <fcntl.h>\n> +#include <iostream>\n>  #include <string.h>\n>  #include <sys/stat.h>\n>  #include <unistd.h>\n>  \n> -#include <iostream>\n> +#include <libcamera/base/file.h>\n> +#include <libcamera/base/log.h>\n>  \n>  #include <libcamera/ipa/ipa_interface.h>\n>  #include <libcamera/ipa/ipa_module_info.h>\n> -\n> -#include <libcamera/base/log.h>\n> -\n> -#include \"libcamera/internal/file.h\"\n> +#include <libcamera/ipa/vimc_ipa_interface.h>\n>  \n>  namespace libcamera {\n>  \n> diff --git a/src/libcamera/file.cpp b/src/libcamera/base/file.cpp\n> similarity index 99%\n> rename from src/libcamera/file.cpp\n> rename to src/libcamera/base/file.cpp\n> index def0f60d044b..073666fa6f66 100644\n> --- a/src/libcamera/file.cpp\n> +++ b/src/libcamera/base/file.cpp\n> @@ -5,7 +5,7 @@\n>   * file.cpp - File I/O operations\n>   */\n>  \n> -#include \"libcamera/internal/file.h\"\n> +#include <libcamera/base/file.h>\n>  \n>  #include <errno.h>\n>  #include <fcntl.h>\n> @@ -17,7 +17,7 @@\n>  #include <libcamera/base/log.h>\n>  \n>  /**\n> - * \\file file.h\n> + * \\file base/file.h\n>   * \\brief File I/O operations\n>   */\n>  \n> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n> index 7a19c67c51b8..fb8ed79acd8e 100644\n> --- a/src/libcamera/base/meson.build\n> +++ b/src/libcamera/base/meson.build\n> @@ -5,6 +5,7 @@ libcamera_base_sources = files([\n>      'bound_method.cpp',\n>      'event_dispatcher.cpp',\n>      'event_dispatcher_poll.cpp',\n> +    'file.cpp',\n>      'log.cpp',\n>      'message.cpp',\n>      'object.cpp',\n> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n> index 35c7259801fa..b4606c6159e5 100644\n> --- a/src/libcamera/ipa_manager.cpp\n> +++ b/src/libcamera/ipa_manager.cpp\n> @@ -12,10 +12,10 @@\n>  #include <string.h>\n>  #include <sys/types.h>\n>  \n> +#include <libcamera/base/file.h>\n>  #include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/ipa_module.h\"\n>  #include \"libcamera/internal/ipa_proxy.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\n> index 7ab5557916e7..984c1fed9bdb 100644\n> --- a/src/libcamera/ipa_module.cpp\n> +++ b/src/libcamera/ipa_module.cpp\n> @@ -23,10 +23,10 @@\n>  \n>  #include <libcamera/span.h>\n>  \n> +#include <libcamera/base/file.h>\n>  #include <libcamera/base/log.h>\n>  #include <libcamera/base/utils.h>\n>  \n> -#include \"libcamera/internal/file.h\"\n>  #include \"libcamera/internal/pipeline_handler.h\"\n>  \n>  /**\n> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n> index 86212cec0281..58eee14aed97 100644\n> --- a/src/libcamera/meson.build\n> +++ b/src/libcamera/meson.build\n> @@ -16,7 +16,6 @@ libcamera_sources = files([\n>      'device_enumerator.cpp',\n>      'device_enumerator_sysfs.cpp',\n>      'event_notifier.cpp',\n> -    'file.cpp',\n>      'file_descriptor.cpp',\n>      'formats.cpp',\n>      'framebuffer_allocator.cpp',\n> diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp\n> index 4372b1348178..44c3331b4e1c 100644\n> --- a/src/libcamera/sysfs.cpp\n> +++ b/src/libcamera/sysfs.cpp\n> @@ -12,10 +12,9 @@\n>  #include <sys/stat.h>\n>  #include <sys/sysmacros.h>\n>  \n> +#include <libcamera/base/file.h>\n>  #include <libcamera/base/log.h>\n>  \n> -#include \"libcamera/internal/file.h\"\n> -\n>  /**\n>   * \\file sysfs.h\n>   * \\brief Miscellaneous utility functions to access sysfs\n> diff --git a/test/file.cpp b/test/file.cpp\n> index b80667ae5b2f..d768e3235b8c 100644\n> --- a/test/file.cpp\n> +++ b/test/file.cpp\n> @@ -13,7 +13,7 @@\n>  #include <sys/types.h>\n>  #include <unistd.h>\n>  \n> -#include \"libcamera/internal/file.h\"\n> +#include <libcamera/base/file.h>\n>  \n>  #include \"test.h\"\n>  \n> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp\n> index bb160537c5d5..df56040350c5 100644\n> --- a/test/hotplug-cameras.cpp\n> +++ b/test/hotplug-cameras.cpp\n> @@ -15,11 +15,10 @@\n>  #include <libcamera/camera_manager.h>\n>  \n>  #include <libcamera/base/event_dispatcher.h>\n> +#include <libcamera/base/file.h>\n>  #include <libcamera/base/thread.h>\n>  #include <libcamera/base/timer.h>\n>  \n> -#include \"libcamera/internal/file.h\"\n> -\n\nIt's nice to see tests having less dependencies on internal headers. On\ntop of this series we should move tests from internal_tests to\npublic_tests where possible.\n\nReviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\n>  #include \"test.h\"\n>  \n>  using namespace libcamera;","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id B21D8C321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 12:39:27 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id 0E19F684CE;\n\tFri, 25 Jun 2021 14:39:27 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 9326D684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 14:39:25 +0200 (CEST)","from pendragon.ideasonboard.com (62-78-145-57.bb.dnainternet.fi\n\t[62.78.145.57])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id 188F18B6;\n\tFri, 25 Jun 2021 14:39:25 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"Ok7ivkjK\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624624765;\n\tbh=NtXdf1RFH9yTy4JPYJd8q75CHHqKsGJIExOvFhAkdJM=;\n\th=Date:From:To:Cc:Subject:References:In-Reply-To:From;\n\tb=Ok7ivkjKS+Eet2NpyzDQjlJuou6IALlOCLPkTiI+3ztL/YnoiFrudhUKWxWl9GOaM\n\tUxpqPyDYF6ntJUYEmmrfaRgREypfExhdxscTAokH7Cfx5Je7CVHwylr8Llr2kE/1qS\n\tlrf/B7cPUCw0g10vqh2OUCJwb3qQs6RMBuFkxy0o=","Date":"Fri, 25 Jun 2021 15:38:54 +0300","From":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","To":"Kieran Bingham <kieran.bingham@ideasonboard.com>","Message-ID":"<YNXOXil//NCZBhTc@pendragon.ideasonboard.com>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-11-kieran.bingham@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=utf-8","Content-Disposition":"inline","In-Reply-To":"<20210625013539.625803-11-kieran.bingham@ideasonboard.com>","Subject":"Re: [libcamera-devel] [PATCH 10/16] libcamera/base: Move File to\n\tbase library","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}},{"id":17814,"web_url":"https://patchwork.libcamera.org/comment/17814/","msgid":"<8b95a0cc-58ad-dabd-803b-761a1fae4ed9@ideasonboard.com>","date":"2021-06-25T14:42:06","subject":"Re: [libcamera-devel] [PATCH 10/16] libcamera/base: Move File to\n\tbase library","submitter":{"id":4,"url":"https://patchwork.libcamera.org/api/people/4/","name":"Kieran Bingham","email":"kieran.bingham@ideasonboard.com"},"content":"Hi Laurent,\n\nOn 25/06/2021 13:38, Laurent Pinchart wrote:\n> Hi Kieran,\n> \n> Thank you for the patch.\n> \n> On Fri, Jun 25, 2021 at 02:35:33AM +0100, Kieran Bingham wrote:\n>> The File abstraction is a base helper and not part of the libcamera\n>> API.  Move it to the base library to allow usage when reading and\n>> writing to files.\n>>\n>> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>\n>> ---\n>>  include/libcamera/{internal => base}/file.h |  6 +++---\n>>  include/libcamera/base/meson.build          |  1 +\n>>  include/libcamera/internal/meson.build      |  1 -\n>>  src/ipa/vimc/vimc.cpp                       | 11 ++++-------\n>>  src/libcamera/{ => base}/file.cpp           |  4 ++--\n>>  src/libcamera/base/meson.build              |  1 +\n>>  src/libcamera/ipa_manager.cpp               |  2 +-\n>>  src/libcamera/ipa_module.cpp                |  2 +-\n>>  src/libcamera/meson.build                   |  1 -\n>>  src/libcamera/sysfs.cpp                     |  3 +--\n>>  test/file.cpp                               |  2 +-\n>>  test/hotplug-cameras.cpp                    |  3 +--\n>>  12 files changed, 16 insertions(+), 21 deletions(-)\n>>  rename include/libcamera/{internal => base}/file.h (91%)\n>>  rename src/libcamera/{ => base}/file.cpp (99%)\n>>\n>> diff --git a/include/libcamera/internal/file.h b/include/libcamera/base/file.h\n>> similarity index 91%\n>> rename from include/libcamera/internal/file.h\n>> rename to include/libcamera/base/file.h\n>> index 44621ceb4c19..e8e4b76e1a4e 100644\n>> --- a/include/libcamera/internal/file.h\n>> +++ b/include/libcamera/base/file.h\n>> @@ -4,8 +4,8 @@\n>>   *\n>>   * file.h - File I/O operations\n>>   */\n>> -#ifndef __LIBCAMERA_INTERNAL_FILE_H__\n>> -#define __LIBCAMERA_INTERNAL_FILE_H__\n>> +#ifndef __LIBCAMERA_BASE_FILE_H__\n>> +#define __LIBCAMERA_BASE_FILE_H__\n>>  \n>>  #include <map>\n>>  #include <string>\n>> @@ -75,4 +75,4 @@ private:\n>>  \n>>  } /* namespace libcamera */\n>>  \n>> -#endif /* __LIBCAMERA_INTERNAL_FILE_H__ */\n>> +#endif /* __LIBCAMERA_BASE_FILE_H__ */\n>> diff --git a/include/libcamera/base/meson.build b/include/libcamera/base/meson.build\n>> index 7a858dcb6f1a..6fc6c138a5fd 100644\n>> --- a/include/libcamera/base/meson.build\n>> +++ b/include/libcamera/base/meson.build\n>> @@ -7,6 +7,7 @@ libcamera_base_headers = files([\n>>      'class.h',\n>>      'event_dispatcher.h',\n>>      'event_dispatcher_poll.h',\n>> +    'file.h',\n>>      'log.h',\n>>      'message.h',\n>>      'object.h',\n>> diff --git a/include/libcamera/internal/meson.build b/include/libcamera/internal/meson.build\n>> index 64f50373a7fb..b10285edac27 100644\n>> --- a/include/libcamera/internal/meson.build\n>> +++ b/include/libcamera/internal/meson.build\n>> @@ -23,7 +23,6 @@ libcamera_internal_headers = files([\n>>      'device_enumerator_sysfs.h',\n>>      'device_enumerator_udev.h',\n>>      'event_notifier.h',\n>> -    'file.h',\n>>      'formats.h',\n>>      'ipa_manager.h',\n>>      'ipa_module.h',\n>> diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp\n>> index 9ffd07f493a1..cb9414e7b97a 100644\n>> --- a/src/ipa/vimc/vimc.cpp\n>> +++ b/src/ipa/vimc/vimc.cpp\n>> @@ -5,21 +5,18 @@\n>>   * ipa_vimc.cpp - Vimc Image Processing Algorithm module\n>>   */\n>>  \n>> -#include <libcamera/ipa/vimc_ipa_interface.h>\n>> -\n> \n> I think this was done on purpose to ensure self-contained compilation\n> test of libcamera/ipa/vimc_ipa_interface.h.\n> \n\nClang-format will keep an interface file 'first' if it's in \"\" as\nopposed to <>. That said, I think it needs to be the same name as the\n.cpp file to match too so even that might not work here.\n\nI'm going to propose later changing includes which are required at the\ntop for interfaces to use \"\" to be able to handle this better.\n\nI'll squash this one back for now.\n\n\n>>  #include <fcntl.h>\n>> +#include <iostream>\n>>  #include <string.h>\n>>  #include <sys/stat.h>\n>>  #include <unistd.h>\n>>  \n>> -#include <iostream>\n>> +#include <libcamera/base/file.h>\n>> +#include <libcamera/base/log.h>\n>>  \n>>  #include <libcamera/ipa/ipa_interface.h>\n>>  #include <libcamera/ipa/ipa_module_info.h>\n>> -\n>> -#include <libcamera/base/log.h>\n>> -\n>> -#include \"libcamera/internal/file.h\"\n>> +#include <libcamera/ipa/vimc_ipa_interface.h>\n>>  \n>>  namespace libcamera {\n>>  \n>> diff --git a/src/libcamera/file.cpp b/src/libcamera/base/file.cpp\n>> similarity index 99%\n>> rename from src/libcamera/file.cpp\n>> rename to src/libcamera/base/file.cpp\n>> index def0f60d044b..073666fa6f66 100644\n>> --- a/src/libcamera/file.cpp\n>> +++ b/src/libcamera/base/file.cpp\n>> @@ -5,7 +5,7 @@\n>>   * file.cpp - File I/O operations\n>>   */\n>>  \n>> -#include \"libcamera/internal/file.h\"\n>> +#include <libcamera/base/file.h>\n>>  \n>>  #include <errno.h>\n>>  #include <fcntl.h>\n>> @@ -17,7 +17,7 @@\n>>  #include <libcamera/base/log.h>\n>>  \n>>  /**\n>> - * \\file file.h\n>> + * \\file base/file.h\n>>   * \\brief File I/O operations\n>>   */\n>>  \n>> diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build\n>> index 7a19c67c51b8..fb8ed79acd8e 100644\n>> --- a/src/libcamera/base/meson.build\n>> +++ b/src/libcamera/base/meson.build\n>> @@ -5,6 +5,7 @@ libcamera_base_sources = files([\n>>      'bound_method.cpp',\n>>      'event_dispatcher.cpp',\n>>      'event_dispatcher_poll.cpp',\n>> +    'file.cpp',\n>>      'log.cpp',\n>>      'message.cpp',\n>>      'object.cpp',\n>> diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp\n>> index 35c7259801fa..b4606c6159e5 100644\n>> --- a/src/libcamera/ipa_manager.cpp\n>> +++ b/src/libcamera/ipa_manager.cpp\n>> @@ -12,10 +12,10 @@\n>>  #include <string.h>\n>>  #include <sys/types.h>\n>>  \n>> +#include <libcamera/base/file.h>\n>>  #include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/file.h\"\n>>  #include \"libcamera/internal/ipa_module.h\"\n>>  #include \"libcamera/internal/ipa_proxy.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>> diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp\n>> index 7ab5557916e7..984c1fed9bdb 100644\n>> --- a/src/libcamera/ipa_module.cpp\n>> +++ b/src/libcamera/ipa_module.cpp\n>> @@ -23,10 +23,10 @@\n>>  \n>>  #include <libcamera/span.h>\n>>  \n>> +#include <libcamera/base/file.h>\n>>  #include <libcamera/base/log.h>\n>>  #include <libcamera/base/utils.h>\n>>  \n>> -#include \"libcamera/internal/file.h\"\n>>  #include \"libcamera/internal/pipeline_handler.h\"\n>>  \n>>  /**\n>> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build\n>> index 86212cec0281..58eee14aed97 100644\n>> --- a/src/libcamera/meson.build\n>> +++ b/src/libcamera/meson.build\n>> @@ -16,7 +16,6 @@ libcamera_sources = files([\n>>      'device_enumerator.cpp',\n>>      'device_enumerator_sysfs.cpp',\n>>      'event_notifier.cpp',\n>> -    'file.cpp',\n>>      'file_descriptor.cpp',\n>>      'formats.cpp',\n>>      'framebuffer_allocator.cpp',\n>> diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp\n>> index 4372b1348178..44c3331b4e1c 100644\n>> --- a/src/libcamera/sysfs.cpp\n>> +++ b/src/libcamera/sysfs.cpp\n>> @@ -12,10 +12,9 @@\n>>  #include <sys/stat.h>\n>>  #include <sys/sysmacros.h>\n>>  \n>> +#include <libcamera/base/file.h>\n>>  #include <libcamera/base/log.h>\n>>  \n>> -#include \"libcamera/internal/file.h\"\n>> -\n>>  /**\n>>   * \\file sysfs.h\n>>   * \\brief Miscellaneous utility functions to access sysfs\n>> diff --git a/test/file.cpp b/test/file.cpp\n>> index b80667ae5b2f..d768e3235b8c 100644\n>> --- a/test/file.cpp\n>> +++ b/test/file.cpp\n>> @@ -13,7 +13,7 @@\n>>  #include <sys/types.h>\n>>  #include <unistd.h>\n>>  \n>> -#include \"libcamera/internal/file.h\"\n>> +#include <libcamera/base/file.h>\n>>  \n>>  #include \"test.h\"\n>>  \n>> diff --git a/test/hotplug-cameras.cpp b/test/hotplug-cameras.cpp\n>> index bb160537c5d5..df56040350c5 100644\n>> --- a/test/hotplug-cameras.cpp\n>> +++ b/test/hotplug-cameras.cpp\n>> @@ -15,11 +15,10 @@\n>>  #include <libcamera/camera_manager.h>\n>>  \n>>  #include <libcamera/base/event_dispatcher.h>\n>> +#include <libcamera/base/file.h>\n>>  #include <libcamera/base/thread.h>\n>>  #include <libcamera/base/timer.h>\n>>  \n>> -#include \"libcamera/internal/file.h\"\n>> -\n> \n> It's nice to see tests having less dependencies on internal headers. On\n> top of this series we should move tests from internal_tests to\n> public_tests where possible.\n\nYes, I suspect some 'base' tests should even move so they only have\nvisibility of the base library too, so there might be more that can be\ndone to re-organise the tests.\n\nThough - using 'File' in this case means LIBCAMERA_BASE_PRIVATE is still\nrequired ...\n\n\n> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n> \n>>  #include \"test.h\"\n>>  \n>>  using namespace libcamera;\n>","headers":{"Return-Path":"<libcamera-devel-bounces@lists.libcamera.org>","X-Original-To":"parsemail@patchwork.libcamera.org","Delivered-To":"parsemail@patchwork.libcamera.org","Received":["from lancelot.ideasonboard.com (lancelot.ideasonboard.com\n\t[92.243.16.209])\n\tby patchwork.libcamera.org (Postfix) with ESMTPS id 6C08AC321A\n\tfor <parsemail@patchwork.libcamera.org>;\n\tFri, 25 Jun 2021 14:42:12 +0000 (UTC)","from lancelot.ideasonboard.com (localhost [IPv6:::1])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTP id AE40C684CD;\n\tFri, 25 Jun 2021 16:42:11 +0200 (CEST)","from perceval.ideasonboard.com (perceval.ideasonboard.com\n\t[213.167.242.64])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 30CB5684C9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tFri, 25 Jun 2021 16:42:10 +0200 (CEST)","from [192.168.0.20]\n\t(cpc89244-aztw30-2-0-cust3082.18-1.cable.virginm.net [86.31.172.11])\n\tby perceval.ideasonboard.com (Postfix) with ESMTPSA id AC5F9501;\n\tFri, 25 Jun 2021 16:42:09 +0200 (CEST)"],"Authentication-Results":"lancelot.ideasonboard.com; dkim=pass (1024-bit key;\n\tunprotected) header.d=ideasonboard.com header.i=@ideasonboard.com\n\theader.b=\"kveRY2wN\"; dkim-atps=neutral","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com;\n\ts=mail; t=1624632129;\n\tbh=fWz5SDYuq1MuFa7PJ+ENitLaCvur05aM+08FsKawqYY=;\n\th=From:To:Cc:References:Subject:Date:In-Reply-To:From;\n\tb=kveRY2wN39fESgQvv7EFx2DSEnorrBV17Me5e/ZIc5Tq4TB05abS99v1pCd1fjXOW\n\tsHgsM/hcIV+BcNy+RuWDeHrFfBiu7ZXCfcb836gFMUQgH2/xMlu2QNyqR4wBAbn6S/\n\trFAPJ2G37a6ym3UykBnw8kgL+7NH5uPcsnSFTvGQ=","From":"Kieran Bingham <kieran.bingham@ideasonboard.com>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","References":"<20210625013539.625803-1-kieran.bingham@ideasonboard.com>\n\t<20210625013539.625803-11-kieran.bingham@ideasonboard.com>\n\t<YNXOXil//NCZBhTc@pendragon.ideasonboard.com>","Message-ID":"<8b95a0cc-58ad-dabd-803b-761a1fae4ed9@ideasonboard.com>","Date":"Fri, 25 Jun 2021 15:42:06 +0100","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101\n\tThunderbird/78.11.0","MIME-Version":"1.0","In-Reply-To":"<YNXOXil//NCZBhTc@pendragon.ideasonboard.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-GB","Content-Transfer-Encoding":"8bit","Subject":"Re: [libcamera-devel] [PATCH 10/16] libcamera/base: Move File to\n\tbase library","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","Cc":"libcamera devel <libcamera-devel@lists.libcamera.org>","Errors-To":"libcamera-devel-bounces@lists.libcamera.org","Sender":"\"libcamera-devel\" <libcamera-devel-bounces@lists.libcamera.org>"}}]