smf/smfservermodule/smfserver/smfplugins/smflyricsserviceplugin.h
changeset 7 be09cf1f39dd
equal deleted inserted replaced
6:c39a6cfd1fb9 7:be09cf1f39dd
       
     1 /**
       
     2  * Copyright (c) 2010 Sasken Communication Technologies Ltd.
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the "Eclipse Public License v1.0" 
       
     6  * which accompanies  this distribution, and is available
       
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html"
       
     8  *
       
     9  * Initial Contributors:
       
    10  * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution
       
    11  *
       
    12  * Contributors:
       
    13  * Manasij Roy, Nalina Hariharan
       
    14  * 
       
    15  * Description:
       
    16  * Interface specification for music track lyrics
       
    17  *
       
    18  */
       
    19 
       
    20 
       
    21 #ifndef SMFLYRICSSERVICEPLUGIN_H_
       
    22 #define SMFLYRICSSERVICEPLUGIN_H_
       
    23 
       
    24 #include <smfpluginbase.h>
       
    25 #include <smftrackinfo.h>
       
    26 #include <QString>
       
    27 #include <smfsubtitle.h>
       
    28 #include <smflyrics.h>
       
    29 
       
    30 /**
       
    31  * @ingroup smf_plugin_group
       
    32  * Interface specification for music track lyrics
       
    33  *
       
    34  * All of the functionality described here should be implemented by a service
       
    35  * specific plug-in.
       
    36  */
       
    37 class SmfLyricsServicePlugin : public SmfPluginBase
       
    38 	{
       
    39 public:
       
    40 	
       
    41 	/**
       
    42 	 * Destructor
       
    43 	 */
       
    44 	virtual ~SmfLyricsServicePlugin( ) {}
       
    45 	
       
    46 	/**
       
    47 	 * Method to get the lyrics
       
    48 	 * @param aRequest [out] The request data to be sent to network
       
    49 	 * @param aTrack The track whose lyrics need to be fetched
       
    50 	 * @param aPageNum The page to be extracted
       
    51 	 * @param aItemsPerPage Number of items per page
       
    52 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    53 	 */
       
    54 	virtual SmfPluginError lyrics( SmfPluginRequestData &aRequest, 
       
    55 			const SmfTrackInfo &aTrack,
       
    56 			const int aPageNum = SMF_FIRST_PAGE, 
       
    57 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    58 	
       
    59 	/**
       
    60 	 * Method to get the subtitle
       
    61 	 * @param aRequest [out] The request data to be sent to network
       
    62 	 * @param aTrack The track whose subtitle need to be fetched
       
    63 	 * @param aFilter The subtitle search filter if any
       
    64 	 * @param aPageNum The page to be extracted
       
    65 	 * @param aItemsPerPage Number of items per page
       
    66 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    67 	 */
       
    68 	virtual SmfPluginError subtitles( SmfPluginRequestData &aRequest, 
       
    69 			const SmfTrackInfo &aTrack,
       
    70 			const SmfSubtitleSearchFilter &aFilter = SubtitleAll,
       
    71 			const int aPageNum = SMF_FIRST_PAGE, 
       
    72 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    73 	
       
    74 	/**
       
    75 	 * Customised method for SmfLyricsServicePlugin interface
       
    76 	 * @param aRequest [out] The request data to be sent to network
       
    77 	 * @param aOperation The operation type (should be known between 
       
    78 	 * the client interface and the plugin)
       
    79 	 * @param aData The data required to form the request (The type 
       
    80 	 * of data should be known between client and the plugin)
       
    81 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    82 	 */
       
    83 	virtual SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
       
    84 			const int &aOperation, QByteArray *aData ) = 0;
       
    85 	
       
    86 	};
       
    87 
       
    88 Q_DECLARE_INTERFACE( SmfLyricsServicePlugin, "org.symbian.smf.plugin.music.lyrics/v1.0" );
       
    89 
       
    90 #endif /* SMFLYRICSSERVICEPLUGIN_H_ */