From b6467bd9c67f69fe5023cb524391b8f1fc5c44c4 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Sat, 18 Jan 2020 02:10:18 +0200 Subject: libcamera: camera_manager: Move private data members to private implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the d-pointer idiom ([1], [2]) to hide the private data members from the CameraManager class interface. This will ease maintaining ABI compatibility, and prepares for the implementation of the CameraManager class threading model. [1] https://wiki.qt.io/D-Pointer [2] https://en.cppreference.com/w/cpp/language/pimpl Signed-off-by: Laurent Pinchart Reviewed-by: Kieran Bingham Reviewed-by: Niklas Söderlund --- include/libcamera/camera_manager.h | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'include') diff --git a/include/libcamera/camera_manager.h b/include/libcamera/camera_manager.h index 09419766..068afd58 100644 --- a/include/libcamera/camera_manager.h +++ b/include/libcamera/camera_manager.h @@ -7,7 +7,6 @@ #ifndef __LIBCAMERA_CAMERA_MANAGER_H__ #define __LIBCAMERA_CAMERA_MANAGER_H__ -#include #include #include #include @@ -18,9 +17,7 @@ namespace libcamera { class Camera; -class DeviceEnumerator; class EventDispatcher; -class PipelineHandler; class CameraManager : public Object { @@ -33,7 +30,7 @@ public: int start(); void stop(); - const std::vector> &cameras() const { return cameras_; } + const std::vector> &cameras() const; std::shared_ptr get(const std::string &name); std::shared_ptr get(dev_t devnum); @@ -46,13 +43,11 @@ public: EventDispatcher *eventDispatcher(); private: - std::unique_ptr enumerator_; - std::vector> pipes_; - std::vector> cameras_; - std::map> camerasByDevnum_; - static const std::string version_; static CameraManager *self_; + + class Private; + std::unique_ptr p_; }; } /* namespace libcamera */ -- cgit v1.2.1