[libcamera-devel,5/5] libcamera: Remove libcamera class

Message ID 20190101212947.28098-6-kieran.bingham@ideasonboard.com
State Accepted
Headers show
Series
  • test: Unit Test Improvements
Related show

Commit Message

Kieran Bingham Jan. 1, 2019, 9:29 p.m. UTC
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

The class was just a placeholder, now that we have other objects
defined, remove it along with the associated test.

The libcamera/libcamera.h header is kept as a shortcut to include the
whole libcamera public API.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[Kieran: Rebase to master]
Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
---
 include/libcamera/libcamera.h | 10 ----------
 src/libcamera/main.cpp        | 19 -------------------
 src/libcamera/meson.build     |  1 -
 test/init.cpp                 | 16 ----------------
 test/meson.build              |  1 -
 5 files changed, 47 deletions(-)
 delete mode 100644 src/libcamera/main.cpp
 delete mode 100644 test/init.cpp

Comments

Laurent Pinchart Jan. 2, 2019, 1:37 a.m. UTC | #1
Hi Kieran,

Thank you for the patch.

On Tuesday, 1 January 2019 23:29:47 EET Kieran Bingham wrote:
> From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> The class was just a placeholder, now that we have other objects
> defined, remove it along with the associated test.
> 
> The libcamera/libcamera.h header is kept as a shortcut to include the
> whole libcamera public API.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> [Kieran: Rebase to master]
> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>

Pushed to master already :-)

> ---
>  include/libcamera/libcamera.h | 10 ----------
>  src/libcamera/main.cpp        | 19 -------------------
>  src/libcamera/meson.build     |  1 -
>  test/init.cpp                 | 16 ----------------
>  test/meson.build              |  1 -
>  5 files changed, 47 deletions(-)
>  delete mode 100644 src/libcamera/main.cpp
>  delete mode 100644 test/init.cpp
> 
> diff --git a/include/libcamera/libcamera.h b/include/libcamera/libcamera.h
> index 32fb1ff741a7..f9556a8bce62 100644
> --- a/include/libcamera/libcamera.h
> +++ b/include/libcamera/libcamera.h
> @@ -10,14 +10,4 @@
>  #include <libcamera/camera.h>
>  #include <libcamera/camera_manager.h>
> 
> -namespace libcamera {
> -
> -class libcamera
> -{
> -public:
> -	void init_lib(void);
> -};
> -
> -};
> -
>  #endif /* __LIBCAMERA_LIBCAMERA_H__ */
> diff --git a/src/libcamera/main.cpp b/src/libcamera/main.cpp
> deleted file mode 100644
> index 7ed37dfcfd5b..000000000000
> --- a/src/libcamera/main.cpp
> +++ /dev/null
> @@ -1,19 +0,0 @@
> -/* SPDX-License-Identifier: LGPL-2.1-or-later */
> -/*
> - * Copyright (C) 2018, Google Inc.
> - *
> - * main.cpp - libcamera main class
> - */
> -
> -#include <libcamera/libcamera.h>
> -
> -#include "log.h"
> -
> -namespace libcamera {
> -
> -void libcamera::init_lib(void)
> -{
> -	LOG(Info) << "Lib Camera Init";
> -}
> -
> -};
> diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
> index 2ff5bb5e7515..78562299fc42 100644
> --- a/src/libcamera/meson.build
> +++ b/src/libcamera/meson.build
> @@ -3,7 +3,6 @@ libcamera_sources = files([
>      'camera_manager.cpp',
>      'device_enumerator.cpp',
>      'log.cpp',
> -    'main.cpp',
>      'media_device.cpp',
>      'media_object.cpp',
>      'pipeline_handler.cpp',
> diff --git a/test/init.cpp b/test/init.cpp
> deleted file mode 100644
> index 4ade4e7690fc..000000000000
> --- a/test/init.cpp
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -/* SPDX-License-Identifier: GPL-2.0-or-later */
> -/*
> - * Copyright (C) 2018, Google Inc.
> - *
> - * init.cpp - libcamera initialization test
> - */
> -
> -#include <libcamera/libcamera.h>
> -
> -int main(void)
> -{
> -	libcamera::libcamera l = libcamera::libcamera();
> -	l.init_lib();
> -
> -	return 0;
> -}
> diff --git a/test/meson.build b/test/meson.build
> index 9270a55e052a..184a7eeb5e27 100644
> --- a/test/meson.build
> +++ b/test/meson.build
> @@ -3,7 +3,6 @@ subdir('libtest')
>  subdir('media_device')
> 
>  public_tests = [
> -    ['test_init',       'init.cpp'],
>      ['list',            'list.cpp'],
>  ]

Patch

diff --git a/include/libcamera/libcamera.h b/include/libcamera/libcamera.h
index 32fb1ff741a7..f9556a8bce62 100644
--- a/include/libcamera/libcamera.h
+++ b/include/libcamera/libcamera.h
@@ -10,14 +10,4 @@ 
 #include <libcamera/camera.h>
 #include <libcamera/camera_manager.h>
 
-namespace libcamera {
-
-class libcamera
-{
-public:
-	void init_lib(void);
-};
-
-};
-
 #endif /* __LIBCAMERA_LIBCAMERA_H__ */
diff --git a/src/libcamera/main.cpp b/src/libcamera/main.cpp
deleted file mode 100644
index 7ed37dfcfd5b..000000000000
--- a/src/libcamera/main.cpp
+++ /dev/null
@@ -1,19 +0,0 @@ 
-/* SPDX-License-Identifier: LGPL-2.1-or-later */
-/*
- * Copyright (C) 2018, Google Inc.
- *
- * main.cpp - libcamera main class
- */
-
-#include <libcamera/libcamera.h>
-
-#include "log.h"
-
-namespace libcamera {
-
-void libcamera::init_lib(void)
-{
-	LOG(Info) << "Lib Camera Init";
-}
-
-};
diff --git a/src/libcamera/meson.build b/src/libcamera/meson.build
index 2ff5bb5e7515..78562299fc42 100644
--- a/src/libcamera/meson.build
+++ b/src/libcamera/meson.build
@@ -3,7 +3,6 @@  libcamera_sources = files([
     'camera_manager.cpp',
     'device_enumerator.cpp',
     'log.cpp',
-    'main.cpp',
     'media_device.cpp',
     'media_object.cpp',
     'pipeline_handler.cpp',
diff --git a/test/init.cpp b/test/init.cpp
deleted file mode 100644
index 4ade4e7690fc..000000000000
--- a/test/init.cpp
+++ /dev/null
@@ -1,16 +0,0 @@ 
-/* SPDX-License-Identifier: GPL-2.0-or-later */
-/*
- * Copyright (C) 2018, Google Inc.
- *
- * init.cpp - libcamera initialization test
- */
-
-#include <libcamera/libcamera.h>
-
-int main(void)
-{
-	libcamera::libcamera l = libcamera::libcamera();
-	l.init_lib();
-
-	return 0;
-}
diff --git a/test/meson.build b/test/meson.build
index 9270a55e052a..184a7eeb5e27 100644
--- a/test/meson.build
+++ b/test/meson.build
@@ -3,7 +3,6 @@  subdir('libtest')
 subdir('media_device')
 
 public_tests = [
-    ['test_init',       'init.cpp'],
     ['list',            'list.cpp'],
 ]