summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKieran Bingham <kieran.bingham@ideasonboard.com>2021-06-16 10:34:07 +0100
committerKieran Bingham <kieran.bingham@ideasonboard.com>2021-06-25 16:11:10 +0100
commitb304bc013ef8022131ef0a146f20c6bad7ac45d5 (patch)
tree6ec2d13a59fcb1be0e1c7df9c2187edf607b3a6a /src
parent27aff949fbc1b9aabfc594bbfd6f94be55a086ec (diff)
libcamera/base: Move File to base library
The File abstraction is a base helper and not part of the libcamera API. Move it to to allow usage by users of the base library. Reviewed-by: Hirokazu Honda <hiroh@chromium.org> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src')
-rw-r--r--src/ipa/vimc/vimc.cpp4
-rw-r--r--src/libcamera/base/file.cpp (renamed from src/libcamera/file.cpp)4
-rw-r--r--src/libcamera/base/meson.build1
-rw-r--r--src/libcamera/ipa_manager.cpp2
-rw-r--r--src/libcamera/ipa_module.cpp2
-rw-r--r--src/libcamera/meson.build1
-rw-r--r--src/libcamera/sysfs.cpp3
7 files changed, 7 insertions, 10 deletions
diff --git a/src/ipa/vimc/vimc.cpp b/src/ipa/vimc/vimc.cpp
index e44765af..2f575853 100644
--- a/src/ipa/vimc/vimc.cpp
+++ b/src/ipa/vimc/vimc.cpp
@@ -4,7 +4,6 @@
*
* ipa_vimc.cpp - Vimc Image Processing Algorithm module
*/
-
#include <libcamera/ipa/vimc_ipa_interface.h>
#include <fcntl.h>
@@ -14,13 +13,12 @@
#include <iostream>
+#include <libcamera/base/file.h>
#include <libcamera/base/log.h>
#include <libcamera/ipa/ipa_interface.h>
#include <libcamera/ipa/ipa_module_info.h>
-#include "libcamera/internal/file.h"
-
namespace libcamera {
LOG_DEFINE_CATEGORY(IPAVimc)
diff --git a/src/libcamera/file.cpp b/src/libcamera/base/file.cpp
index def0f60d..073666fa 100644
--- a/src/libcamera/file.cpp
+++ b/src/libcamera/base/file.cpp
@@ -5,7 +5,7 @@
* file.cpp - File I/O operations
*/
-#include "libcamera/internal/file.h"
+#include <libcamera/base/file.h>
#include <errno.h>
#include <fcntl.h>
@@ -17,7 +17,7 @@
#include <libcamera/base/log.h>
/**
- * \file file.h
+ * \file base/file.h
* \brief File I/O operations
*/
diff --git a/src/libcamera/base/meson.build b/src/libcamera/base/meson.build
index 7a19c67c..fb8ed79a 100644
--- a/src/libcamera/base/meson.build
+++ b/src/libcamera/base/meson.build
@@ -5,6 +5,7 @@ libcamera_base_sources = files([
'bound_method.cpp',
'event_dispatcher.cpp',
'event_dispatcher_poll.cpp',
+ 'file.cpp',
'log.cpp',
'message.cpp',
'object.cpp',
diff --git a/src/libcamera/ipa_manager.cpp b/src/libcamera/ipa_manager.cpp
index 35c72598..b4606c61 100644
--- a/src/libcamera/ipa_manager.cpp
+++ b/src/libcamera/ipa_manager.cpp
@@ -12,10 +12,10 @@
#include <string.h>
#include <sys/types.h>
+#include <libcamera/base/file.h>
#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/file.h"
#include "libcamera/internal/ipa_module.h"
#include "libcamera/internal/ipa_proxy.h"
#include "libcamera/internal/pipeline_handler.h"
diff --git a/src/libcamera/ipa_module.cpp b/src/libcamera/ipa_module.cpp
index 7ab55579..984c1fed 100644
--- a/src/libcamera/ipa_module.cpp
+++ b/src/libcamera/ipa_module.cpp
@@ -23,10 +23,10 @@
#include <libcamera/span.h>
+#include <libcamera/base/file.h>
#include <libcamera/base/log.h>
#include <libcamera/base/utils.h>
-#include "libcamera/internal/file.h"
#include "libcamera/internal/pipeline_handler.h"
/**
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index e915266a..36f6ddd7 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -16,7 +16,6 @@ libcamera_sources = files([
'device_enumerator.cpp',
'device_enumerator_sysfs.cpp',
'event_notifier.cpp',
- 'file.cpp',
'file_descriptor.cpp',
'formats.cpp',
'framebuffer_allocator.cpp',
diff --git a/src/libcamera/sysfs.cpp b/src/libcamera/sysfs.cpp
index 4372b134..44c3331b 100644
--- a/src/libcamera/sysfs.cpp
+++ b/src/libcamera/sysfs.cpp
@@ -12,10 +12,9 @@
#include <sys/stat.h>
#include <sys/sysmacros.h>
+#include <libcamera/base/file.h>
#include <libcamera/base/log.h>
-#include "libcamera/internal/file.h"
-
/**
* \file sysfs.h
* \brief Miscellaneous utility functions to access sysfs