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 \obsolete
49 \inmodule QtMultimedia
50
51
52 \ingroup multimedia_control
53
54
55 \brief The QMetaDataReaderControl class provides read access to the
56 meta-data of a QMediaService's media.
57
58 If a QMediaService can provide read or write access to the meta-data of
59 its current media it will implement QMetaDataReaderControl. This control
60 provides functions for both retrieving and setting meta-data values.
61 Meta-data may be addressed by the keys defined in the
62 QMediaMetaData namespace.
63
64 The functionality provided by this control is exposed to application
65 code by the meta-data members of QMediaObject, and so meta-data access
66 is potentially available in any of the media object classes. Any media
67 service may implement QMetaDataReaderControl.
68
69 The interface name of QMetaDataReaderControl is
70 \c org.qt-project.qt.metadatareadercontrol/5.0 as defined in
71 QMetaDataReaderControl_iid.
72
73 \sa QMediaService::requestControl(), QMediaObject
74*/
75
76/*!
77 \macro QMetaDataReaderControl_iid
78
79 \c org.qt-project.qt.metadatareadercontrol/5.0
80
81 Defines the interface name of the QMetaDataReaderControl class.
82
83 \relates QMetaDataReaderControl
84*/
85
86/*!
87 Construct a QMetaDataReaderControl with \a parent. This class is meant as a base class
88 for service specific meta data providers so this constructor is protected.
89*/
90
91QMetaDataReaderControl::QMetaDataReaderControl(QObject *parent):
92 QMediaControl(*new QMediaControlPrivate, parent)
93{
94}
95
96/*!
97 Destroy the meta-data object.
98*/
99
100QMetaDataReaderControl::~QMetaDataReaderControl()
101{
102}
103
104/*!
105 \fn bool QMetaDataReaderControl::isMetaDataAvailable() const
106
107 Identifies if meta-data is available from a media service.
108
109 Returns true if the meta-data is available and false otherwise.
110*/
111
112/*!
113 \fn QVariant QMetaDataReaderControl::metaData(const QString &key) const
114
115 Returns the meta-data for the given \a key.
116*/
117
118/*!
119 \fn QMetaDataReaderControl::availableMetaData() const
120
121 Returns a list of keys there is meta-data available for.
122*/
123
124/*!
125 \fn void QMetaDataReaderControl::metaDataChanged()
126
127 Signal the changes of meta-data.
128
129 If multiple meta-data elements are changed,
130 metaDataChanged(const QString &key, const QVariant &value) signal is emitted
131 for each of them with metaDataChanged() changed emitted once.
132*/
133
134/*!
135 \fn void QMetaDataReaderControl::metaDataChanged(const QString &key, const QVariant &value)
136
137 Signal the changes of one meta-data element \a value with the given \a key.
138*/
139
140/*!
141 \fn void QMetaDataReaderControl::metaDataAvailableChanged(bool available)
142
143 Signal the availability of meta-data has changed, \a available will
144 be true if the multimedia object has meta-data.
145*/
146
147QT_END_NAMESPACE
148
149#include "moc_qmetadatareadercontrol.cpp"
150

source code of qtmultimedia/src/multimedia/controls/qmetadatareadercontrol.cpp