smf/smfservermodule/smfserver/smfplugins/smfmusicsearchplugin.h
changeset 25 a180113055cb
parent 18 013a02bf2bb0
equal deleted inserted replaced
24:1cee9f1b95e0 25:a180113055cb
    23 
    23 
    24 #include <smfpluginbase.h>
    24 #include <smfpluginbase.h>
    25 #include <QList>
    25 #include <QList>
    26 #include <smfmusicfingerprint.h>
    26 #include <smfmusicfingerprint.h>
    27 #include <smftrackinfo.h>
    27 #include <smftrackinfo.h>
       
    28 #include <smfalbum.h>
       
    29 #include <smfartists.h>
    28 
    30 
    29 /**
    31 /**
    30  * @ingroup smf_plugin_group
    32  * @ingroup smf_plugin_group
    31  * Interface specification for music search services. This class
    33  * Interface specification for music search services. This class
    32  * provides basic functionality to allow applications to search for 
    34  * provides basic functionality to allow applications to search for 
    45 	virtual ~SmfMusicSearchPlugin( ) {}
    47 	virtual ~SmfMusicSearchPlugin( ) {}
    46 	
    48 	
    47 	/**
    49 	/**
    48 	 * Method to get recommended tracks
    50 	 * Method to get recommended tracks
    49 	 * @param aRequest [out] The request data to be sent to network
    51 	 * @param aRequest [out] The request data to be sent to network
    50 	 * @param aTrack The track for which similar recommendations 
    52 	 * @param aTrack [in] The track for which similar recommendations 
    51 	 * need to be fetched.
    53 	 * need to be fetched.
    52 	 * @param aPageNum The page to be extracted
    54 	 * @param aPageNum [in] The page to be extracted
    53 	 * @param aItemsPerPage Number of items per page
    55 	 * @param aItemsPerPage [in] Number of items per page
    54 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    56 	 * @return Appropriate value of the enum SmfPluginError.
       
    57 	 * Plugin error if any, else SmfPluginErrNone for success
    55 	 */
    58 	 */
    56 	virtual SmfPluginError recommendations( SmfPluginRequestData &aRequest,
    59 	virtual SmfPluginError recommendations( SmfPluginRequestData &aRequest,
    57 			const SmfTrackInfo &aTrack,
    60 			const SmfTrackInfo &aTrack,
    58 			const int aPageNum = SMF_FIRST_PAGE, 
    61 			const int aPageNum = SMF_FIRST_PAGE, 
    59 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
    62 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
    60 	
    63 	
    61 	/**
    64 	/**
    62 	 * Method to get similar tracks
    65 	 * Method to search for tracks similar to a given track
    63 	 * @param aRequest [out] The request data to be sent to network
    66 	 * @param aRequest [out] The request data to be sent to network
    64 	 * @param aTrack The track for which similar tracks 
    67 	 * @param aTrack [in] The track for which similar tracks 
    65 	 * need to be fetched.
    68 	 * need to be fetched.
    66 	 * @param aPageNum The page to be extracted
    69 	 * @param aPageNum [in] The page to be extracted
    67 	 * @param aItemsPerPage Number of items per page
    70 	 * @param aItemsPerPage [in] Number of items per page
    68 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    71 	 * @return Appropriate value of the enum SmfPluginError.
       
    72 	 * Plugin error if any, else SmfPluginErrNone for success
    69 	 */
    73 	 */
    70 	virtual SmfPluginError tracks( SmfPluginRequestData &aRequest,
    74 	virtual SmfPluginError tracksSimilar( SmfPluginRequestData &aRequest,
    71 			const SmfTrackInfo &aTrack,
    75 			const SmfTrackInfo &aTrack,
       
    76 			const int aPageNum = SMF_FIRST_PAGE, 
       
    77 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    78 	
       
    79 	/**
       
    80 	 * Method to search for tracks of a given album
       
    81 	 * @param aRequest [out] The request data to be sent to network
       
    82 	 * @param aAlbum [in] The album whose tracks need to be fetched.
       
    83 	 * @param aPageNum [in] The page to be extracted
       
    84 	 * @param aItemsPerPage [in] Number of items per page
       
    85 	 * @return Appropriate value of the enum SmfPluginError.
       
    86 	 * Plugin error if any, else SmfPluginErrNone for success
       
    87 	 */
       
    88 	virtual SmfPluginError tracksOfAlbum( SmfPluginRequestData &aRequest,
       
    89 			const SmfAlbum &aAlbum,
       
    90 			const int aPageNum = SMF_FIRST_PAGE, 
       
    91 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    92 	
       
    93 	/**
       
    94 	 * Method to search for tracks of the given artist(s)
       
    95 	 * @param aRequest [out] The request data to be sent to network
       
    96 	 * @param aArtist [in] The artist(s) whose tracks need to be fetched.
       
    97 	 * @param aPageNum [in] The page to be extracted
       
    98 	 * @param aItemsPerPage [in] Number of items per page
       
    99 	 * @return Appropriate value of the enum SmfPluginError.
       
   100 	 * Plugin error if any, else SmfPluginErrNone for success
       
   101 	 */
       
   102 	virtual SmfPluginError tracksOfArtist( SmfPluginRequestData &aRequest,
       
   103 			const SmfArtists &aArtist,
    72 			const int aPageNum = SMF_FIRST_PAGE, 
   104 			const int aPageNum = SMF_FIRST_PAGE, 
    73 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
   105 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
    74 	
   106 	
    75 	/**
   107 	/**
    76 	 * Method to get tracks having a similar finger print
   108 	 * Method to get tracks having a similar finger print
    77 	 * @param aRequest [out] The request data to be sent to network
   109 	 * @param aRequest [out] The request data to be sent to network
    78 	 * @param aSignature The finger print to be searched for need to be 
   110 	 * @param aSignature [in] The finger print to be searched for need  
    79 	 * fetched.
   111 	 * to be fetched.
    80 	 * @param aPageNum The page to be extracted
   112 	 * @param aPageNum [in] The page to be extracted
    81 	 * @param aItemsPerPage Number of items per page
   113 	 * @param aItemsPerPage [in] Number of items per page
    82 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   114 	 * @return Appropriate value of the enum SmfPluginError.
       
   115 	 * Plugin error if any, else SmfPluginErrNone for success
    83 	 */
   116 	 */
    84 	virtual SmfPluginError trackInfo( SmfPluginRequestData &aRequest,
   117 	virtual SmfPluginError trackInfo( SmfPluginRequestData &aRequest,
    85 			const SmfMusicFingerPrint &aSignature,
   118 			const SmfMusicFingerPrint &aSignature,
    86 			const int aPageNum = SMF_FIRST_PAGE, 
   119 			const int aPageNum = SMF_FIRST_PAGE, 
    87 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
   120 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
    88 	
   121 	
    89 	/**
   122 	/**
    90 	 * Method to search information about where to buy this song from
   123 	 * Method to search information about where to buy this song from
    91 	 * @param aRequest [out] The request data to be sent to network
   124 	 * @param aRequest [out] The request data to be sent to network
    92 	 * @param aTrack The track for which stores need to be searched
   125 	 * @param aTrack [in] The track for which stores need to be searched
    93 	 * @param aPageNum The page to be extracted
   126 	 * @param aPageNum [in] The page to be extracted
    94 	 * @param aItemsPerPage Number of items per page
   127 	 * @param aItemsPerPage [in] Number of items per page
    95 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   128 	 * @return Appropriate value of the enum SmfPluginError.
       
   129 	 * Plugin error if any, else SmfPluginErrNone for success
    96 	 */
   130 	 */
    97 	virtual SmfPluginError stores( SmfPluginRequestData &aRequest,
   131 	virtual SmfPluginError stores( SmfPluginRequestData &aRequest,
    98 			const SmfTrackInfo &aTrack,
   132 			const SmfTrackInfo &aTrack,
    99 			const int aPageNum = SMF_FIRST_PAGE, 
   133 			const int aPageNum = SMF_FIRST_PAGE, 
   100 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
   134 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
   101 	
   135 	
   102 	/**
   136 	/**
   103 	 * Customised method for SmfMusicSearchPlugin interface
   137 	 * Customised method for SmfMusicSearchPlugin interface
   104 	 * @param aRequest [out] The request data to be sent to network
   138 	 * @param aRequest [out] The request data to be sent to network
   105 	 * @param aOperation The operation type (should be known between 
   139 	 * @param aOperation [in] The operation type (should be known between 
   106 	 * the client interface and the plugin)
   140 	 * the client interface and the plugin)
   107 	 * @param aData The data required to form the request (The type 
   141 	 * @param aData [in] The data required to form the request (The type 
   108 	 * of data should be known between client and the plugin)
   142 	 * of data should be known between client and the plugin)
   109 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   143 	 * @return Appropriate value of the enum SmfPluginError.
       
   144 	 * Plugin error if any, else SmfPluginErrNone for success
   110 	 */
   145 	 */
   111 	virtual SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
   146 	virtual SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
   112 			const int &aOperation, QByteArray *aData ) = 0;
   147 			const int &aOperation, QByteArray *aData ) = 0;
   113 	
   148 	
   114 	};
   149 	};