smf/smfservermodule/smfserver/smfplugins/smfmusicsearchplugin.h
changeset 10 1d94eb8df9c2
parent 9 b85b0c039c14
equal deleted inserted replaced
9:b85b0c039c14 10:1d94eb8df9c2
     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 search services
       
    17  *
       
    18  */
       
    19 
       
    20 
       
    21 #ifndef SMFMUSICSEARCHPLUGIN_H_
       
    22 #define SMFMUSICSEARCHPLUGIN_H_
       
    23 
       
    24 #include <smfpluginbase.h>
       
    25 #include <QList>
       
    26 #include <smfmusicfingerprint.h>
       
    27 #include <smftrackinfo.h>
       
    28 
       
    29 /**
       
    30  * @ingroup smf_plugin_group
       
    31  * Interface specification for music search services. This class
       
    32  * provides basic functionality to allow applications to search for 
       
    33  * tracks, get recommented tracks etc
       
    34  *
       
    35  * All of the functionality described here should be implemented by a service
       
    36  * specific plug-in.
       
    37  */
       
    38 class SmfMusicSearchPlugin : public SmfPluginBase
       
    39 	{
       
    40 public:
       
    41 	
       
    42 	/**
       
    43 	 * Destructor
       
    44 	 */
       
    45 	virtual ~SmfMusicSearchPlugin( ) {}
       
    46 	
       
    47 	/**
       
    48 	 * Method to get recommended tracks
       
    49 	 * @param aRequest [out] The request data to be sent to network
       
    50 	 * @param aTrack The track for which similar recommendations 
       
    51 	 * need to be fetched.
       
    52 	 * @param aPageNum The page to be extracted
       
    53 	 * @param aItemsPerPage Number of items per page
       
    54 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    55 	 */
       
    56 	virtual SmfPluginError recommendations( SmfPluginRequestData &aRequest,
       
    57 			const SmfTrackInfo &aTrack,
       
    58 			const int aPageNum = SMF_FIRST_PAGE, 
       
    59 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    60 	
       
    61 	/**
       
    62 	 * Method to get similar tracks
       
    63 	 * @param aRequest [out] The request data to be sent to network
       
    64 	 * @param aTrack The track for which similar tracks 
       
    65 	 * need to be fetched.
       
    66 	 * @param aPageNum The page to be extracted
       
    67 	 * @param aItemsPerPage Number of items per page
       
    68 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    69 	 */
       
    70 	virtual SmfPluginError tracks( SmfPluginRequestData &aRequest,
       
    71 			const SmfTrackInfo &aTrack,
       
    72 			const int aPageNum = SMF_FIRST_PAGE, 
       
    73 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    74 	
       
    75 	/**
       
    76 	 * Method to get tracks having a similar finger print
       
    77 	 * @param aRequest [out] The request data to be sent to network
       
    78 	 * @param aSignature The finger print to be searched for need to be 
       
    79 	 * fetched.
       
    80 	 * @param aPageNum The page to be extracted
       
    81 	 * @param aItemsPerPage Number of items per page
       
    82 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    83 	 */
       
    84 	virtual SmfPluginError trackInfo( SmfPluginRequestData &aRequest,
       
    85 			const SmfMusicFingerPrint &aSignature,
       
    86 			const int aPageNum = SMF_FIRST_PAGE, 
       
    87 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    88 	
       
    89 	/**
       
    90 	 * Method to search information about where to buy this song from
       
    91 	 * @param aRequest [out] The request data to be sent to network
       
    92 	 * @param aTrack The track for which stores need to be searched
       
    93 	 * @param aPageNum The page to be extracted
       
    94 	 * @param aItemsPerPage Number of items per page
       
    95 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    96 	 */
       
    97 	virtual SmfPluginError stores( SmfPluginRequestData &aRequest,
       
    98 			const SmfTrackInfo &aTrack,
       
    99 			const int aPageNum = SMF_FIRST_PAGE, 
       
   100 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
   101 	
       
   102 	/**
       
   103 	 * Method to post the currently playing track
       
   104 	 * @param aRequest [out] The request data to be sent to network
       
   105 	 * @param aTrack The current playing track, that should be posted
       
   106 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
   107 	 */
       
   108 	virtual SmfPluginError postCurrentPlaying( 
       
   109 			SmfPluginRequestData &aRequest,
       
   110 			const SmfTrackInfo &aTrack ) = 0;
       
   111 	
       
   112 	/**
       
   113 	 * Customised method for SmfMusicSearchPlugin interface
       
   114 	 * @param aRequest [out] The request data to be sent to network
       
   115 	 * @param aOperation The operation type (should be known between 
       
   116 	 * the client interface and the plugin)
       
   117 	 * @param aData The data required to form the request (The type 
       
   118 	 * of data should be known between client and the plugin)
       
   119 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
   120 	 */
       
   121 	virtual SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
       
   122 			const int &aOperation, QByteArray *aData ) = 0;
       
   123 	
       
   124 	};
       
   125 
       
   126 Q_DECLARE_INTERFACE( SmfMusicSearchPlugin, "org.symbian.smf.plugin.music.search/v1.0" );
       
   127 
       
   128 #endif /* SMFMUSICSEARCHPLUGIN_H_ */