summaryrefslogtreecommitdiff
path: root/src/ipa/raspberrypi/controller/metadata.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/ipa/raspberrypi/controller/metadata.h')
-rw-r--r--src/ipa/raspberrypi/controller/metadata.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/ipa/raspberrypi/controller/metadata.h b/src/ipa/raspberrypi/controller/metadata.h
index 870b6e26..bf8a2393 100644
--- a/src/ipa/raspberrypi/controller/metadata.h
+++ b/src/ipa/raspberrypi/controller/metadata.h
@@ -80,6 +80,16 @@ public:
data_.merge(other.data_);
}
+ void mergeCopy(const Metadata &other)
+ {
+ std::scoped_lock lock(mutex_, other.mutex_);
+ /*
+ * If the metadata key exists, ignore this item and copy only
+ * unique key/value pairs.
+ */
+ data_.insert(other.data_.begin(), other.data_.end());
+ }
+
template<typename T>
T *getLocked(std::string const &tag)
{