summaryrefslogtreecommitdiff
path: root/libkms++/atomicreq.h
diff options
context:
space:
mode:
Diffstat (limited to 'libkms++/atomicreq.h')
-rw-r--r--libkms++/atomicreq.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/libkms++/atomicreq.h b/libkms++/atomicreq.h
new file mode 100644
index 0000000..9a8a748
--- /dev/null
+++ b/libkms++/atomicreq.h
@@ -0,0 +1,31 @@
+#pragma once
+
+#include <cstdint>
+
+struct _drmModeAtomicReq;
+
+#include "decls.h"
+
+namespace kms
+{
+class AtomicReq
+{
+public:
+ AtomicReq(Card& card);
+ ~AtomicReq();
+
+ AtomicReq(const AtomicReq& other) = delete;
+ AtomicReq& operator=(const AtomicReq& other) = delete;
+
+ void add(uint32_t ob_id, uint32_t prop_id, uint64_t value);
+ void add(DrmObject *ob, Property *prop, uint64_t value);
+
+ int test();
+ int commit();
+
+private:
+ Card& m_card;
+ _drmModeAtomicReq* m_req;
+};
+
+}