1 #pragma once
3 #include "drmobject.h"
4 #include <map>
5 #include <vector>
7 namespace kms
8 {
10 struct PropertyPriv;
12 enum class PropertyType
13 {
14 Range,
15 Enum,
16 Blob,
17 Bitmask,
18 Object,
19 SignedRange,
20 };
22 class Property : public DrmObject
23 {
24 friend class Card;
25 public:
26 const std::string& name() const;
28 bool is_immutable() const;
29 bool is_pending() const;
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();
39 PropertyType m_type;
41 PropertyPriv* m_priv;
42 std::string m_name;
43 };
44 }