MythTV
master
mythtv
programs
mythbackend
servicesv2
v2musicMetadataInfoList.h
Go to the documentation of this file.
1
// Program Name: musicMetadataInfoList.h
3
// Created : July 20, 2017
4
//
5
// Copyright (c) 2017 Paul Harrison <pharrison@mythtv.org>
6
//
7
// Licensed under the GPL v2 or later, see COPYING for details
8
//
10
11
#ifndef V2MUSICMETADATAINFOLIST_H_
12
#define V2MUSICMETADATAINFOLIST_H_
13
14
#include <QVariantList>
15
16
#include "
libmythbase/http/mythhttpservice.h
"
17
#include "
v2musicMetadataInfo.h
"
18
19
20
class
V2MusicMetadataInfoList
:
public
QObject
21
{
22
Q_OBJECT
23
Q_CLASSINFO
(
"Version"
,
"1.00"
);
24
25
Q_CLASSINFO
(
"MusicMetadataInfos"
,
"type=V2MusicMetadataInfo"
);
26
Q_CLASSINFO
(
"AsOf"
,
"transient=true"
);
27
28
SERVICE_PROPERTY2
(
int
, StartIndex )
29
SERVICE_PROPERTY2
(
int
, Count )
30
SERVICE_PROPERTY2
(
int
, CurrentPage )
31
SERVICE_PROPERTY2
(
int
, TotalPages )
32
SERVICE_PROPERTY2
(
int
, TotalAvailable )
33
SERVICE_PROPERTY2
( QDateTime , AsOf )
34
SERVICE_PROPERTY2
( QString , Version )
35
SERVICE_PROPERTY2
( QString , ProtoVer )
36
SERVICE_PROPERTY2
( QVariantList, MusicMetadataInfos )
37
38
public
:
39
40
Q_INVOKABLE
V2MusicMetadataInfoList
(QObject *parent =
nullptr
)
41
: QObject( parent )
42
{
43
}
44
45
void
Copy
(
const
V2MusicMetadataInfoList
*src )
46
{
47
m_StartIndex = src->m_StartIndex ;
48
m_Count = src->m_Count ;
49
m_TotalAvailable= src->m_TotalAvailable ;
50
m_AsOf = src->m_AsOf ;
51
m_Version = src->m_Version ;
52
m_ProtoVer = src->m_ProtoVer ;
53
54
CopyListContents< V2MusicMetadataInfo >(
this
, m_MusicMetadataInfos, src->m_MusicMetadataInfos );
55
}
56
57
V2MusicMetadataInfo
*
AddNewMusicMetadataInfo
()
58
{
59
// We must make sure the object added to the QVariantList has
60
// a parent of 'this'
61
62
auto
*pObject =
new
V2MusicMetadataInfo
(
this
);
63
m_MusicMetadataInfos.append( QVariant::fromValue<QObject *>( pObject ));
64
65
return
pObject;
66
}
67
68
};
69
70
Q_DECLARE_METATYPE
(
V2MusicMetadataInfoList
*)
71
72
#endif
V2MusicMetadataInfoList::V2MusicMetadataInfoList
Q_INVOKABLE V2MusicMetadataInfoList(QObject *parent=nullptr)
Definition:
v2musicMetadataInfoList.h:40
V2MusicMetadataInfoList
Definition:
v2musicMetadataInfoList.h:20
Q_DECLARE_METATYPE
Q_DECLARE_METATYPE(std::chrono::seconds)
SERVICE_PROPERTY2
#define SERVICE_PROPERTY2(Type, Name)
Definition:
mythhttpservice.h:72
V2MusicMetadataInfoList::Q_CLASSINFO
Q_CLASSINFO("Version", "1.00")
v2musicMetadataInfo.h
V2MusicMetadataInfo
Definition:
v2musicMetadataInfo.h:22
mythhttpservice.h
V2MusicMetadataInfoList::Copy
void Copy(const V2MusicMetadataInfoList *src)
Definition:
v2musicMetadataInfoList.h:45
V2MusicMetadataInfoList::AddNewMusicMetadataInfo
V2MusicMetadataInfo * AddNewMusicMetadataInfo()
Definition:
v2musicMetadataInfoList.h:57
Generated on Wed Feb 5 2025 03:16:32 for MythTV by
1.8.17