summaryrefslogtreecommitdiff
path: root/include/libcamera/camera.h
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2018-12-20 15:18:38 +0100
committerNiklas Söderlund <niklas.soderlund@ragnatech.se>2018-12-31 00:57:58 +0100
commit8c10082a9ea9a311711887386944b71cf4d0419a (patch)
treef9c4bf48bf5a8103f26ff694c43d67ecb43e61d1 /include/libcamera/camera.h
parentdf7bd278a6c8cd0f5e956fb733a25379f3a71f9f (diff)
libcamera: Add Camera class
Provide a Camera class which represents our main interface to handling camera devices. This is a rework of Kieran's initial proposal and Laurent's documentation of the file changed to fit the device enumerators needs. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'include/libcamera/camera.h')
-rw-r--r--include/libcamera/camera.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
new file mode 100644
index 00000000..9a7579d6
--- /dev/null
+++ b/include/libcamera/camera.h
@@ -0,0 +1,31 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2018, Google Inc.
+ *
+ * camera.h - Camera object interface
+ */
+#ifndef __LIBCAMERA_CAMERA_H__
+#define __LIBCAMERA_CAMERA_H__
+
+#include <string>
+
+namespace libcamera {
+
+class Camera
+{
+public:
+ Camera(const std::string &name);
+
+ const std::string &name() const;
+ void get();
+ void put();
+
+private:
+ virtual ~Camera() { };
+ int ref_;
+ std::string name_;
+};
+
+} /* namespace libcamera */
+
+#endif /* __LIBCAMERA_CAMERA_H__ */