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