• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #pragma once
2 
3 #include <map>
4 
5 #include "decls.h"
6 
7 namespace kms
8 {
9 
10 class DrmObject
11 {
12 	friend class Card;
13 public:
14 	DrmObject(const DrmObject& other) = delete;
15 	DrmObject& operator=(const DrmObject& other) = delete;
16 
id()17 	uint32_t id() const { return m_id; }
card()18 	Card& card() const { return m_card; }
19 
object_type()20 	uint32_t object_type() const { return m_object_type; }
idx()21 	uint32_t idx() const { return m_idx; }
22 
23 protected:
24 	DrmObject(Card& card, uint32_t object_type);
25 	DrmObject(Card& card, uint32_t id, uint32_t object_type, uint32_t idx = 0);
26 
27 	virtual ~DrmObject();
28 
setup()29 	virtual void setup() { }
30 
31 	virtual void set_id(uint32_t id);
32 
33 private:
34 	Card& m_card;
35 
36 	uint32_t m_id;
37 	uint32_t m_object_type;
38 	uint32_t m_idx;
39 };
40 }
41