diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-05-25 11:37:17 +0300 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2016-05-25 11:37:17 +0300 |
commit | d30ec339a102acd479e4327f319416886c7a3473 (patch) | |
tree | 3fcd54b466fab8bf5577268cefd4ea84503f2672 /libkms++/drmpropobject.h | |
parent | 11a1c56d4b78c731d84dcf4f2e93ce4675353c7b (diff) |
Split properties from DrmObject into DrmPropObject
Diffstat (limited to 'libkms++/drmpropobject.h')
-rw-r--r-- | libkms++/drmpropobject.h | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/libkms++/drmpropobject.h b/libkms++/drmpropobject.h new file mode 100644 index 0000000..6dfd2a8 --- /dev/null +++ b/libkms++/drmpropobject.h @@ -0,0 +1,33 @@ +#pragma once + +#include <map> + +#include "drmobject.h" +#include "decls.h" + +namespace kms +{ + +class DrmPropObject : public DrmObject +{ + friend class Card; +public: + void refresh_props(); + uint64_t get_prop_value(uint32_t id) const; + uint64_t get_prop_value(const std::string& name) const; + + const std::map<uint32_t, uint64_t>& get_prop_map() const { return m_prop_values; } + + int set_prop_value(uint32_t id, uint64_t value); + int set_prop_value(const std::string& name, uint64_t value); + +protected: + DrmPropObject(Card& card, uint32_t object_type); + DrmPropObject(Card& card, uint32_t id, uint32_t object_type, uint32_t idx = 0); + + virtual ~DrmPropObject(); + +private: + std::map<uint32_t, uint64_t> m_prop_values; +}; +} |