| 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 <qmetadatawritercontrol.h> |
| 42 | |
| 43 | QT_BEGIN_NAMESPACE |
| 44 | |
| 45 | |
| 46 | /*! |
| 47 | \class QMetaDataWriterControl |
| 48 | \obsolete |
| 49 | \inmodule QtMultimedia |
| 50 | |
| 51 | |
| 52 | \ingroup multimedia_control |
| 53 | |
| 54 | |
| 55 | \brief The QMetaDataWriterControl class provides write access to the |
| 56 | meta-data of a QMediaService's media. |
| 57 | |
| 58 | If a QMediaService can provide write access to the meta-data of its |
| 59 | current media it will implement QMetaDataWriterControl. 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 code |
| 65 | by the meta-data members of QMediaObject, and so meta-data access is |
| 66 | potentially available in any of the media object classes. Any media |
| 67 | service may implement QMetaDataControl. |
| 68 | |
| 69 | The interface name of QMetaDataWriterControl is \c org.qt-project.qt.metadatawritercontrol/5.0 as |
| 70 | defined in QMetaDataWriterControl_iid. |
| 71 | |
| 72 | \sa QMediaService::requestControl(), QMediaObject |
| 73 | */ |
| 74 | |
| 75 | /*! |
| 76 | \macro QMetaDataWriterControl_iid |
| 77 | |
| 78 | \c org.qt-project.qt.metadatawritercontrol/5.0 |
| 79 | |
| 80 | Defines the interface name of the QMetaDataWriterControl class. |
| 81 | |
| 82 | \relates QMetaDataWriterControl |
| 83 | */ |
| 84 | |
| 85 | /*! |
| 86 | Construct a QMetaDataWriterControl 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 | |
| 90 | QMetaDataWriterControl::QMetaDataWriterControl(QObject *parent): |
| 91 | QMediaControl(*new QMediaControlPrivate, parent) |
| 92 | { |
| 93 | } |
| 94 | |
| 95 | /*! |
| 96 | Destroy the meta-data writer control. |
| 97 | */ |
| 98 | |
| 99 | QMetaDataWriterControl::~QMetaDataWriterControl() |
| 100 | { |
| 101 | } |
| 102 | |
| 103 | /*! |
| 104 | \fn bool QMetaDataWriterControl::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 bool QMetaDataWriterControl::isWritable() const |
| 113 | |
| 114 | Identifies if a media service's meta-data can be edited. |
| 115 | |
| 116 | Returns true if the meta-data is writable and false otherwise. |
| 117 | */ |
| 118 | |
| 119 | /*! |
| 120 | \fn QVariant QMetaDataWriterControl::metaData(const QString &key) const |
| 121 | |
| 122 | Returns the meta-data for the given \a key. |
| 123 | */ |
| 124 | |
| 125 | /*! |
| 126 | \fn void QMetaDataWriterControl::setMetaData(const QString &key, const QVariant &value) |
| 127 | |
| 128 | Sets the \a value of the meta-data element with the given \a key. |
| 129 | */ |
| 130 | |
| 131 | /*! |
| 132 | \fn QMetaDataWriterControl::availableMetaData() const |
| 133 | |
| 134 | Returns a list of keys there is meta-data available for. |
| 135 | */ |
| 136 | |
| 137 | /*! |
| 138 | \fn void QMetaDataWriterControl::metaDataChanged() |
| 139 | |
| 140 | Signal the changes of meta-data. |
| 141 | |
| 142 | If multiple meta-data elements are changed, |
| 143 | metaDataChanged(const QString &key, const QVariant &value) signal is emitted |
| 144 | for each of them with metaDataChanged() changed emitted once. |
| 145 | */ |
| 146 | |
| 147 | /*! |
| 148 | \fn void QMetaDataWriterControl::metaDataChanged(const QString &key, const QVariant &value) |
| 149 | |
| 150 | Signal the changes of one meta-data element \a value with the given \a key. |
| 151 | */ |
| 152 | |
| 153 | /*! |
| 154 | \fn void QMetaDataWriterControl::metaDataAvailableChanged(bool available) |
| 155 | |
| 156 | Signal the availability of meta-data has changed, \a available will |
| 157 | be true if the multimedia object has meta-data. |
| 158 | */ |
| 159 | |
| 160 | /*! |
| 161 | \fn void QMetaDataWriterControl::writableChanged(bool writable) |
| 162 | |
| 163 | Signal a change in the writable status of meta-data, \a writable will be |
| 164 | true if meta-data elements can be added or adjusted. |
| 165 | */ |
| 166 | |
| 167 | QT_END_NAMESPACE |
| 168 | |
| 169 | #include "moc_qmetadatawritercontrol.cpp" |
| 170 | |