qtmobility/src/multimedia/qmediaservice.cpp
changeset 14 6fbed849b4f4
parent 11 06b8e2af4411
equal deleted inserted replaced
11:06b8e2af4411 14:6fbed849b4f4
    51 
    51 
    52 /*!
    52 /*!
    53     \class QMediaService
    53     \class QMediaService
    54     \brief The QMediaService class provides a common base class for media
    54     \brief The QMediaService class provides a common base class for media
    55     service implementations.
    55     service implementations.
    56     \ingroup multimedia-serv
    56     \ingroup multimedia
    57     \preliminary
    57     \preliminary
    58 
    58 
    59     Media services provide implementations of the functionality promised
    59     Media services provide implementations of the functionality promised
    60     by media objects, and allow multiple providers to implement a QMediaObject.
    60     by media objects, and allow multiple providers to implement a QMediaObject.
    61 
    61 
    64     control which provides the core feature of a media object, and some
    64     control which provides the core feature of a media object, and some
    65     number of additional controls which provide either optional features of
    65     number of additional controls which provide either optional features of
    66     the media object, or features of a secondary media object or peripheral
    66     the media object, or features of a secondary media object or peripheral
    67     object.
    67     object.
    68 
    68 
    69     A pointer to media service's QMediaControl implementation can be
    69     A pointer to media service's QMediaControl implementation can be obtained
    70     obtained by passing the control's interface name to the control() function.
    70     by passing the control's interface name to the requestControl() function.
    71 
    71 
    72     \code
    72     \code
    73     QMediaPlayerControl *control = qobject_cast<QMediaPlayerControl *>(
    73     QMediaPlayerControl *control = qobject_cast<QMediaPlayerControl *>(
    74             service->control("com.nokia.Qt.QMediaPlayerControl/1.0"));
    74             service->requestControl("com.nokia.Qt.QMediaPlayerControl/1.0"));
    75     \endcode
    75     \endcode
    76 
    76 
    77     Media objects can use services loaded dynamically from plug-ins or
    77     Media objects can use services loaded dynamically from plug-ins or
    78     implemented statically within an applications.  Plug-in based services
    78     implemented statically within an applications.  Plug-in based services
    79     should also implement the QMediaServiceProviderPlugin interface.  Static
    79     should also implement the QMediaServiceProviderPlugin interface.  Static
   112 {
   112 {
   113     delete d_ptr;
   113     delete d_ptr;
   114 }
   114 }
   115 
   115 
   116 /*!
   116 /*!
   117     \fn QMediaService::control(const char *interface) const
   117     \fn QMediaService::requestControl(const char *interface)
   118 
   118 
   119     Returns a pointer to the media control implementing \a interface.
   119     Returns a pointer to the media control implementing \a interface.
   120 
   120 
   121     If the service does not implement the control a null pointer is returned instead.
   121     If the service does not implement the control, or if it is unavailable a
       
   122     null pointer is returned instead.
       
   123 
       
   124     Controls must be returned to the service when no longer needed using the
       
   125     releaseControl() function.
   122 */
   126 */
   123 
   127 
   124 /*!
   128 /*!
   125     \fn QMediaService::control() const
   129     \fn QMediaService::requestControl() const
   126 
   130 
   127     Returns a pointer to the media control of type T implemented by a media service.
   131     Returns a pointer to the media control of type T implemented by a media service.
   128 
   132 
   129     If the service does not implment the control a null pointer is returned instead.
   133     If the service does not implement the control, or if it is unavailable a
       
   134     null pointer is returned instead.
       
   135 
       
   136     Controls must be returned to the service when no longer needed using the
       
   137     releaseControl() function.
       
   138 */
       
   139 
       
   140 /*!
       
   141     \fn QMediaService::releaseControl(QMediaControl *control);
       
   142 
       
   143     Releases a \a control back to the service.
   130 */
   144 */
   131 
   145 
   132 #include "moc_qmediaservice.cpp"
   146 #include "moc_qmediaservice.cpp"
   133 
   147 
   134 QT_END_NAMESPACE
   148 QT_END_NAMESPACE