summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libkms++/atomicreq.cpp6
-rw-r--r--libkms++/atomicreq.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/libkms++/atomicreq.cpp b/libkms++/atomicreq.cpp
index 0e627a8..0d895da 100644
--- a/libkms++/atomicreq.cpp
+++ b/libkms++/atomicreq.cpp
@@ -56,6 +56,12 @@ void AtomicReq::add(DrmObject* ob, const string& prop, uint64_t value)
add(ob, m_card.get_prop(prop), value);
}
+void AtomicReq::add(DrmObject* ob, const map<string, uint64_t>& values)
+{
+ for(const auto& kvp : values)
+ add(ob, kvp.first, kvp.second);
+}
+
int AtomicReq::test()
{
uint32_t flags = DRM_MODE_ATOMIC_TEST_ONLY;
diff --git a/libkms++/atomicreq.h b/libkms++/atomicreq.h
index d9aeb08..77a9dde 100644
--- a/libkms++/atomicreq.h
+++ b/libkms++/atomicreq.h
@@ -2,6 +2,7 @@
#include <cstdint>
#include <string>
+#include <map>
struct _drmModeAtomicReq;
@@ -21,6 +22,7 @@ public:
void add(uint32_t ob_id, uint32_t prop_id, uint64_t value);
void add(DrmObject *ob, Property *prop, uint64_t value);
void add(DrmObject *ob, const std::string& prop, uint64_t value);
+ void add(DrmObject *ob, const std::map<std::string, uint64_t>& values);
int test();
int commit(void* data);