summaryrefslogtreecommitdiff
path: root/include/libcamera/object.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libcamera/object.h')
-rw-r--r--include/libcamera/object.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/include/libcamera/object.h b/include/libcamera/object.h
new file mode 100644
index 00000000..eadd41f9
--- /dev/null
+++ b/include/libcamera/object.h
@@ -0,0 +1,35 @@
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+/*
+ * Copyright (C) 2019, Google Inc.
+ *
+ * object.h - Base object
+ */
+#ifndef __LIBCAMERA_OBJECT_H__
+#define __LIBCAMERA_OBJECT_H__
+
+#include <list>
+
+namespace libcamera {
+
+class SignalBase;
+template<typename... Args>
+class Signal;
+
+class Object
+{
+public:
+ virtual ~Object();
+
+private:
+ template<typename... Args>
+ friend class Signal;
+
+ void connect(SignalBase *signal);
+ void disconnect(SignalBase *signal);
+
+ std::list<SignalBase *> signals_;
+};
+
+}; /* namespace libcamera */
+
+#endif /* __LIBCAMERA_OBJECT_H__ */