qtmobility/src/multimedia/qmetadatareadercontrol.cpp
changeset 14 6fbed849b4f4
child 15 1f895d8a5b2b
equal deleted inserted replaced
11:06b8e2af4411 14:6fbed849b4f4
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2009 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 <qmetadatareadercontrol.h>
       
    44 
       
    45 QT_BEGIN_NAMESPACE
       
    46 
       
    47 
       
    48 /*!
       
    49     \class QMetaDataReaderControl
       
    50     \ingroup multimedia-serv
       
    51 
       
    52     \preliminary
       
    53     \brief The QMetaDataReaderControl class provides read access to the
       
    54     meta-data of a 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 QMetaDataReaderControl.  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     QtMultimedia::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 QMetaDataReaderControl.
       
    67 
       
    68     The interface name of QMetaDataReaderControl is
       
    69     \c com.nokia.Qt.QMetaDataReaderControl/1.0 as defined in
       
    70     QMetaDataReaderControl_iid.
       
    71 
       
    72     \sa QMediaService::requestControl(), QMediaObject
       
    73 */
       
    74 
       
    75 /*!
       
    76     \macro QMetaDataReaderControl_iid
       
    77 
       
    78     \c com.nokia.Qt.QMetaDataReaderControl/1.0
       
    79 
       
    80     Defines the interface name of the QMetaDataReaderControl class.
       
    81 
       
    82     \relates QMetaDataReaderControl
       
    83 */
       
    84 
       
    85 /*!
       
    86     Construct a QMetaDataReaderControl 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 QMetaDataReaderControl::QMetaDataReaderControl(QObject *parent):
       
    91     QMediaControl(*new QMediaControlPrivate, parent)
       
    92 {
       
    93 }
       
    94 
       
    95 /*!
       
    96     Destroy the meta-data object.
       
    97 */
       
    98 
       
    99 QMetaDataReaderControl::~QMetaDataReaderControl()
       
   100 {
       
   101 }
       
   102 
       
   103 /*!
       
   104     \fn bool QMetaDataReaderControl::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 QVariant QMetaDataReaderControl::metaData(QtMultimedia::MetaData key) const
       
   113 
       
   114     Returns the meta-data for the given \a key.
       
   115 */
       
   116 
       
   117 /*!
       
   118     \fn QMetaDataReaderControl::availableMetaData() const
       
   119 
       
   120     Returns a list of keys there is meta-data available for.
       
   121 */
       
   122 
       
   123 /*!
       
   124     \fn QMetaDataReaderControl::extendedMetaData(const QString &key) const
       
   125 
       
   126     Returns the metaData for an abitrary string \a key.
       
   127 
       
   128     The valid selection of keys for extended meta-data is determined by the provider and the meaning
       
   129     and type may differ between providers.
       
   130 */
       
   131 
       
   132 /*!
       
   133     \fn QMetaDataReaderControl::availableExtendedMetaData() const
       
   134 
       
   135     Returns a list of keys there is extended meta-data available for.
       
   136 */
       
   137 
       
   138 
       
   139 /*!
       
   140     \fn void QMetaDataReaderControl::metaDataChanged()
       
   141 
       
   142     Signal the changes of meta-data.
       
   143 */
       
   144 
       
   145 /*!
       
   146     \fn void QMetaDataReaderControl::metaDataAvailableChanged(bool available)
       
   147 
       
   148     Signal the availability of meta-data has changed, \a available will
       
   149     be true if the multimedia object has meta-data.
       
   150 */
       
   151 
       
   152 #include "moc_qmetadatareadercontrol.cpp"
       
   153 QT_END_NAMESPACE
       
   154