|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the Qt Mobility Components. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #include <qmediacontrol_p.h> |
|
43 #include <qmetadatawritercontrol.h> |
|
44 |
|
45 QT_BEGIN_NAMESPACE |
|
46 |
|
47 |
|
48 /*! |
|
49 \class QMetaDataWriterControl |
|
50 \ingroup multimedia |
|
51 |
|
52 \preliminary |
|
53 \brief The QMetaDataWriterControl class provides write access to the |
|
54 meta-data of a QMediaService's media. |
|
55 |
|
56 If a QMediaService can provide write access to the meta-data of its |
|
57 current media it will implement QMetaDataWriterControl. This control |
|
58 provides functions for both retrieving and setting meta-data values. |
|
59 Meta-data may be addressed by the well defined keys in the |
|
60 QtMultimediaKit::MetaData enumeration using the metaData() functions, or |
|
61 by string keys using the extendedMetaData() functions. |
|
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 com.nokia.Qt.QMetaDataWriterControl/1.0 as |
|
69 defined in QMetaDataWriterControl_iid. |
|
70 |
|
71 \sa QMediaService::requestControl(), QMediaObject |
|
72 */ |
|
73 |
|
74 /*! |
|
75 \macro QMetaDataWriterControl_iid |
|
76 |
|
77 \c com.nokia.Qt.QMetaDataWriterControl/1.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(QtMultimediaKit::MetaData key) const |
|
120 |
|
121 Returns the meta-data for the given \a key. |
|
122 */ |
|
123 |
|
124 /*! |
|
125 \fn void QMetaDataWriterControl::setMetaData(QtMultimediaKit::MetaData 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 QMetaDataWriterControl::extendedMetaData(const QString &key) const |
|
138 |
|
139 Returns the meta-data for an abitrary string \a key. |
|
140 |
|
141 The valid selection of keys for extended meta-data is determined by the provider and the meaning |
|
142 and type may differ between providers. |
|
143 */ |
|
144 |
|
145 /*! |
|
146 \fn QMetaDataWriterControl::setExtendedMetaData(const QString &key, const QVariant &value) |
|
147 |
|
148 Change the value of the meta-data element with an abitrary string \a key to \a value. |
|
149 |
|
150 The valid selection of keys for extended meta-data is determined by the provider and the meaning |
|
151 and type may differ between providers. |
|
152 */ |
|
153 |
|
154 /*! |
|
155 \fn QMetaDataWriterControl::availableExtendedMetaData() const |
|
156 |
|
157 Returns a list of keys there is extended meta-data available for. |
|
158 */ |
|
159 |
|
160 |
|
161 /*! |
|
162 \fn void QMetaDataWriterControl::metaDataChanged() |
|
163 |
|
164 Signal the changes of meta-data. |
|
165 */ |
|
166 |
|
167 /*! |
|
168 \fn void QMetaDataWriterControl::metaDataAvailableChanged(bool available) |
|
169 |
|
170 Signal the availability of meta-data has changed, \a available will |
|
171 be true if the multimedia object has meta-data. |
|
172 */ |
|
173 |
|
174 /*! |
|
175 \fn void QMetaDataWriterControl::writableChanged(bool writable) |
|
176 |
|
177 Signal a change in the writable status of meta-data, \a writable will be |
|
178 true if meta-data elements can be added or adjusted. |
|
179 */ |
|
180 |
|
181 #include "moc_qmetadatawritercontrol.cpp" |
|
182 QT_END_NAMESPACE |
|
183 |