1 /* |
1 /** |
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
2 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the "{License}" |
5 * under the terms of the "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "{LicenseUrl}". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html" |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
10 * Chandradeep Gandhi, Sasken Communication Technologies Ltd - Initial contribution |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * Manasij Roy, Nalina Hariharan |
14 * Description: |
14 * |
15 * Interface spefication for music related services |
15 * Description: |
16 * |
16 * The SmfEvent class represents an event |
17 */ |
17 * |
|
18 */ |
18 |
19 |
19 #ifndef SMFMUSIC_H |
20 #ifndef SMFMUSIC_H |
20 #define SMMUSIC_H |
21 #define SMMUSIC_H |
21 |
22 |
22 #include <QObject> |
23 #include <QObject> |
23 |
24 |
24 #include <qmobilityglobal.h> |
25 #include <qmobilityglobal.h> |
25 #include <qgeopositioninfo.h> |
26 #include <qgeopositioninfo.h> |
26 |
27 |
|
28 #include "smfglobal.h" |
27 #include "smfprovider.h" |
29 #include "smfprovider.h" |
28 #include "smfcontact.h" |
30 #include "smfcontact.h" |
29 |
31 #include "smfevent.h" |
30 |
32 |
31 class SmfProvider; //basic Smf service Provider info |
33 class SmfProvider; //basic Smf service Provider info |
32 class SmfContact; // Smf contact |
34 class SmfContact; // Smf contact |
33 class SmfMusicRating;//rating value from 0..31 - services would map accordingly |
35 class SmfMusicRating;//rating value from 0..31 - services would map accordingly |
34 class SmfMusicProfile; //user profile containing music usage and interest info, extends SmfContact |
36 class SmfMusicProfile; //user profile containing music usage and interest info, extends SmfContact |
35 class SmfTrackInfo; //id, title, album, artist, genre, tag, director,release year, rating, comment info |
37 class SmfTrackInfo; //id, title, album, artist, genre, tag, director,release year, rating, comment info |
36 class SmfMusicFingerPrint; //generation is not in scope of smf |
38 class SmfMusicFingerPrint; //generation is not in scope of smf |
37 class SmfVenue; |
39 class SmfVenue; |
38 class SmfMusicModel; |
40 class SmfEvent; |
39 class SmfEvents; |
|
40 class SmfPlaylist; |
41 class SmfPlaylist; |
41 class SmfLyricsService; |
42 class SmfLyricsService; |
42 class SmfLyrics; |
43 class SmfLyrics; |
43 class SmfSubtitle; |
44 class SmfSubtitle; |
44 class SmfSubtitleSearchFilter; |
45 class SmfSubtitleSearchFilter; |
45 |
46 |
46 typedef QList<SmfMusicProfile> SmfMusicProfileList; |
47 typedef QList<SmfMusicProfile> SmfMusicProfileList; |
47 typedef QList<SmfTrackInfo> SmfTrackInfoList; |
48 typedef QList<SmfTrackInfo> SmfTrackInfoList; |
48 typedef QList<SmfEvents> SmfEventsList; |
49 typedef QList<SmfEvent> SmfEventsList; |
49 typedef QList<SmfProvider> SmfProviderList; |
50 typedef QList<SmfProvider> SmfProviderList; |
50 typedef QList<SmfPlaylist> SmfPlaylistList; |
51 typedef QList<SmfPlaylist> SmfPlaylistList; |
51 typedef QList<SmfVenue> SmfVenueList; |
52 typedef QList<SmfVenue> SmfVenueList; |
52 typedef QList<SmfLyrics> SmfLyricsList; |
53 typedef QList<SmfLyrics> SmfLyricsList; |
53 typedef QList<SmfSubtitle> SmfSubtitleList; |
54 typedef QList<SmfSubtitle> SmfSubtitleList; |
54 /** |
55 /** |
|
56 * @ingroup smf_client_group |
55 * Basic music service ("org.symbian.smf.client.music.service") |
57 * Basic music service ("org.symbian.smf.client.music.service") |
56 */ |
58 */ |
57 class SMFCLIENT_EXPORT SmfMusicService : public QObject |
59 class SMFCLIENT_EXPORT SmfMusicService : public QObject |
58 { |
60 { |
59 Q_OBJECT |
61 Q_OBJECT |
67 */ |
69 */ |
68 SmfMusicService(SmfProvider* baseProvider = 0); |
70 SmfMusicService(SmfProvider* baseProvider = 0); |
69 ~SmfMusicService(); |
71 ~SmfMusicService(); |
70 |
72 |
71 public: |
73 public: |
72 |
74 |
73 /** |
75 /** |
74 * Gets self profile information asynchronously. |
76 * Gets self profile information asynchronously. |
75 * userInfoAvailable() signal is emitted with SmfMusicProfile when the info is arrived |
77 * userInfoAvailable() signal is emitted with SmfMusicProfile when the info is arrived |
76 */ |
78 */ |
77 virtual void userinfo() = 0; |
79 void userinfo() ; |
78 |
80 |
79 /** |
81 /** |
80 * Asynchronously searches information about other service users for a particular venue |
82 * Asynchronously searches information about other service users for a particular venue |
81 * serachInfoAvailable() signal is emitted with SmfMusicProfileList when the info is arrived |
83 * searchInfoAvailable() signal is emitted with SmfMusicProfileList when the info is arrived. |
82 */ |
84 * When the list is big user can specify the page number and per page item data. |
83 virtual void searchUser(SmfVenue venue) = 0; |
85 * If not supplied by the user default values are used. |
84 |
86 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
85 /** |
87 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
86 * Returns the model |
88 */ |
87 */ |
89 void searchUser(SmfVenue venue,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; |
88 virtual SmfMusicModel model() = 0; // maybe we can make a QItemModel-derived model? |
90 |
89 |
|
90 //APIs to get/set base provider info (SmfProvider) |
|
91 |
|
92 /** |
91 /** |
93 * Gets the base provider info |
92 * Gets the base provider info |
94 */ |
93 */ |
95 virtual SmfProvider* getProvider() = 0; |
94 SmfProvider* getProvider() ; |
96 |
95 |
97 /** |
|
98 * Sets the base provider info |
|
99 */ |
|
100 virtual void setProvider(SmfProvider* provider) = 0; |
|
101 |
96 |
102 signals: |
97 signals: |
103 /** |
98 /** |
104 * Notification on arrival of the self profile as result of userinfo(). |
99 * Notification on arrival of the self profile as result of userinfo(). |
105 * @param profile The self profile |
100 * @param profile The self profile |
106 */ |
101 */ |
107 void userInfoAvailable(SmfMusicProfile* profile, QString error); |
102 void userInfoAvailable(SmfMusicProfile* profile, QString error); |
|
103 |
|
104 void searchInfoAvailable(SmfMusicProfileList& profileList, QString error,SmfResultPage resultPage); |
108 private: |
105 private: |
109 SmfProvider* m_baseProvider; |
106 SmfProvider* m_baseProvider; |
110 }; |
107 }; |
111 SMF_GETSERVICES(SmfMusicService, "org.symbian.smf.client.music.service\0.2") |
108 SMF_SERVICE_NAME(SmfMusicService, "org.symbian.smf.client.music.service\0.2") |
112 |
109 |
113 |
110 |
114 /** |
111 /** |
115 * Provides service ("org.symbian.smf.client.music.search") for music search |
112 * Provides service ("org.symbian.smf.client.music.search") for music search |
116 */ |
113 */ |
128 SmfMusicSearch(SmfProvider* baseProvider = 0); |
125 SmfMusicSearch(SmfProvider* baseProvider = 0); |
129 ~SmfMusicSearch(); |
126 ~SmfMusicSearch(); |
130 |
127 |
131 public: |
128 public: |
132 // Get the track listing - might be made asynchrnous later |
129 // Get the track listing - might be made asynchrnous later |
133 |
130 |
134 /** |
131 /** |
135 * Searches for music recommendations similar to a particulartrack asynchronously. |
132 * Searches for music recommendations similar to a particulartrack asynchronously. |
136 * The signal trackSearchAvailable() is emitted with SmfTrackInfoList |
133 * The signal trackSearchAvailable() is emitted with SmfTrackInfoList |
137 * once its arrived. |
134 * once its arrived. |
|
135 * When the list is big user can specify the page number and per page item data. |
|
136 * If not supplied by the user default values are used. |
138 * @param track The track for which similar recommendations need to be fetched. |
137 * @param track The track for which similar recommendations need to be fetched. |
139 */ |
138 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
140 virtual void recommendations(SmfTrackInfo track) = 0; // basic list of track objects |
139 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
141 |
140 */ |
|
141 void recommendations(SmfTrackInfo track,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; // basic list of track objects |
|
142 |
142 /** |
143 /** |
143 * Searches for tracks similar to a given track asynchronously. |
144 * Searches for tracks similar to a given track asynchronously. |
144 * The signal trackSearchAvailable() is emitted with SmfTrackInfoList |
145 * The signal trackSearchAvailable() is emitted with SmfTrackInfoList |
145 * once its arrived. |
146 * once its arrived. |
|
147 * When the list is big user can specify the page number and per page item data. |
|
148 * If not supplied by the user default values are used. |
146 * @param track The search criteria, similar tracks are searched |
149 * @param track The search criteria, similar tracks are searched |
147 */ |
150 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
148 virtual void tracks(SmfTrackInfo track) = 0; // basic list of track objects |
151 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
149 |
152 */ |
|
153 void tracks(SmfTrackInfo track,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; // basic list of track objects |
|
154 |
150 /** |
155 /** |
151 * Searches for a track having similar finger print asynchronously. |
156 * Searches for a track having similar finger print asynchronously. |
152 * The signal trackSearchAvailable() is emitted with SmfTrackInfoList |
157 * The signal trackSearchAvailable() is emitted with SmfTrackInfoList |
153 * once its arrived. |
158 * once its arrived. |
154 * @param signature The search criteria,signature to be searched for |
159 * @param signature The search criteria,signature to be searched for |
155 */ |
160 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
156 virtual void trackInfo(SmfMusicFingerPrint signature) = 0; // search by fingerprint object |
161 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
157 |
162 */ |
|
163 void trackInfo(SmfMusicFingerPrint signature,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; // search by fingerprint object |
|
164 |
158 /** |
165 /** |
159 * Search information about where to buy this song from asynchronously. |
166 * Search information about where to buy this song from asynchronously. |
160 * The signal storeSearchAvailable() is emitted with SmfProviderList once its arrived. |
167 * The signal storeSearchAvailable() is emitted with SmfProviderList once its arrived. |
161 * @param track The search criteria for stores |
168 * @param track The search criteria for stores |
162 */ |
169 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
163 virtual void stores(SmfTrackInfo track) = 0; |
170 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
164 |
171 */ |
|
172 void stores(SmfTrackInfo track,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; |
|
173 |
165 //APIs to get/set base provider info (SmfProvider) |
174 //APIs to get/set base provider info (SmfProvider) |
166 |
175 |
167 /** |
176 /** |
168 * Gets the base provider info |
177 * Gets the base provider info |
169 */ |
178 */ |
170 virtual SmfProvider* getProvider() = 0; |
179 SmfProvider* getProvider() ; |
171 |
180 |
172 /** |
|
173 * Sets the base provider info |
|
174 */ |
|
175 virtual void setProvider(SmfProvider* provider) = 0; |
|
176 |
181 |
177 public slots: |
182 public slots: |
178 |
183 |
179 /** |
184 /** |
180 * Posts currently playing track. |
185 * Posts currently playing track. |
181 * Success can be checked by checking the signal postFinished() |
186 * Success can be checked by checking the signal postFinished() |
182 * @param track Track to post |
187 * @param track Track to post |
183 */ |
188 */ |
184 virtual void postCurrentPlaying(SmfTrackInfo track) = 0; |
189 void postCurrentPlaying(SmfTrackInfo track) ; |
185 //virtual int postRating(SmfTrackInfo track, SmfMusicRating rate) = 0; |
190 //int postRating(SmfTrackInfo track, SmfMusicRating rate) ; |
186 //virtual int postComments(SmfTrackInfo track, SmfComment comment) = 0; |
191 //int postComments(SmfTrackInfo track, SmfComment comment) ; |
187 |
192 |
188 signals: |
193 signals: |
189 /** |
194 /** |
190 * Emitted when the search result for a track is available. |
195 * Emitted when the search result for a track is available. |
191 * Note if number of tacks in the search is large, then it can download the list page by page. |
196 * Note if number of tacks in the search is large, then it can download the list page by page. |
192 * In that case this signal is emitted multiple times. |
197 * In that case this signal is emitted multiple times. |
193 * @param result The search result |
198 * @param resultPage Page number info |
194 */ |
199 */ |
195 void trackSearchAvailable(SmfTrackInfoList* result, QString error, int pageNumber=0); |
200 void trackSearchAvailable(SmfTrackInfoList* result, QString error,SmfResultPage resultPage); |
196 |
201 |
197 /** |
202 /** |
198 * Emitted when the search result for a store is available. |
203 * Emitted when the search result for a store is available. |
199 * Note if number of tacks in the search is large, then it can download the list page by page. |
204 * Note if number of tacks in the search is large, then it can download the list page by page. |
200 * In that case this signal is emitted multiple times. |
205 * In that case this signal is emitted multiple times. |
201 * @param result The search result |
206 * @param resultPage Page number info |
202 */ |
207 */ |
203 void storeSearchAvailable(SmfProviderList* result, QString error, int pageNumber=0); |
208 void storeSearchAvailable(SmfProviderList* result, QString error, SmfResultPage resultPage); |
204 private: |
209 private: |
205 SmfProvider* m_baseProvider; |
210 SmfProvider* m_baseProvider; |
206 }; |
211 }; |
207 SMF_GETSERVICES(SmfMusicSearch, "org.symbian.smf.client.music.search\0.2") |
212 SMF_SERVICE_NAME(SmfMusicSearch, "org.symbian.smf.client.music.search\0.2") |
208 |
213 |
209 |
214 |
210 /** |
215 /** |
211 * Remote playlist |
216 * Remote playlist |
212 */ |
217 */ |
213 class SMFCLIENT_EXPORT SmfPlaylist : public QObject |
218 class SMFCLIENT_EXPORT SmfPlaylist : public QObject |
214 { |
219 { |
215 Q_OBJECT |
220 Q_OBJECT |
216 |
221 |
217 public: |
222 public: |
218 SmfPlaylist(); |
223 SmfPlaylist(); |
219 ~SmfPlaylist(); |
224 ~SmfPlaylist(); |
220 |
225 |
221 /** |
226 /** |
222 * Gets tracks in the playlist |
227 * Gets tracks in the playlist |
223 */ |
228 */ |
224 SmfTrackInfoList* getTrackList(); |
229 SmfTrackInfoList* getTrackList(); |
225 |
230 |
226 /** |
231 /** |
227 * Gets playlist title |
232 * Gets playlist title |
228 */ |
233 */ |
229 QString getPlayListTitle(); |
234 QString getPlayListTitle(); |
230 |
235 |
231 /** |
236 /** |
232 * Gets the creation date |
237 * Gets the creation date |
233 */ |
238 */ |
234 QDateTime getCreationDate(); |
239 QDateTime getCreationDate(); |
235 |
240 |
236 /** |
241 /** |
237 * Sets tracks in the playlist |
242 * Sets tracks in the playlist |
238 */ |
243 */ |
239 void setTrackList(SmfTrackInfoList* trackList); |
244 void setTrackList(SmfTrackInfoList* trackList); |
240 |
245 |
241 /** |
246 /** |
242 * Sets playlist title |
247 * Sets playlist title |
243 */ |
248 */ |
244 void setPlayListTitle(QString title); |
249 void setPlayListTitle(QString title); |
245 |
250 |
246 /** |
251 /** |
247 * Sets creation date |
252 * Sets creation date |
248 */ |
253 */ |
249 void setCreationDate(QDateTime time); |
254 void setCreationDate(QDateTime time); |
250 |
255 |
251 private: |
256 private: |
252 SmfTrackInfoList* m_trackList; |
257 SmfTrackInfoList* m_trackList; |
253 QString m_title; |
258 QString m_title; |
254 QDateTime m_creationDate; |
259 QDateTime m_creationDate; |
255 }; |
260 }; |
282 */ |
287 */ |
283 SmfPlaylistService(SmfProvider* baseProvider = 0); |
288 SmfPlaylistService(SmfProvider* baseProvider = 0); |
284 ~SmfPlaylistService(); |
289 ~SmfPlaylistService(); |
285 |
290 |
286 public: |
291 public: |
287 |
292 |
288 /** |
293 /** |
289 * Gets the list playlists for the logged-in user asynchronously. |
294 * Gets the list playlists for the logged-in user asynchronously. |
290 * The signal playlistsListAvailable() signal is emitted with |
295 * The signal playlistsListAvailable() signal is emitted with |
291 * SmfPlaylistList once its arrived |
296 * SmfPlaylistList once its arrived . |
292 */ |
297 * When the list is big user can specify the page number and per page item data. |
293 virtual void playlists() = 0; // basic list of playlist objects |
298 * If not supplied by the user default values are used. |
294 |
299 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
|
300 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
|
301 */ |
|
302 void playlists(int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; // basic list of playlist objects |
|
303 |
295 /** |
304 /** |
296 * Gets the list playlists for the given user asynchronously. |
305 * Gets the list playlists for the given user asynchronously. |
297 * The signal playlistsListAvailable() signal is emitted with |
306 * The signal playlistsListAvailable() signal is emitted with |
298 * SmfPlaylistList once its arrived. |
307 * SmfPlaylistList once its arrived. |
|
308 * When the list is big user can specify the page number and per page item data. |
|
309 * If not supplied by the user default values are used. |
299 * @param user User for which to get the playlists |
310 * @param user User for which to get the playlists |
300 */ |
311 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
301 virtual void playlistsOf(SmfMusicProfile* user) = 0; |
312 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
|
313 */ |
|
314 void playlistsOf(SmfMusicProfile* user,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; |
302 |
315 |
303 //APIs to get/set base provider info (SmfProvider) |
316 //APIs to get/set base provider info (SmfProvider) |
304 |
317 |
305 /** |
318 /** |
306 * Gets the base provider info |
319 * Gets the base provider info |
307 */ |
320 */ |
308 virtual SmfProvider* getProvider() = 0; |
321 SmfProvider* getProvider() ; |
309 |
322 |
310 /** |
|
311 * Sets the base provider info |
|
312 */ |
|
313 virtual void setProvider(SmfProvider* provider) = 0; |
|
314 |
323 |
315 public slots: |
324 public slots: |
316 |
325 |
317 /** |
326 /** |
318 * Upload currently playing track to a playlist. Signal |
327 * Upload currently playing track to a playlist. Signal |
319 * playlistUpdated() can be checked for success value |
328 * playlistUpdated() can be checked for success value |
320 * @param plst The playlist to be added in |
329 * @param plst The playlist to be added in |
321 * @param tracks The list of tracks to uploaded |
330 * @param tracks The list of tracks to uploaded |
322 */ |
331 */ |
323 virtual int addToPlaylist(SmfPlaylist plst, SmfTrackInfoList* tracks) = 0; |
332 int addToPlaylist(SmfPlaylist plst, SmfTrackInfoList* tracks) ; |
324 |
333 |
325 /** |
334 /** |
326 * Upload currently playing playlist . Signal |
335 * Upload currently playing playlist . Signal |
327 * playlistUpdated() can be checked for success value |
336 * playlistUpdated() can be checked for success value |
328 * @param plst The playlist to be uploaded |
337 * @param plst The playlist to be uploaded |
329 */ |
338 */ |
330 virtual int postCurrentPlayingPlaylist(SmfPlaylist plst) = 0; |
339 int postCurrentPlayingPlaylist(SmfPlaylist plst) ; |
331 |
340 |
332 |
341 |
333 signals: |
342 signals: |
334 /** |
343 /** |
335 * Notification of availability of list of playlists requested. |
344 * Notification of availability of list of playlists requested. |
336 * Note if number of list is large, then it can download the list page by page. |
345 * Note if number of list is large, then it can download the list page by page. |
337 * In that case this signal is emitted multiple times. |
346 * In that case this signal is emitted multiple times. |
338 */ |
347 * @param resultPage Page number info |
339 void playlistsListAvailable(SmfPlaylistList*, QString error, int pageNumber=0); |
348 */ |
|
349 void playlistsListAvailable(SmfPlaylistList*, QString error, SmfResultPage resultPage); |
340 /** |
350 /** |
341 * Signals remote updation of playlist with success value |
351 * Signals remote updation of playlist with success value |
342 */ |
352 */ |
343 int playlistUpdated(bool success) ; |
353 int playlistUpdated(bool success) ; |
344 private: |
354 private: |
345 SmfProvider* m_baseProvider; |
355 SmfProvider* m_baseProvider; |
346 }; |
356 }; |
347 SMF_GETSERVICES(SmfPlaylistService, "org.symbian.smf.client.music.playlist\0.2") |
357 SMF_SERVICE_NAME(SmfPlaylistService, "org.symbian.smf.client.music.playlist\0.2") |
348 |
358 |
349 |
359 |
350 /** |
360 /** |
351 * provides service ("org.symbian.smf.client.music.events") |
361 * provides service ("org.symbian.smf.client.music.events") |
352 */ |
362 */ |
362 */ |
372 */ |
363 SmfMusicEvents(SmfProvider* baseProvider = 0); |
373 SmfMusicEvents(SmfProvider* baseProvider = 0); |
364 ~SmfMusicEvents(); |
374 ~SmfMusicEvents(); |
365 |
375 |
366 public: |
376 public: |
367 |
377 |
368 /** |
378 /** |
369 * Gets list of events in a particular location asynchronously. |
379 * Gets list of events in a particular location asynchronously. |
370 * eventsAvailable() signal is emitted with SmfEventsList once its arrived |
380 * eventsAvailable() signal is emitted with SmfEventsList once its arrived. |
371 */ |
381 * When the list is big user can specify the page number and per page item data. |
372 virtual void events(QtMobility::QContactGeolocation location) = 0; |
382 * If not supplied by the user default values are used. |
373 |
383 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
|
384 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
|
385 */ |
|
386 void events(QtMobility::QContactGeolocation location,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; |
|
387 |
374 /** |
388 /** |
375 * Gets list of venues of a particular location asynchronously. |
389 * Gets list of venues of a particular location asynchronously. |
376 * venuesAvailable() signal is emitted with SmfVenueList once its arrived. |
390 * venuesAvailable() signal is emitted with SmfVenueList once its arrived. |
377 */ |
391 * When the list is big user can specify the page number and per page item data. |
378 virtual void venues(QtMobility::QContactGeolocation location) = 0; // basic list of venue objects |
392 * If not supplied by the user default values are used. |
379 |
393 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
|
394 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
|
395 */ |
|
396 void venues(QtMobility::QContactGeolocation location,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; // basic list of venue objects |
|
397 |
380 /** |
398 /** |
381 * Gets list of events in a particular venue asynchronously. |
399 * Gets list of events in a particular venue asynchronously. |
382 * eventsAvailable() signal is emitted with SmfEventsList once its arrived |
400 * eventsAvailable() signal is emitted with SmfEventsList once its arrived. |
383 */ |
401 * When the list is big user can specify the page number and per page item data. |
384 virtual void events(SmfVenue venue) = 0; // basic list of events objects |
402 * If not supplied by the user default values are used. |
385 |
403 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
|
404 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
|
405 */ |
|
406 void events(SmfVenue venue,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; // basic list of events objects |
|
407 |
386 |
408 |
387 //APIs to get/set base provider info (SmfProvider) |
409 //APIs to get/set base provider info (SmfProvider) |
388 |
410 |
389 /** |
411 /** |
390 * Gets the base provider info |
412 * Gets the base provider info |
391 */ |
413 */ |
392 virtual SmfProvider* getProvider() = 0; |
414 SmfProvider* getProvider() ; |
393 |
415 |
394 /** |
|
395 * Sets the base provider info |
|
396 */ |
|
397 virtual void setProvider(SmfProvider* provider) = 0; |
|
398 |
416 |
399 public slots: |
417 public slots: |
400 |
418 |
401 /** |
419 /** |
402 * Updates events. Might not be supported by all service provider. |
420 * Updates events. Might not be supported by all service provider. |
403 * eventsUpdated() signal can be checked for success value. |
421 * eventsUpdated() signal can be checked for success value. |
404 * @param SmfEventsList List of events to be posted |
422 * @param SmfEventsList List of events to be posted |
405 */ |
423 */ |
406 virtual void postEvents(SmfEventsList events); |
424 void postEvents(SmfEventsList events); |
407 |
425 |
408 signals: |
426 signals: |
409 |
427 |
410 /** |
428 /** |
411 * Notification of the success of request to post an event |
429 * Notification of the success of request to post an event |
412 */ |
430 */ |
413 void eventsUpdated(bool success); |
431 void eventsUpdated(bool success); |
414 |
432 |
415 /** |
433 /** |
416 * Notification on arrival of event lists |
434 * Notification on arrival of event lists |
417 * Note if number of list is large, then it can download the list page by page. |
435 * Note if number of list is large, then it can download the list page by page. |
418 * In that case this signal is emitted multiple times. |
436 * In that case this signal is emitted multiple times. |
419 */ |
437 * @param resultPage Page number info |
420 void eventsAvailable(SmfEventsList* list, QString error, int pageNumber=0); |
438 */ |
421 |
439 void eventsAvailable(SmfEventsList* list, QString error, SmfResultPage resultPage); |
|
440 |
422 /** |
441 /** |
423 * Notification on arrival of venues lists |
442 * Notification on arrival of venues lists |
424 * Note if number of list is large, then it can download the list page by page. |
443 * Note if number of list is large, then it can download the list page by page. |
425 * In that case this signal is emitted multiple times. |
444 * In that case this signal is emitted multiple times. |
426 */ |
445 * @param resultPage Page number info |
427 void venuesAvailable(SmfVenueList* list, QString error, int pageNumber=0); |
446 */ |
|
447 void venuesAvailable(SmfVenueList* list, QString error, SmfResultPage resultPage); |
428 private: |
448 private: |
429 SmfProvider* m_baseProvider; |
449 SmfProvider* m_baseProvider; |
430 }; |
450 }; |
431 SMF_GETSERVICES(SmfMusicEvents, "org.symbian.smf.client.music.events\0.2") |
451 SMF_SERVICE_NAME(SmfMusicEvents, "org.symbian.smf.client.music.events\0.2") |
432 |
452 |
433 |
453 |
434 /** |
454 /** |
435 * provides service ("org.symbian.smf.client.music.lyrics") |
455 * provides service ("org.symbian.smf.client.music.lyrics") |
436 */ |
456 */ |
447 |
467 |
448 SmfLyricsService(SmfProvider* baseProvider = 0); |
468 SmfLyricsService(SmfProvider* baseProvider = 0); |
449 ~SmfLyricsService(); |
469 ~SmfLyricsService(); |
450 |
470 |
451 public: |
471 public: |
452 |
472 |
453 /** |
473 /** |
454 * Get the lyrics lists asynchrnously, it fetches texts without time info. |
474 * Get the lyrics lists asynchrnously, it fetches texts without time info. |
455 * lyricsAvailable() notification comes SmfLyricsList with when the data is available |
475 * lyricsAvailable() notification comes SmfLyricsList with when the data is available |
456 * @param track Track for which lyrics needs to be fetched. |
476 * @param track Track for which lyrics needs to be fetched. |
457 */ |
477 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
458 virtual void lyrics(SmfTrackInfo track) = 0; |
478 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
459 |
479 */ |
|
480 void lyrics(SmfTrackInfo track,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; |
|
481 |
460 /** |
482 /** |
461 * Get the lyrics lists asynchrnously, it fetches texts with time info. |
483 * Get the lyrics lists asynchrnously, it fetches texts with time info. |
462 * Subtitle search filter can be applied |
484 * Subtitle search filter can be applied |
463 * subtitleAvailable() notification comes SmfSubtitleList with when the data is available |
485 * subtitleAvailable() notification comes SmfSubtitleList with when the data is available |
464 * @param track Track for which subtitle needs to be fetched. |
486 * @param track Track for which subtitle needs to be fetched. |
465 * @param filter Subtitle search filter |
487 * @param filter Subtitle search filter |
466 */ |
488 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query. |
467 virtual void subtitles(SmfTrackInfo track, SmfSubtitleSearchFilter filter) = 0; // texts with time information |
489 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE |
|
490 */ |
|
491 void subtitles(SmfTrackInfo track, SmfSubtitleSearchFilter filter,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE) ; // texts with time information |
468 //APIs to get/set base provider info (SmfProvider) |
492 //APIs to get/set base provider info (SmfProvider) |
469 |
493 |
470 /** |
494 /** |
471 * Gets the base provider info |
495 * Gets the base provider info |
472 */ |
496 */ |
473 virtual SmfProvider* getProvider() = 0; |
497 SmfProvider* getProvider() ; |
474 |
498 |
475 /** |
|
476 * Sets the base provider info |
|
477 */ |
|
478 virtual void setProvider(SmfProvider* provider) = 0; |
|
479 |
499 |
480 public slots: |
500 public slots: |
481 |
501 |
482 |
502 |
483 signals: |
503 signals: |
484 |
504 |
485 /** |
505 /** |
486 * Notification on arrival of lyrics |
506 * Notification on arrival of lyrics |
487 * Note if the list is large, then it can download the list page by page. |
507 * Note if the list is large, then it can download the list page by page. |
488 * In that case this signal is emitted multiple times. |
508 * In that case this signal is emitted multiple times. |
489 */ |
509 * @param resultPage Page number info |
490 void lyricsAvailable(SmfLyricsList* list, QString error, int pageNumber=0); |
510 */ |
|
511 void lyricsAvailable(SmfLyricsList* list, QString error, SmfResultPage resultPage); |
491 |
512 |
492 /** |
513 /** |
493 * Notification on arrival of subtitle based on filter. |
514 * Notification on arrival of subtitle based on filter. |
494 * Note if the list is large, then it can download the list page by page. |
515 * Note if the list is large, then it can download the list page by page. |
495 * In that case this signal is emitted multiple times. |
516 * In that case this signal is emitted multiple times. |
496 */ |
517 * @param resultPage Page number info |
497 void subtitleAvailable(SmfSubtitleList* list, QString error, int pageNumber=0); |
518 */ |
|
519 void subtitleAvailable(SmfSubtitleList* list, QString error, SmfResultPage resultPage); |
498 private: |
520 private: |
499 SmfProvider* m_baseProvider; |
521 SmfProvider* m_baseProvider; |
500 }; |
522 }; |
501 SMF_GETSERVICES(SmfLyricsService, "org.symbian.smf.client.music.lyrics\0.2") |
523 SMF_SERVICE_NAME(SmfLyricsService, "org.symbian.smf.client.music.lyrics\0.2") |
502 |
524 |
503 #endif // SMFMUSIC_H |
525 #endif // SMFMUSIC_H |
504 |
526 |