18
|
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 |
* Music related services
|
|
17 |
*/
|
|
18 |
|
|
19 |
#include <smfmusicrating.h>
|
|
20 |
#include <smfcomment.h>
|
|
21 |
#include <smfmusicfingerprint.h>
|
25
|
22 |
#include <smfcontact.h>
|
18
|
23 |
|
|
24 |
#include "smfmusic.h"
|
|
25 |
#include "smfmusic_p.h"
|
|
26 |
|
|
27 |
|
|
28 |
//SmfMusicService start
|
|
29 |
SmfMusicService::SmfMusicService(SmfProvider *baseProvider)
|
|
30 |
: m_baseProvider(baseProvider)
|
|
31 |
{
|
|
32 |
m_private = new SmfMusicServicePrivate(this);
|
|
33 |
}
|
|
34 |
|
|
35 |
SmfMusicService::~SmfMusicService()
|
|
36 |
{
|
|
37 |
if(m_private)
|
|
38 |
{
|
|
39 |
delete m_private;
|
|
40 |
m_private = NULL;
|
|
41 |
}
|
|
42 |
}
|
|
43 |
|
25
|
44 |
SmfError SmfMusicService::userMusicInfo()
|
18
|
45 |
{
|
25
|
46 |
return m_private->userMusicInfo();
|
|
47 |
}
|
|
48 |
|
|
49 |
SmfError SmfMusicService::searchArtist ( SmfArtists artist, int pageNum, int perPage)
|
|
50 |
{
|
|
51 |
return m_private->searchArtist(artist,pageNum,perPage);
|
18
|
52 |
}
|
|
53 |
|
25
|
54 |
SmfError SmfMusicService::searchAlbum ( SmfAlbum album, int pageNum, int perPage)
|
|
55 |
{
|
|
56 |
return m_private->searchAlbum(album,pageNum,perPage);
|
|
57 |
}
|
|
58 |
|
|
59 |
SmfError SmfMusicService::searchEvents ( SmfEvent event, int pageNum, int perPage)
|
18
|
60 |
{
|
25
|
61 |
return m_private->searchEvents(event,pageNum,perPage);
|
|
62 |
}
|
|
63 |
|
|
64 |
SmfError SmfMusicService::searchVenue ( SmfLocation location, int pageNum, int perPage)
|
|
65 |
{
|
|
66 |
return m_private->searchVenue(location,pageNum,perPage);
|
18
|
67 |
}
|
|
68 |
|
25
|
69 |
SmfError SmfMusicService::searchUser(SmfLocation venue, int pageNum, int perPage)
|
18
|
70 |
{
|
25
|
71 |
return m_private->searchUser(venue,pageNum,perPage);
|
|
72 |
}
|
|
73 |
|
|
74 |
SmfError SmfMusicService::customRequest(const int& operationId,QByteArray* customData)
|
|
75 |
{
|
|
76 |
return m_private->customRequest(operationId, customData);
|
18
|
77 |
}
|
|
78 |
|
25
|
79 |
SmfError SmfMusicService::postCurrentPlaying(SmfTrackInfo track)
|
18
|
80 |
{
|
25
|
81 |
return m_private->postCurrentPlaying(track);
|
18
|
82 |
}
|
|
83 |
|
25
|
84 |
SmfError SmfMusicService::postRating(SmfTrackInfo track, SmfMusicRating rate)
|
18
|
85 |
{
|
25
|
86 |
return m_private->postRating(track,rate);
|
18
|
87 |
}
|
|
88 |
|
25
|
89 |
SmfError SmfMusicService::postComments(SmfTrackInfo track, SmfComment comment)
|
18
|
90 |
{
|
25
|
91 |
return m_private->postComments(track,comment);
|
|
92 |
}
|
|
93 |
|
|
94 |
SmfError SmfMusicService::cancelRequest()
|
|
95 |
{
|
|
96 |
return m_private->cancelRequest();
|
18
|
97 |
}
|
|
98 |
|
|
99 |
SmfProvider* SmfMusicService::getProvider() const
|
|
100 |
{
|
|
101 |
return m_baseProvider;
|
|
102 |
}
|
|
103 |
//SmfMusicService end
|
|
104 |
|
|
105 |
|
|
106 |
//SmfMusicSearch start
|
|
107 |
SmfMusicSearch::SmfMusicSearch(SmfProvider *baseProvider)
|
|
108 |
:m_baseProvider(baseProvider)
|
|
109 |
{
|
|
110 |
m_private = new SmfMusicSearchPrivate(this);
|
|
111 |
}
|
|
112 |
|
|
113 |
SmfMusicSearch::~SmfMusicSearch()
|
|
114 |
{
|
|
115 |
if(m_private)
|
|
116 |
{
|
|
117 |
delete m_private;
|
|
118 |
m_private = NULL;
|
|
119 |
}
|
|
120 |
}
|
|
121 |
|
25
|
122 |
SmfError SmfMusicSearch::recommendations(SmfTrackInfo track, int pageNum, int perPage)
|
18
|
123 |
{
|
25
|
124 |
return m_private->recommendations(track,pageNum,perPage);
|
18
|
125 |
}
|
|
126 |
|
25
|
127 |
SmfError SmfMusicSearch::tracksSimilar ( SmfTrackInfo track, int pageNum, int perPage)
|
18
|
128 |
{
|
25
|
129 |
return m_private->tracksSimilar(track,pageNum,perPage);
|
|
130 |
}
|
|
131 |
|
|
132 |
SmfError SmfMusicSearch::tracksOfAlbum ( SmfAlbum album, int pageNum, int perPage )
|
|
133 |
{
|
|
134 |
return m_private->tracksOfAlbum(album,pageNum,perPage);
|
18
|
135 |
}
|
|
136 |
|
25
|
137 |
SmfError SmfMusicSearch::tracksOfArtist ( SmfArtists artists, int pageNum, int perPage )
|
18
|
138 |
{
|
25
|
139 |
return m_private->tracksOfArtist(artists,pageNum,perPage);
|
|
140 |
}
|
|
141 |
|
|
142 |
SmfError SmfMusicSearch::trackInfo(SmfMusicFingerPrint signature, int pageNum, int perPage)
|
|
143 |
{
|
|
144 |
return m_private->trackInfo(signature,pageNum,perPage);
|
18
|
145 |
}
|
|
146 |
|
25
|
147 |
SmfError SmfMusicSearch::stores(SmfTrackInfo track, int pageNum, int perPage)
|
18
|
148 |
{
|
25
|
149 |
return m_private->stores(track,pageNum,perPage);
|
18
|
150 |
}
|
|
151 |
|
25
|
152 |
SmfError SmfMusicSearch::customRequest(const int& operationId,QByteArray* customData)
|
18
|
153 |
{
|
25
|
154 |
return m_private->customRequest(operationId, customData);
|
|
155 |
}
|
|
156 |
|
|
157 |
SmfError SmfMusicSearch::cancelRequest()
|
|
158 |
{
|
|
159 |
return m_private->cancelRequest();
|
18
|
160 |
}
|
|
161 |
|
|
162 |
SmfProvider* SmfMusicSearch::getProvider() const
|
|
163 |
{
|
|
164 |
return m_baseProvider;
|
|
165 |
}
|
|
166 |
//SmfMusicSearch end
|
|
167 |
|
|
168 |
|
|
169 |
//SmfPlaylistService start
|
|
170 |
SmfPlaylistService::SmfPlaylistService(SmfProvider *baseProvider)
|
|
171 |
: m_baseProvider(baseProvider)
|
|
172 |
{
|
|
173 |
m_private = new SmfPlaylistServicePrivate(this);
|
|
174 |
}
|
|
175 |
|
|
176 |
SmfPlaylistService::~SmfPlaylistService()
|
|
177 |
{
|
|
178 |
if(m_private)
|
|
179 |
{
|
|
180 |
delete m_private;
|
|
181 |
m_private = NULL;
|
|
182 |
}
|
|
183 |
}
|
|
184 |
|
25
|
185 |
SmfError SmfPlaylistService::playlists(int pageNum, int perPage)
|
18
|
186 |
{
|
25
|
187 |
return m_private->playlists(pageNum,perPage);
|
18
|
188 |
}
|
|
189 |
|
25
|
190 |
SmfError SmfPlaylistService::playlistsOf(SmfContact *user, int pageNum, int perPage)
|
18
|
191 |
{
|
25
|
192 |
return m_private->playlistsOf(user,pageNum,perPage);
|
18
|
193 |
}
|
|
194 |
|
25
|
195 |
SmfError SmfPlaylistService::addToPlaylist(SmfPlaylist plst, SmfTrackInfoList *tracks)
|
18
|
196 |
{
|
|
197 |
return m_private->addToPlaylist(plst,tracks);
|
|
198 |
}
|
|
199 |
|
25
|
200 |
SmfError SmfPlaylistService::postCurrentPlayingPlaylist(SmfPlaylist plst)
|
18
|
201 |
{
|
|
202 |
return m_private->postCurrentPlayingPlaylist(plst);
|
|
203 |
}
|
|
204 |
|
25
|
205 |
SmfError SmfPlaylistService::customRequest(const int& operationId,QByteArray* customData)
|
18
|
206 |
{
|
25
|
207 |
return m_private->customRequest(operationId, customData);
|
|
208 |
}
|
|
209 |
|
|
210 |
SmfError SmfPlaylistService::cancelRequest()
|
|
211 |
{
|
|
212 |
return m_private->cancelRequest();
|
18
|
213 |
}
|
|
214 |
|
|
215 |
SmfProvider* SmfPlaylistService::getProvider() const
|
|
216 |
{
|
|
217 |
return m_baseProvider;
|
|
218 |
}
|
|
219 |
//SmfPlaylistService end
|
|
220 |
|
|
221 |
|
|
222 |
//SmfLyricsService start
|
|
223 |
SmfLyricsService::SmfLyricsService(SmfProvider *baseProvider)
|
|
224 |
:m_baseProvider(baseProvider)
|
|
225 |
{
|
|
226 |
m_private = new SmfLyricsServicePrivate(this);
|
|
227 |
}
|
|
228 |
|
|
229 |
SmfLyricsService::~SmfLyricsService()
|
|
230 |
{
|
|
231 |
if(m_private)
|
|
232 |
{
|
|
233 |
delete m_private;
|
|
234 |
m_private = NULL;
|
|
235 |
}
|
|
236 |
}
|
|
237 |
|
25
|
238 |
SmfError SmfLyricsService::lyrics(SmfTrackInfo track, int pageNum, int perPage)
|
18
|
239 |
{
|
25
|
240 |
return m_private->lyrics(track,pageNum,perPage);
|
18
|
241 |
}
|
|
242 |
|
25
|
243 |
SmfError SmfLyricsService::subtitles(SmfTrackInfo track, SmfSubtitleSearchFilter filter, int pageNum, int perPage)
|
18
|
244 |
{
|
25
|
245 |
return m_private->subtitles(track,filter,pageNum,perPage);
|
18
|
246 |
}
|
|
247 |
|
25
|
248 |
SmfError SmfLyricsService::customRequest(const int& operationId,QByteArray* customData)
|
18
|
249 |
{
|
25
|
250 |
return m_private->customRequest(operationId, customData);
|
|
251 |
}
|
|
252 |
|
|
253 |
SmfError SmfLyricsService::cancelRequest()
|
|
254 |
{
|
|
255 |
return m_private->cancelRequest();
|
18
|
256 |
}
|
|
257 |
|
|
258 |
SmfProvider* SmfLyricsService::getProvider() const
|
|
259 |
{
|
|
260 |
return m_baseProvider;
|
|
261 |
}
|
|
262 |
//SmfLyricsService end
|