• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #pragma once
2 
3 #include "drmobject.h"
4 #include <map>
5 #include <vector>
6 
7 namespace kms
8 {
9 
10 struct PropertyPriv;
11 
12 enum class PropertyType
13 {
14 	Range,
15 	Enum,
16 	Blob,
17 	Bitmask,
18 	Object,
19 	SignedRange,
20 };
21 
22 class Property : public DrmObject
23 {
24 	friend class Card;
25 public:
26 	const std::string& name() const;
27 
28 	bool is_immutable() const;
29 	bool is_pending() const;
30 
type()31 	PropertyType type() const { return m_type; }
32 	std::map<uint64_t, std::string> get_enums() const;
33 	std::vector<uint64_t> get_values() const;
34 	std::vector<uint32_t> get_blob_ids() const;
35 private:
36 	Property(Card& card, uint32_t id);
37 	~Property();
38 
39 	PropertyType m_type;
40 
41 	PropertyPriv* m_priv;
42 	std::string m_name;
43 };
44 }
45