1 /** |
|
2 * @file smfmusicsearchplugin.h |
|
3 * @author Nalina Hariharan, Sasken Communication Technologies Ltd - Initial contribution |
|
4 * @version 1.0 |
|
5 * |
|
6 * @section LICENSE |
|
7 * |
|
8 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
9 * All rights reserved. |
|
10 * This component and the accompanying materials are made available |
|
11 * under the terms of the "Eclipse Public License v1.0" |
|
12 * which accompanies this distribution, and is available |
|
13 * at the URL "http://www.eclipse.org/legal/epl-v10.html" |
|
14 * |
|
15 * @section DESCRIPTION |
|
16 * |
|
17 * Interface specification for music search services |
|
18 */ |
|
19 |
|
20 #ifndef SMFMUSICSEARCHPLUGIN_H_ |
|
21 #define SMFMUSICSEARCHPLUGIN_H_ |
|
22 |
|
23 #include <smfpluginbase.h> |
|
24 #include <QList> |
|
25 #include <smfmusicfingerprint.h> |
|
26 #include <smftrackinfo.h> |
|
27 |
|
28 /** |
|
29 * @ingroup smf_plugin_group |
|
30 * Interface specification for music search services. This class |
|
31 * provides basic functionality to allow applications to search for |
|
32 * tracks, get recommented tracks etc |
|
33 * |
|
34 * All of the functionality described here should be implemented by a service |
|
35 * specific plug-in. |
|
36 */ |
|
37 class SmfMusicSearchPlugin : public SmfPluginBase |
|
38 { |
|
39 Q_OBJECT |
|
40 public: |
|
41 /** |
|
42 * Constructor with default argument |
|
43 * @param aParent The parent object |
|
44 */ |
|
45 SmfMusicSearchPlugin( QObject *aParent = 0 ); |
|
46 |
|
47 /** |
|
48 * Destructor |
|
49 */ |
|
50 ~SmfMusicSearchPlugin( ); |
|
51 |
|
52 /** |
|
53 * Method to get recommended tracks |
|
54 * @param aRequest [out] The request data to be sent to network |
|
55 * @param aTrack The track for which similar recommendations |
|
56 * need to be fetched. |
|
57 * @param aPageNum The page to be extracted |
|
58 * @param aItemsPerPage Number of items per page |
|
59 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
60 */ |
|
61 virtual SmfPluginError recommendations( SmfPluginRequestData *aRequest, |
|
62 const SmfTrackInfo aTrack, |
|
63 const int aPageNum = SMF_FIRST_PAGE, |
|
64 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
65 |
|
66 /** |
|
67 * Method to get similar tracks |
|
68 * @param aRequest [out] The request data to be sent to network |
|
69 * @param aTrack The track for which similar tracks |
|
70 * need to be fetched. |
|
71 * @param aPageNum The page to be extracted |
|
72 * @param aItemsPerPage Number of items per page |
|
73 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
74 */ |
|
75 virtual SmfPluginError tracks( SmfPluginRequestData *aRequest, |
|
76 const SmfTrackInfo aTrack, |
|
77 const int aPageNum = SMF_FIRST_PAGE, |
|
78 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
79 |
|
80 /** |
|
81 * Method to get tracks having a similar finger print |
|
82 * @param aRequest [out] The request data to be sent to network |
|
83 * @param aSignature The finger print to be searched for need to be |
|
84 * fetched. |
|
85 * @param aPageNum The page to be extracted |
|
86 * @param aItemsPerPage Number of items per page |
|
87 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
88 */ |
|
89 virtual SmfPluginError trackInfo( SmfPluginRequestData *aRequest, |
|
90 const SmfMusicFingerPrint aSignature, |
|
91 const int aPageNum = SMF_FIRST_PAGE, |
|
92 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
93 |
|
94 /** |
|
95 * Method to search information about where to buy this song from |
|
96 * @param aRequest [out] The request data to be sent to network |
|
97 * @param aTrack The track for which stores need to be searched |
|
98 * @param aPageNum The page to be extracted |
|
99 * @param aItemsPerPage Number of items per page |
|
100 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
101 */ |
|
102 virtual SmfPluginError stores( SmfPluginRequestData *aRequest, |
|
103 const SmfTrackInfo aTrack, |
|
104 const int aPageNum = SMF_FIRST_PAGE, |
|
105 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
106 |
|
107 /** |
|
108 * Method to post the currently playing track |
|
109 * @param aRequest [out] The request data to be sent to network |
|
110 * @param aTrack The current playing track, that should be posted |
|
111 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
112 */ |
|
113 virtual SmfPluginError postCurrentPlaying( |
|
114 SmfPluginRequestData *aRequest, |
|
115 const SmfTrackInfo aTrack ) = 0; |
|
116 |
|
117 }; |
|
118 |
|
119 Q_DECLARE_INTERFACE( SmfMusicSearchPlugin, "org.symbian.smf.plugin.music.search/v1.0" ); |
|
120 |
|
121 #endif /* SMFMUSICSEARCHPLUGIN_H_ */ |
|