MythTV master
mythdrmproperty.h
Go to the documentation of this file.
1#ifndef MYTHDRMPROPERTY_H
2#define MYTHDRMPROPERTY_H
3
4// MythTV
6
7using DRMProp = std::shared_ptr<class MythDRMProperty>;
8using DRMProps = std::vector<DRMProp>;
9
11{
12 public:
13 enum Type
14 {
15 Invalid = 0,
21 SignedRange
22 };
23
24 static DRMProps GetProperties(int FD, uint32_t ObjectId, uint32_t ObjectType);
25 static DRMProp GetProperty (const QString& Name, const DRMProps& Properties);
26 virtual ~MythDRMProperty() = default;
27 virtual QString ToString() { return ""; }
28
29 Type m_type { Invalid };
30 uint32_t m_id { 0 };
31 bool m_readOnly { true };
32 bool m_atomic { false };
33 QString m_name;
34
35 protected:
36 MythDRMProperty(Type mType, uint32_t Id, uint32_t Flags, const char * Name);
37
38 private:
39 Q_DISABLE_COPY(MythDRMProperty)
40};
41
43{
44 public:
45 MythDRMRangeProperty(uint64_t Value, drmModePropertyPtr Property);
46 QString ToString() override;
47 uint64_t m_value { 0 };
48 uint64_t m_min { 0 };
49 uint64_t m_max { 0 };
50};
51
53{
54 public:
55 MythDRMSignedRangeProperty(uint64_t Value, drmModePropertyPtr Property);
56 QString ToString() override;
57 int64_t m_value { 0 };
58 int64_t m_min { 0 };
59 int64_t m_max { 0 };
60};
61
63{
64 public:
65 MythDRMEnumProperty(uint64_t Value, drmModePropertyPtr Property);
66 QString ToString() override;
67 uint64_t m_value { 0 };
68 std::map<uint64_t,QString> m_enums;
69};
70
72{
73 public:
74 MythDRMBitmaskProperty(uint64_t Value, drmModePropertyPtr Property);
75};
76
78{
79 public:
80 MythDRMBlobProperty(int FD, uint64_t Value, drmModePropertyPtr Property);
81 QByteArray m_blob;
82};
83
85{
86 public:
87 MythDRMObjectProperty(drmModePropertyPtr Property);
88};
89
90#endif
std::map< uint64_t, QString > m_enums
A wrapper around a DRM object property.
virtual ~MythDRMProperty()=default
virtual QString ToString()
std::shared_ptr< class MythDRMProperty > DRMProp
std::vector< DRMProp > DRMProps
#define MUI_PUBLIC
Definition: mythuiexp.h:9
QMultiMap< QString, Property * > Properties