MythTV  master
mythdrmproperty.h
Go to the documentation of this file.
1 #ifndef MYTHDRMPROPERTY_H
2 #define MYTHDRMPROPERTY_H
3 
4 // MythTV
6 
7 using DRMProp = std::shared_ptr<class MythDRMProperty>;
8 using 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
DRMProps
std::vector< DRMProp > DRMProps
Definition: mythdrmproperty.h:8
MUI_PUBLIC
#define MUI_PUBLIC
Definition: mythuiexp.h:9
MythDRMObjectProperty
Definition: mythdrmproperty.h:84
mythdrmresources.h
MythDRMProperty::m_name
QString m_name
Definition: mythdrmproperty.h:33
MythDRMEnumProperty::m_enums
std::map< uint64_t, QString > m_enums
Definition: mythdrmproperty.h:68
MythDRMBitmaskProperty
Definition: mythdrmproperty.h:71
MythDRMProperty::Range
@ Range
Definition: mythdrmproperty.h:16
Property
Definition: upnpcdsobjects.h:44
MythDRMEnumProperty
Definition: mythdrmproperty.h:62
MythDRMProperty::Type
Type
Definition: mythdrmproperty.h:13
MythDRMRangeProperty
Definition: mythdrmproperty.h:42
MythDRMProperty::ToString
virtual QString ToString()
Definition: mythdrmproperty.h:27
Properties
QMultiMap< QString, Property * > Properties
Definition: upnpcdsobjects.h:95
DRMProp
std::shared_ptr< class MythDRMProperty > DRMProp
Definition: mythdrmproperty.h:7
MythDRMBlobProperty::m_blob
QByteArray m_blob
Definition: mythdrmproperty.h:81
MythDRMSignedRangeProperty
Definition: mythdrmproperty.h:52
Name
Definition: channelsettings.cpp:46
MythDRMBlobProperty
Definition: mythdrmproperty.h:77
MythDRMProperty::Object
@ Object
Definition: mythdrmproperty.h:20
MythDRMProperty::Blob
@ Blob
Definition: mythdrmproperty.h:19
MythDRMProperty
A wrapper around a DRM object property.
Definition: mythdrmproperty.h:10
MythDRMProperty::Enum
@ Enum
Definition: mythdrmproperty.h:17
MythDRMProperty::Bitmask
@ Bitmask
Definition: mythdrmproperty.h:18