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