1
/****************************************************************************
3
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4
** Contact: http://www.qt-project.org/legal
6
** This file is part of the Qt Toolkit.
8
** $QT_BEGIN_LICENSE:LGPL21$
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 Digia. For licensing terms and
14
** conditions see http://qt.digia.com/licensing. For further information
15
** use the contact form at http://qt.digia.com/contact-us.
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 2.1 or version 3 as published by the Free
20
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
21
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
22
** following information to ensure the GNU Lesser General Public License
23
** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
24
** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
26
** In addition, as a special exception, Digia gives you certain additional
27
** rights. These rights are described in the Digia Qt LGPL Exception
28
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
32
****************************************************************************/
34
#include "qmediacontrol_p.h"
35
#include <qmetadatareadercontrol.h>
41
\class QMetaDataReaderControl
42
\inmodule QtMultimedia
45
\ingroup multimedia_control
48
\brief The QMetaDataReaderControl class provides read access to the
49
meta-data of a QMediaService's media.
51
If a QMediaService can provide read or write access to the meta-data of
52
its current media it will implement QMetaDataReaderControl. This control
53
provides functions for both retrieving and setting meta-data values.
54
Meta-data may be addressed by the keys defined in the
55
QMediaMetaData namespace.
57
The functionality provided by this control is exposed to application
58
code by the meta-data members of QMediaObject, and so meta-data access
59
is potentially available in any of the media object classes. Any media
60
service may implement QMetaDataReaderControl.
62
The interface name of QMetaDataReaderControl is
63
\c org.qt-project.qt.metadatareadercontrol/5.0 as defined in
64
QMetaDataReaderControl_iid.
66
\sa QMediaService::requestControl(), QMediaObject
70
\macro QMetaDataReaderControl_iid
72
\c org.qt-project.qt.metadatareadercontrol/5.0
74
Defines the interface name of the QMetaDataReaderControl class.
76
\relates QMetaDataReaderControl
80
Construct a QMetaDataReaderControl with \a parent. This class is meant as a base class
81
for service specific meta data providers so this constructor is protected.
84
QMetaDataReaderControl::QMetaDataReaderControl(QObject *parent):
85
QMediaControl(*new QMediaControlPrivate, parent)
90
Destroy the meta-data object.
93
QMetaDataReaderControl::~QMetaDataReaderControl()
98
\fn bool QMetaDataReaderControl::isMetaDataAvailable() const
100
Identifies if meta-data is available from a media service.
102
Returns true if the meta-data is available and false otherwise.
106
\fn QVariant QMetaDataReaderControl::metaData(const QString &key) const
108
Returns the meta-data for the given \a key.
112
\fn QMetaDataReaderControl::availableMetaData() const
114
Returns a list of keys there is meta-data available for.
118
\fn void QMetaDataReaderControl::metaDataChanged()
120
Signal the changes of meta-data.
122
If multiple meta-data elements are changed,
123
metaDataChanged(const QString &key, const QVariant &value) signal is emitted
124
for each of them with metaDataChanged() changed emitted once.
128
\fn void QMetaDataReaderControl::metaDataChanged(const QString &key, const QVariant &value)
130
Signal the changes of one meta-data element \a value with the given \a key.
134
\fn void QMetaDataReaderControl::metaDataAvailableChanged(bool available)
136
Signal the availability of meta-data has changed, \a available will
137
be true if the multimedia object has meta-data.
140
#include "moc_qmetadatareadercontrol.cpp"