example/clientapi/smf/inc/smfplugins/smfmusic/smflyricsserviceplugin.h
changeset 2 86af6c333601
parent 1 4b1e636e8a71
equal deleted inserted replaced
1:4b1e636e8a71 2:86af6c333601
     6  * @section LICENSE
     6  * @section LICENSE
     7  *
     7  *
     8  * Copyright (c) 2010 Sasken Communication Technologies Ltd. 
     8  * Copyright (c) 2010 Sasken Communication Technologies Ltd. 
     9  * All rights reserved.
     9  * All rights reserved.
    10  * This component and the accompanying materials are made available 
    10  * This component and the accompanying materials are made available 
    11  * under the terms of the "{License}" 
    11  * under the terms of the "Eclipse Public License v1.0"
    12  * which accompanies  this distribution, and is available 
    12  * which accompanies  this distribution, and is available 
    13  * at the URL "{LicenseUrl}".
    13  * at the URL "http://www.eclipse.org/legal/epl-v10.html"
    14  * 
    14  * 
    15  * @section DESCRIPTION
    15  * @section DESCRIPTION
    16  *
    16  *
    17  * Interface specification for music track lyrics
    17  * Interface specification for music track lyrics
    18  */
    18  */
    19 
    19 
    20 #ifndef SMFLYRICSSERVICEPLUGIN_H_
    20 #ifndef SMFLYRICSSERVICEPLUGIN_H_
    21 #define SMFLYRICSSERVICEPLUGIN_H_
    21 #define SMFLYRICSSERVICEPLUGIN_H_
    22 
    22 
    23 #include <smfproviderbase.h>
    23 #include <smfpluginbase.h>
    24 #include <smftrackinfo.h>
    24 #include <smftrackinfo.h>
    25 #include <QString>
    25 #include <QString>
    26 #include <smfsubtitle.h>
    26 #include <smfsubtitle.h>
    27 #include <smflyrics.h>
    27 #include <smflyrics.h>
    28 #include <smfsubtitlesearchfilter.h>
       
    29 
    28 
    30 /**
    29 /**
       
    30  * @ingroup smf_plugin_group
    31  * Interface specification for music track lyrics
    31  * Interface specification for music track lyrics
    32  *
    32  *
    33  * All of the functionality described here should be implemented by a service
    33  * All of the functionality described here should be implemented by a service
    34  * specific plug-in.
    34  * specific plug-in.
    35  */
    35  */
    36 class SmfLyricsServicePlugin : public QObject
    36 class SmfLyricsServicePlugin : public SmfPluginBase
    37 	{
    37 	{
    38 	Q_OBJECT
    38 	Q_OBJECT
    39 public:
    39 public:
    40 	/**
    40 	/**
    41 	 * Constructor with default argument
    41 	 * Constructor with default argument
    47 	 * Destructor
    47 	 * Destructor
    48 	 */
    48 	 */
    49 	~SmfLyricsServicePlugin( );
    49 	~SmfLyricsServicePlugin( );
    50 	
    50 	
    51 	/**
    51 	/**
    52 	 * Method to get the provider information
       
    53 	 * @return Instance of SmfProviderBase
       
    54 	 */
       
    55 	virtual SmfProviderBase* getProviderInfo( ) = 0;
       
    56 	
       
    57 	/**
       
    58 	 * Method to get the lyrics
    52 	 * Method to get the lyrics
       
    53 	 * @param aRequest [out] The request data to be sent to network
    59 	 * @param aTrack The track whose lyrics need to be fetched
    54 	 * @param aTrack The track whose lyrics need to be fetched
    60 	 * @param aRequest [out] The request data to be sent to network
       
    61 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    55 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    62 	 */
    56 	 */
    63 	virtual SmfPluginError lyrics( const SmfTrackInfo aTrack,
    57 	virtual SmfPluginError lyrics( SmfPluginRequestData *aRequest, 
    64 			SmfPluginRequestData *aRequest ) = 0;
    58 			const SmfTrackInfo aTrack ) = 0;
    65 	
    59 	
    66 	/**
    60 	/**
    67 	 * Method to get the subtitle
    61 	 * Method to get the subtitle
       
    62 	 * @param aRequest [out] The request data to be sent to network
    68 	 * @param aTrack The track whose subtitle need to be fetched
    63 	 * @param aTrack The track whose subtitle need to be fetched
    69 	 * @param aRequest [out] The request data to be sent to network
       
    70 	 * @param aFilter The subtitle search filter if any
    64 	 * @param aFilter The subtitle search filter if any
    71 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    65 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    72 	 */
    66 	 */
    73 	virtual SmfPluginError subtitles( const SmfTrackInfo aTrack,
    67 	virtual SmfPluginError subtitles( SmfPluginRequestData *aRequest, 
    74 			SmfPluginRequestData *aRequest,
    68 			const SmfTrackInfo aTrack,
    75 			const SmfSubtitleSearchFilter aFilter = 0 ) = 0;
    69 			const SmfSubtitleSearchFilter aFilter = SubtitleAll ) = 0;
    76 	
       
    77 	/**
       
    78 	 * Method to get the result for a network request.
       
    79 	 * @param aTransportResult The result of transport operation
       
    80 	 * @param aReply The QNetworkReply instance for the request
       
    81 	 * @param aResult [out] An output parameter to the plugin manager.If the 
       
    82 	 * return value is SmfSendRequestAgain, QVariant will be of type 
       
    83 	 * SmfPluginRequestData. 
       
    84 	 * If last operation was lyrics(), aResult will be of type SmfLyrics
       
    85 	 * If last operation was subtitles(), aResult will be of type SmfSubtitle
       
    86 	 * @param aRetType [out] SmfPluginRetType
       
    87 	 * @param aIsLastPage [out] true if this the last page, else false
       
    88 	 * @return SmfPluginError 
       
    89 	 */
       
    90 	virtual SmfPluginError responseAvailable( 
       
    91 			const SmfTransportResult aTransportResult, 
       
    92 			QNetworkReply *aReply, 
       
    93 			QVariant* aResult, 
       
    94 			SmfPluginRetType aRetType,
       
    95 			bool aIsLastPage) = 0;
       
    96 	
    70 	
    97 	};
    71 	};
    98 
    72 
    99 Q_DECLARE_INTERFACE( SmfLyricsServicePlugin, "org.symbian.smf.plugin.music.lyrics/v1.0" );
    73 Q_DECLARE_INTERFACE( SmfLyricsServicePlugin, "org.symbian.smf.plugin.music.lyrics/v1.0" );
   100 
    74