MythTV master
v2recordingProfile.h
Go to the documentation of this file.
1
2// Program Name: v2RecordingProfile.h
3// Created : Feb 28, 2023
4//
5// Copyright (c) 2023 Peter Bennett <pbennett@mythtv.org>
6//
7// Licensed under the GPL v2 or later, see COPYING for details
8//
10
11#ifndef V2RECORDINGPROFILE_H_
12#define V2RECORDINGPROFILE_H_
13
14#include <QString>
15
17
19
20class V2RecProfParam : public QObject {
21 Q_OBJECT
22 Q_CLASSINFO( "Version" , "1.0" );
23
24 SERVICE_PROPERTY2( QString , Name )
25 SERVICE_PROPERTY2( QString , Value )
26
27 public:
28
29 Q_INVOKABLE V2RecProfParam(QObject *parent = nullptr)
30 : QObject ( parent )
31 {
32 }
33
34 private:
36};
37
39
40
41
42class V2RecProfile : public QObject
43{
44 Q_OBJECT
45 Q_CLASSINFO( "Version" , "1.0" );
46 Q_CLASSINFO( "RecProfParams", "type=V2RecProfParam");
47
48 SERVICE_PROPERTY2( int , Id )
49 SERVICE_PROPERTY2( QString , Name )
50 SERVICE_PROPERTY2( QString , VideoCodec )
51 SERVICE_PROPERTY2( QString , AudioCodec )
52 SERVICE_PROPERTY2( QVariantList, RecProfParams )
53
54 public:
55
57 {
58 // We must make sure the object added to the QVariantList has
59 // a parent of 'this'
60
61 auto *pObject = new V2RecProfParam( this );
62 m_RecProfParams.append( QVariant::fromValue<QObject *>( pObject ));
63 return pObject;
64 }
65
66
67 Q_INVOKABLE V2RecProfile(QObject *parent = nullptr)
68 : QObject ( parent )
69 {
70 }
71
72 private:
74};
75
77
78
79class V2RecProfileGroup : public QObject
80{
81 Q_OBJECT
82 Q_CLASSINFO( "Version" , "1.0" );
83 Q_CLASSINFO( "RecProfiles", "type=V2RecProfile");
84
85 SERVICE_PROPERTY2( int , Id )
86 SERVICE_PROPERTY2( QString , Name )
87 SERVICE_PROPERTY2( QString , CardType )
88 SERVICE_PROPERTY2( QVariantList, RecProfiles )
89
90 public:
91
92 Q_INVOKABLE V2RecProfileGroup(QObject *parent = nullptr)
93 : QObject ( parent )
94 {
95 }
96
98 {
99 // We must make sure the object added to the QVariantList has
100 // a parent of 'this'
101
102 auto *pObject = new V2RecProfile( this );
103 m_RecProfiles.append( QVariant::fromValue<QObject *>( pObject ));
104 return pObject;
105 }
106
107 private:
109};
110
112
113class V2RecProfileGroupList : public QObject
114{
115 Q_OBJECT
116 Q_CLASSINFO( "Version" , "1.0" );
117 Q_CLASSINFO( "RecProfileGroups", "type=V2RecProfileGroup");
118
119 SERVICE_PROPERTY2( QVariantList, RecProfileGroups )
120
121 public:
122
123 Q_INVOKABLE V2RecProfileGroupList(QObject *parent = nullptr)
124 : QObject ( parent )
125 {
126 }
127
129 {
130 // We must make sure the object added to the QVariantList has
131 // a parent of 'this'
132
133 auto *pObject = new V2RecProfileGroup( this );
134 m_RecProfileGroups.append( QVariant::fromValue<QObject *>( pObject ));
135 return pObject;
136 }
137
138
139
140 private:
142};
143
145
146
147
148#endif
Q_DISABLE_COPY(V2RecProfParam)
Q_CLASSINFO("Version", "1.0")
Q_INVOKABLE V2RecProfParam(QObject *parent=nullptr)
Q_CLASSINFO("RecProfileGroups", "type=V2RecProfileGroup")
Q_INVOKABLE V2RecProfileGroupList(QObject *parent=nullptr)
V2RecProfileGroup * AddProfileGroup()
Q_DISABLE_COPY(V2RecProfileGroupList)
Q_CLASSINFO("Version", "1.0")
Q_INVOKABLE V2RecProfileGroup(QObject *parent=nullptr)
Q_CLASSINFO("RecProfiles", "type=V2RecProfile")
Q_CLASSINFO("Version", "1.0")
V2RecProfile * AddProfile()
Q_DISABLE_COPY(V2RecProfileGroup)
Q_DISABLE_COPY(V2RecProfile)
Q_CLASSINFO("Version", "1.0")
Q_INVOKABLE V2RecProfile(QObject *parent=nullptr)
Q_CLASSINFO("RecProfParams", "type=V2RecProfParam")
V2RecProfParam * AddParam()
Q_DECLARE_METATYPE(std::chrono::seconds)
#define SERVICE_PROPERTY2(Type, Name)