diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-06-11 20:17:35 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-06-11 20:17:35 +0300 |
commit | 17d180891f1e237ea5d25835999a8b23a6e7946d (patch) | |
tree | 5963fe4d338f6272daf55c76ed355effb47afc71 /kms++/atomicreq.h | |
parent | 38a71ee72c47f3287c327113ce411f236cac05ef (diff) |
rename dirs
Diffstat (limited to 'kms++/atomicreq.h')
-rw-r--r-- | kms++/atomicreq.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/kms++/atomicreq.h b/kms++/atomicreq.h new file mode 100644 index 0000000..6ebdbf8 --- /dev/null +++ b/kms++/atomicreq.h @@ -0,0 +1,36 @@ +#pragma once + +#include <cstdint> +#include <string> +#include <map> + +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); + 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(bool allow_modeset = false); + int commit(void* data, bool allow_modeset = false); + int commit_sync(bool allow_modeset = false); + +private: + Card& m_card; + _drmModeAtomicReq* m_req; +}; + +} |