1/****************************************************************************
2**
3** Copyright (C) 2016 The Qt Company Ltd.
4** Contact: https://www.qt.io/licensing/
5**
6** This file is part of the Qt Toolkit.
7**
8** $QT_BEGIN_LICENSE:LGPL$
9** Commercial License Usage
10** Licensees holding valid commercial Qt licenses may use this file in
11** accordance with the commercial license agreement provided with the
12** Software or, alternatively, in accordance with the terms contained in
13** a written agreement between you and The Qt Company. For licensing terms
14** and conditions see https://www.qt.io/terms-conditions. For further
15** information use the contact form at https://www.qt.io/contact-us.
16**
17** GNU Lesser General Public License Usage
18** Alternatively, this file may be used under the terms of the GNU Lesser
19** General Public License version 3 as published by the Free Software
20** Foundation and appearing in the file LICENSE.LGPL3 included in the
21** packaging of this file. Please review the following information to
22** ensure the GNU Lesser General Public License version 3 requirements
23** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
24**
25** GNU General Public License Usage
26** Alternatively, this file may be used under the terms of the GNU
27** General Public License version 2.0 or (at your option) the GNU General
28** Public license version 3 or any later version approved by the KDE Free
29** Qt Foundation. The licenses are as published by the Free Software
30** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
31** included in the packaging of this file. Please review the following
32** information to ensure the GNU General Public License requirements will
33** be met: https://www.gnu.org/licenses/gpl-2.0.html and
34** https://www.gnu.org/licenses/gpl-3.0.html.
35**
36** $QT_END_LICENSE$
37**
38****************************************************************************/
39
40#include "qmediacontrol_p.h"
41#include <qmetadatareadercontrol.h>
42
43QT_BEGIN_NAMESPACE
44
45
46/*!
47 \class QMetaDataReaderControl
48 \inmodule QtMultimedia
49
50
51 \ingroup multimedia_control
52
53
54 \brief The QMetaDataReaderControl class provides read access to the
55 meta-data of a QMediaService's media.
56
57 If a QMediaService can provide read or write access to the meta-data of
58 its current media it will implement QMetaDataReaderControl. This control
59 provides functions for both retrieving and setting meta-data values.
60 Meta-data may be addressed by the keys defined in the
61 QMediaMetaData namespace.
62
63 The functionality provided by this control is exposed to application
64 code by the meta-data members of QMediaObject, and so meta-data access
65 is potentially available in any of the media object classes. Any media
66 service may implement QMetaDataReaderControl.
67
68 The interface name of QMetaDataReaderControl is
69 \c org.qt-project.qt.metadatareadercontrol/5.0 as defined in
70 QMetaDataReaderControl_iid.
71
72 \sa QMediaService::requestControl(), QMediaObject
73*/
74
75/*!
76 \macro QMetaDataReaderControl_iid
77
78 \c org.qt-project.qt.metadatareadercontrol/5.0
79
80 Defines the interface name of the QMetaDataReaderControl class.
81
82 \relates QMetaDataReaderControl
83*/
84
85/*!
86 Construct a QMetaDataReaderControl with \a parent. This class is meant as a base class
87 for service specific meta data providers so this constructor is protected.
88*/
89
90QMetaDataReaderControl::QMetaDataReaderControl(QObject *parent):
91 QMediaControl(*new QMediaControlPrivate, parent)
92{
93}
94
95/*!
96 Destroy the meta-data object.
97*/
98
99QMetaDataReaderControl::~QMetaDataReaderControl()
100{
101}
102
103/*!
104 \fn bool QMetaDataReaderControl::isMetaDataAvailable() const
105
106 Identifies if meta-data is available from a media service.
107
108 Returns true if the meta-data is available and false otherwise.
109*/
110
111/*!
112 \fn QVariant QMetaDataReaderControl::metaData(const QString &key) const
113
114 Returns the meta-data for the given \a key.
115*/
116
117/*!
118 \fn QMetaDataReaderControl::availableMetaData() const
119
120 Returns a list of keys there is meta-data available for.
121*/
122
123/*!
124 \fn void QMetaDataReaderControl::metaDataChanged()
125
126 Signal the changes of meta-data.
127
128 If multiple meta-data elements are changed,
129 metaDataChanged(const QString &key, const QVariant &value) signal is emitted
130 for each of them with metaDataChanged() changed emitted once.
131*/
132
133/*!
134 \fn void QMetaDataReaderControl::metaDataChanged(const QString &key, const QVariant &value)
135
136 Signal the changes of one meta-data element \a value with the given \a key.
137*/
138
139/*!
140 \fn void QMetaDataReaderControl::metaDataAvailableChanged(bool available)
141
142 Signal the availability of meta-data has changed, \a available will
143 be true if the multimedia object has meta-data.
144*/
145
146#include "moc_qmetadatareadercontrol.cpp"
147QT_END_NAMESPACE
148
149