55dd7c9c53ead612870a66c27b1907b8f5456049
1 #pragma once
3 #include <cstdint>
4 #include <string>
6 struct _drmModeAtomicReq;
8 #include "decls.h"
10 namespace kms
11 {
12 class AtomicReq
13 {
14 public:
15 AtomicReq(Card& card);
16 ~AtomicReq();
18 AtomicReq(const AtomicReq& other) = delete;
19 AtomicReq& operator=(const AtomicReq& other) = delete;
21 void add(uint32_t ob_id, uint32_t prop_id, uint64_t value);
22 void add(DrmObject *ob, Property *prop, uint64_t value);
23 void add(DrmObject *ob, const std::string& prop, uint64_t value);
25 int test();
26 int commit(void* data);
28 private:
29 Card& m_card;
30 _drmModeAtomicReq* m_req;
31 };
33 }