|
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 // Forward declaration |
|
30 class SmfPluginManagerUtil; |
|
31 |
|
32 /** |
|
33 * @ingroup smf_plugin_group |
|
34 * Interface specification for music search services. This class |
|
35 * provides basic functionality to allow applications to search for |
|
36 * tracks, get recommented tracks etc |
|
37 * |
|
38 * All of the functionality described here should be implemented by a service |
|
39 * specific plug-in. |
|
40 */ |
|
41 class SmfMusicSearchPlugin : public SmfPluginBase |
|
42 { |
|
43 Q_OBJECT |
|
44 public: |
|
45 /** |
|
46 * Constructor with default argument |
|
47 * @param aUtil The SmfPluginManagerUtil instance. The plugins can |
|
48 * call the method getAuthKeys() of this class, with its pluginID to |
|
49 * get the OAuth keys, keys are returned only if this plugin is |
|
50 * authorised by Smf franework |
|
51 */ |
|
52 SmfMusicSearchPlugin( SmfPluginManagerUtil *aUtil ); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 ~SmfMusicSearchPlugin( ); |
|
58 |
|
59 /** |
|
60 * Method to get recommended tracks |
|
61 * @param aRequest [out] The request data to be sent to network |
|
62 * @param aTrack The track for which similar recommendations |
|
63 * need to be fetched. |
|
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 recommendations( SmfPluginRequestData &aRequest, |
|
69 const SmfTrackInfo &aTrack, |
|
70 const int aPageNum = SMF_FIRST_PAGE, |
|
71 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
72 |
|
73 /** |
|
74 * Method to get similar tracks |
|
75 * @param aRequest [out] The request data to be sent to network |
|
76 * @param aTrack The track for which similar tracks |
|
77 * need to be fetched. |
|
78 * @param aPageNum The page to be extracted |
|
79 * @param aItemsPerPage Number of items per page |
|
80 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
81 */ |
|
82 virtual SmfPluginError tracks( SmfPluginRequestData &aRequest, |
|
83 const SmfTrackInfo &aTrack, |
|
84 const int aPageNum = SMF_FIRST_PAGE, |
|
85 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
86 |
|
87 /** |
|
88 * Method to get tracks having a similar finger print |
|
89 * @param aRequest [out] The request data to be sent to network |
|
90 * @param aSignature The finger print to be searched for need to be |
|
91 * fetched. |
|
92 * @param aPageNum The page to be extracted |
|
93 * @param aItemsPerPage Number of items per page |
|
94 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
95 */ |
|
96 virtual SmfPluginError trackInfo( SmfPluginRequestData &aRequest, |
|
97 const SmfMusicFingerPrint &aSignature, |
|
98 const int aPageNum = SMF_FIRST_PAGE, |
|
99 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
100 |
|
101 /** |
|
102 * Method to search information about where to buy this song from |
|
103 * @param aRequest [out] The request data to be sent to network |
|
104 * @param aTrack The track for which stores need to be searched |
|
105 * @param aPageNum The page to be extracted |
|
106 * @param aItemsPerPage Number of items per page |
|
107 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
108 */ |
|
109 virtual SmfPluginError stores( SmfPluginRequestData &aRequest, |
|
110 const SmfTrackInfo &aTrack, |
|
111 const int aPageNum = SMF_FIRST_PAGE, |
|
112 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
113 |
|
114 /** |
|
115 * Method to post the currently playing track |
|
116 * @param aRequest [out] The request data to be sent to network |
|
117 * @param aTrack The current playing track, that should be posted |
|
118 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
119 */ |
|
120 virtual SmfPluginError postCurrentPlaying( |
|
121 SmfPluginRequestData &aRequest, |
|
122 const SmfTrackInfo &aTrack ) = 0; |
|
123 |
|
124 }; |
|
125 |
|
126 Q_DECLARE_INTERFACE( SmfMusicSearchPlugin, "org.symbian.smf.plugin.music.search/v1.0" ); |
|
127 |
|
128 #endif /* SMFMUSICSEARCHPLUGIN_H_ */ |