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