summaryrefslogtreecommitdiff
path: root/kms++/drmobject.h
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-11 20:17:35 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-06-11 20:17:35 +0300
commit17d180891f1e237ea5d25835999a8b23a6e7946d (patch)
tree5963fe4d338f6272daf55c76ed355effb47afc71 /kms++/drmobject.h
parent38a71ee72c47f3287c327113ce411f236cac05ef (diff)
rename dirs
Diffstat (limited to 'kms++/drmobject.h')
-rw-r--r--kms++/drmobject.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/kms++/drmobject.h b/kms++/drmobject.h
new file mode 100644
index 0000000..a939aa7
--- /dev/null
+++ b/kms++/drmobject.h
@@ -0,0 +1,40 @@
+#pragma once
+
+#include <map>
+
+#include "decls.h"
+
+namespace kms
+{
+
+class DrmObject
+{
+ friend class Card;
+public:
+ DrmObject(const DrmObject& other) = delete;
+ DrmObject& operator=(const DrmObject& other) = delete;
+
+ uint32_t id() const { return m_id; }
+ Card& card() const { return m_card; }
+
+ uint32_t object_type() const { return m_object_type; }
+ uint32_t idx() const { return m_idx; }
+
+protected:
+ DrmObject(Card& card, uint32_t object_type);
+ DrmObject(Card& card, uint32_t id, uint32_t object_type, uint32_t idx = 0);
+
+ virtual ~DrmObject();
+
+ virtual void setup() { }
+
+ virtual void set_id(uint32_t id);
+
+private:
+ Card& m_card;
+
+ uint32_t m_id;
+ uint32_t m_object_type;
+ uint32_t m_idx;
+};
+}