]> Gitweb @ Texas Instruments - Open Source Git Repositories - git.TI.com/gitweb - android/external-libkmsxx.git/blob - kms++/inc/kms++/drmpropobject.h
38de584fbca20bf59910d5b175b8d5aed5927b46
[android/external-libkmsxx.git] / kms++ / inc / kms++ / drmpropobject.h
1 #pragma once
3 #include <map>
4 #include <memory>
6 #include "drmobject.h"
7 #include "decls.h"
9 namespace kms
10 {
12 class DrmPropObject : public DrmObject
13 {
14         friend class Card;
15 public:
16         void refresh_props();
18         Property* get_prop(const std::string& name) const;
20         uint64_t get_prop_value(uint32_t id) const;
21         uint64_t get_prop_value(const std::string& name) const;
22         std::unique_ptr<Blob> get_prop_value_as_blob(const std::string& name) const;
24         const std::map<uint32_t, uint64_t>& get_prop_map() const { return m_prop_values; }
26         int set_prop_value(uint32_t id, uint64_t value);
27         int set_prop_value(const std::string& name, uint64_t value);
29 protected:
30         DrmPropObject(Card& card, uint32_t object_type);
31         DrmPropObject(Card& card, uint32_t id, uint32_t object_type, uint32_t idx = 0);
33         virtual ~DrmPropObject();
35 private:
36         std::map<uint32_t, uint64_t> m_prop_values;
37 };
38 }