From 17d180891f1e237ea5d25835999a8b23a6e7946d Mon Sep 17 00:00:00 2001 From: Tomi Valkeinen Date: Sat, 11 Jun 2016 20:17:35 +0300 Subject: rename dirs --- kms++/drmpropobject.h | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 kms++/drmpropobject.h (limited to 'kms++/drmpropobject.h') diff --git a/kms++/drmpropobject.h b/kms++/drmpropobject.h new file mode 100644 index 0000000..ec28d45 --- /dev/null +++ b/kms++/drmpropobject.h @@ -0,0 +1,35 @@ +#pragma once + +#include +#include + +#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; + std::unique_ptr get_prop_value_as_blob(const std::string& name) const; + + const std::map& 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 m_prop_values; +}; +} -- cgit v1.2.3