qtmobility/src/multimedia/qmetadatacontrol.cpp
changeset 14 6fbed849b4f4
parent 11 06b8e2af4411
child 15 1f895d8a5b2b
equal deleted inserted replaced
11:06b8e2af4411 14:6fbed849b4f4
     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 "qmetadatacontrol.h"
       
    44 
       
    45 QT_BEGIN_NAMESPACE
       
    46 
       
    47 
       
    48 /*!
       
    49     \class QMetaDataControl
       
    50     \ingroup multimedia-serv
       
    51 
       
    52     \preliminary
       
    53     \brief The QMetaDataControl class provides access to the meta-data of a
       
    54     QMediaService's media.
       
    55 
       
    56     If a QMediaService can provide read or write access to the meta-data of
       
    57     its current media it will implement QMetaDataControl.  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     QtMediaServices::MetaData enumeration using the metaData() functions, or by
       
    61     string keys using the extendedMetaData() functions.
       
    62 
       
    63     The functionality provided by this control is exposed to application
       
    64     code by the meta-data members of QMediaObject, and so meta-data access
       
    65     is potentially available in any of the media object classes.  Any media
       
    66     service may implement QMetaDataControl.
       
    67 
       
    68     The interface name of QMetaDataControl is \c com.nokia.Qt.QMetaDataControl/1.0 as
       
    69     defined in QMetaDataControl_iid.
       
    70 
       
    71     \sa QMediaService::control(), QMediaObject
       
    72 */
       
    73 
       
    74 /*!
       
    75     \macro QMetaDataControl_iid
       
    76 
       
    77     \c com.nokia.Qt.QMetaDataControl/1.0
       
    78 
       
    79     Defines the interface name of the QMetaDataControl class.
       
    80 
       
    81     \relates QMetaDataControl
       
    82 */
       
    83 
       
    84 /*!
       
    85     Construct a QMetaDataControl 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 QMetaDataControl::QMetaDataControl(QObject *parent):
       
    90     QMediaControl(*new QMediaControlPrivate, parent)
       
    91 {
       
    92 }
       
    93 
       
    94 /*!
       
    95     Destroy the meta-data object.
       
    96 */
       
    97 
       
    98 QMetaDataControl::~QMetaDataControl()
       
    99 {
       
   100 }
       
   101 
       
   102 /*!
       
   103     \fn bool QMetaDataControl::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 QMetaDataControl::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 QMetaDataControl::metaData(QtMediaServices::MetaData key) const
       
   120 
       
   121     Returns the meta-data for the given \a key.
       
   122 */
       
   123 
       
   124 /*!
       
   125     \fn void QMetaDataControl::setMetaData(QtMediaServices::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 QMetaDataControl::availableMetaData() const
       
   132 
       
   133     Returns a list of keys there is meta-data available for.
       
   134 */
       
   135 
       
   136 /*!
       
   137     \fn QMetaDataControl::extendedMetaData(const QString &key) const
       
   138 
       
   139     Returns the metaData 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 QMetaDataControl::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 QMetaDataControl::availableExtendedMetaData() const
       
   156 
       
   157     Returns a list of keys there is extended meta-data available for.
       
   158 */
       
   159 
       
   160 
       
   161 /*!
       
   162     \fn void QMetaDataControl::metaDataChanged()
       
   163 
       
   164     Signal the changes of meta-data.
       
   165 */
       
   166 
       
   167 /*!
       
   168     \fn void QMetaDataControl::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 QMetaDataControl::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_qmetadatacontrol.cpp"
       
   182 QT_END_NAMESPACE
       
   183