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 playlists service |
|
17 * |
|
18 */ |
|
19 |
|
20 |
|
21 #ifndef SMFPLAYLISTSERVICEPLUGIN_H_ |
|
22 #define SMFPLAYLISTSERVICEPLUGIN_H_ |
|
23 |
|
24 #include <smfpluginbase.h> |
|
25 #include <smfplaylist.h> |
|
26 #include <smfmusicprofile.h> |
|
27 #include <smftrackinfo.h> |
|
28 |
|
29 // Forward declaration |
|
30 class SmfPluginUtil; |
|
31 |
|
32 /** |
|
33 * @ingroup smf_plugin_group |
|
34 * Interface specification for playlists service. This class provides |
|
35 * basic functionality to allow applications to get playlists of a user, |
|
36 * add some track to an existing playlist, post the current playing |
|
37 * playlists etc. |
|
38 * |
|
39 * All of the functionality described here should be implemented by a service |
|
40 * specific plug-in. |
|
41 */ |
|
42 class SmfPlaylistServicePlugin : public SmfPluginBase |
|
43 { |
|
44 public: |
|
45 /** |
|
46 * Constructor with default argument |
|
47 * @param aUtil The SmfPluginUtil 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 SmfPlaylistServicePlugin( SmfPluginUtil *aUtil ); |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 ~SmfPlaylistServicePlugin( ); |
|
58 |
|
59 /** |
|
60 * Method to get the playlist |
|
61 * @param aRequest [out] The request data to be sent to network |
|
62 * @param aPageNum The page to be extracted |
|
63 * @param aItemsPerPage Number of items per page |
|
64 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
65 */ |
|
66 virtual SmfPluginError playlists( SmfPluginRequestData &aRequest, |
|
67 const int aPageNum = SMF_FIRST_PAGE, |
|
68 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
69 |
|
70 /** |
|
71 * Method to get the playlist of a particular user |
|
72 * @param aRequest [out] The request data to be sent to network |
|
73 * @param aUser The user whose playlists need to be fetched |
|
74 * @param aPageNum The page to be extracted |
|
75 * @param aItemsPerPage Number of items per page |
|
76 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
77 */ |
|
78 virtual SmfPluginError playlistsOf( SmfPluginRequestData &aRequest, |
|
79 const SmfMusicProfile &aUser, |
|
80 const int aPageNum = SMF_FIRST_PAGE, |
|
81 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
82 |
|
83 /** |
|
84 * Method to add tracks to a playlist |
|
85 * @param aRequest [out] The request data to be sent to network |
|
86 * @param aPlaylist The playlist where tracks should be added |
|
87 * @param aTracks The tracks to be added to the playlist |
|
88 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
89 */ |
|
90 virtual SmfPluginError addToPlaylist( SmfPluginRequestData &aRequest, |
|
91 const SmfPlaylist &aPlaylist, |
|
92 const QList<SmfTrackInfo> &aTracks ) = 0; |
|
93 |
|
94 /** |
|
95 * Method to post the current playing playlist |
|
96 * @param aRequest [out] The request data to be sent to network |
|
97 * @param aPlaylist The current playing playlist which should be posted |
|
98 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
99 */ |
|
100 virtual SmfPluginError postCurrentPlayingPlaylist( |
|
101 SmfPluginRequestData &aRequest, |
|
102 const SmfPlaylist &aPlaylist ) = 0; |
|
103 |
|
104 }; |
|
105 |
|
106 Q_DECLARE_INTERFACE( SmfPlaylistServicePlugin, "org.symbian.smf.plugin.music.playlist/v1.0" ); |
|
107 |
|
108 #endif /* SMFPLAYLISTSERVICEPLUGIN_H_ */ |
|