musicservices/src/musicservices.cpp
changeset 55 f3930dda3342
parent 35 fdb31ab341af
equal deleted inserted replaced
51:560ce2306a17 55:f3930dda3342
    29 
    29 
    30     MusicServices implements fetching of music URIs via service provider API and embedded playback.
    30     MusicServices implements fetching of music URIs via service provider API and embedded playback.
    31 */
    31 */
    32 
    32 
    33 /*!
    33 /*!
    34     \fn void playReady( const QString& aFileName )
    34     \fn void playReady( const QString& uri )
    35 
    35 
    36     This signal is emitted when the play service has been loaded and playback of aFilenName should start
    36     This signal is emitted when the play service has been loaded and playback of \a uri should start.
    37 
    37 
    38  */
    38  */
    39 
    39 
    40 /*!
    40 /*!
    41     \fn void playReady( const XQSharableFile& file )
    41     \fn void playReady( const XQSharableFile& file )
    43     This signal is emitted when the play service has been loaded and playback of file handle should start
    43     This signal is emitted when the play service has been loaded and playback of file handle should start
    44 
    44 
    45  */
    45  */
    46 
    46 
    47 /*!
    47 /*!
    48     \fn void serviceActive()
    48     \fn void serviceActive( quint32 clientSecureId )
    49 
    49 
    50     This signal is emitted when the requested service has been detected and view initialization should continue
    50     This signal is emitted when the requested service has been detected and view initialization should continue.
    51 
    51 
    52  */
    52  */
    53 
    53 
    54 /*!
    54 /*!
    55  Constructs music services
    55  Constructs music services
    93 /*!
    93 /*!
    94  Returns service context title
    94  Returns service context title
    95  */
    95  */
    96 QString MusicServices::contextTitle() const
    96 QString MusicServices::contextTitle() const
    97 {
    97 {
    98 
       
    99     if( mCurrentService == MusicServices::EUriFetcher ) {
    98     if( mCurrentService == MusicServices::EUriFetcher ) {
   100         return mFetchService->contextTitle();
    99         return mFetchService->contextTitle();
   101     }
   100     }
   102     else if ( mCurrentService == MusicServices::EPlayback ) {
   101     else if ( mCurrentService == MusicServices::EPlayback ) {
   103         return mPlayService->contextTitle();
   102         return mPlayService->contextTitle();
   104     }
   103     }
   105     else {
   104     else {
   106         Q_ASSERT_X(false, "MusicServices::contexTitle", "undefined service");
   105         Q_ASSERT_X(false, "MusicServices::contexTitle", "undefined service");
   107         return QString();
   106         return QString();
   108     }
   107     }
   109     
       
   110     
       
   111 }
   108 }
   112 
   109 
   113 /*!
   110 /*!
   114  Slot to be called when service is to be completed with selected item \songName
   111  Slot to be called when service is to be completed with selected item \songName
   115  */
   112  */
   122         mFetchService->complete( list );
   119         mFetchService->complete( list );
   123     }
   120     }
   124     else if ( mCurrentService == MusicServices::EPlayback ) {
   121     else if ( mCurrentService == MusicServices::EPlayback ) {
   125         mPlayService->complete( list );
   122         mPlayService->complete( list );
   126     }
   123     }
   127     
       
   128 }
   124 }
   129 
   125