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