summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo@jmondi.org>2022-06-03 11:30:25 +0200
committerJacopo Mondi <jacopo@jmondi.org>2022-06-05 14:48:08 +0200
commit161d24377c34c9254a132a9e769fbf11456b5b17 (patch)
tree36516af0c39b3dc329a7cc37810f8fd6fb805d3f /include
parent38e427f605a59f584c497d472c373bf383939997 (diff)
libcamera: request: Add operator<<()
With the recent addition of operator<<() in most libcamera core classes to replace usage of the toString() function the Request class was left behind. Add operator<<() for the Request class and reimplement toString(). Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r--include/libcamera/internal/request.h1
-rw-r--r--include/libcamera/request.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/libcamera/internal/request.h b/include/libcamera/internal/request.h
index 1f249989..9dadd6c6 100644
--- a/include/libcamera/internal/request.h
+++ b/include/libcamera/internal/request.h
@@ -44,6 +44,7 @@ public:
private:
friend class PipelineHandler;
+ friend std::ostream &operator<<(std::ostream &out, const Request &r);
void doCancelRequest();
void emitPrepareCompleted();
diff --git a/include/libcamera/request.h b/include/libcamera/request.h
index 1eb537e9..dffde153 100644
--- a/include/libcamera/request.h
+++ b/include/libcamera/request.h
@@ -9,6 +9,7 @@
#include <map>
#include <memory>
+#include <ostream>
#include <stdint.h>
#include <string>
#include <unordered_set>
@@ -75,4 +76,6 @@ private:
Status status_;
};
+std::ostream &operator<<(std::ostream &out, const Request &r);
+
} /* namespace libcamera */