summaryrefslogtreecommitdiff
path: root/kms++/inc/kms++/drmpropobject.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-11 21:46:24 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-11 21:46:24 +0300
commit9916712a62169606d845510028a3ea6f84bd442f (patch)
treeaca4e1bec39500812111c43a8ecee862edae0002 /kms++/inc/kms++/drmpropobject.h
parent736b295100ce441e800457bcbd08cb36db543ff2 (diff)
kms++: organize into subdirs
Diffstat (limited to 'kms++/inc/kms++/drmpropobject.h')
-rw-r--r--kms++/inc/kms++/drmpropobject.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/kms++/inc/kms++/drmpropobject.h b/kms++/inc/kms++/drmpropobject.h
new file mode 100644
index 0000000..ec28d45
--- /dev/null
+++ b/kms++/inc/kms++/drmpropobject.h
@@ -0,0 +1,35 @@
+#pragma once
+
+#include <map>
+#include <memory>
+
+#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<Blob> get_prop_value_as_blob(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;
+};
+}