|
1 /** |
|
2 * @file smfmusicserviceplugin.h |
|
3 * @author Nalina Hariharan, Sasken Communication Technologies Ltd - Initial contribution |
|
4 * @version 1.0 |
|
5 * |
|
6 * @section LICENSE |
|
7 * |
|
8 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
|
9 * All rights reserved. |
|
10 * This component and the accompanying materials are made available |
|
11 * under the terms of the "{License}" |
|
12 * which accompanies this distribution, and is available |
|
13 * at the URL "{LicenseUrl}". |
|
14 * |
|
15 * @section DESCRIPTION |
|
16 * |
|
17 * Interface specification for music services |
|
18 */ |
|
19 |
|
20 #ifndef SMFMUSICSERVICEPLUGIN_H_ |
|
21 #define SMFMUSICSERVICEPLUGIN_H_ |
|
22 |
|
23 #include <smfproviderbase.h> |
|
24 #include <smfmusicprofile.h> |
|
25 #include <smfvenue.h> |
|
26 |
|
27 /** |
|
28 * Interface specification for music services. This class provides basic |
|
29 * functionality to allow application to search for a user or check for |
|
30 * user information etc. |
|
31 * |
|
32 * All of the functionality described here should be implemented by a service |
|
33 * specific plug-in. |
|
34 */ |
|
35 class SmfMusicServicePlugin : public QObject |
|
36 { |
|
37 Q_OBJECT |
|
38 public: |
|
39 /** |
|
40 * Constructor with default argument |
|
41 * @param aParent The parent object |
|
42 */ |
|
43 SmfMusicServicePlugin( QObject *aParent = 0 ); |
|
44 |
|
45 /** |
|
46 * Destructor |
|
47 */ |
|
48 ~SmfMusicServicePlugin( ); |
|
49 |
|
50 /** |
|
51 * Method to get the provider information |
|
52 * @return Instance of SmfProviderBase |
|
53 */ |
|
54 virtual SmfProviderBase* getProviderInfo( ) = 0; |
|
55 |
|
56 /** |
|
57 * Method to get self profile information |
|
58 * @param aRequest [out] The request data to be sent to network |
|
59 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
60 */ |
|
61 virtual SmfPluginError userInfo( SmfPluginRequestData *aRequest ) = 0; |
|
62 |
|
63 /** |
|
64 * Method to search information about other service users for a |
|
65 * particular venue |
|
66 * @param aVenue The venue which is the search criteria |
|
67 * @param aRequest [out] The request data to be sent to network |
|
68 * @param aPageNum The page to be extracted |
|
69 * @param aItemsPerPage Number of items per page |
|
70 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
71 */ |
|
72 virtual SmfPluginError searchUser( const SmfVenue aVenue, |
|
73 SmfPluginRequestData *aRequest, |
|
74 const int aPageNum = 0, |
|
75 const int aItemsPerPage = 10) = 0; |
|
76 |
|
77 |
|
78 /** |
|
79 * Method to get the result for a network request. |
|
80 * @param aTransportResult The result of transport operation |
|
81 * @param aReply The QNetworkReply instance for the request |
|
82 * @param aResult [out] An output parameter to the plugin manager.If the |
|
83 * return value is SmfSendRequestAgain, QVariant will be of type |
|
84 * SmfPluginRequestData. |
|
85 * If last operation was userInfo(), aResult will be of type SmfMusicProfile |
|
86 * If last operation was searchUser(), aResult will be of type |
|
87 * QList<SmfMusicProfile> |
|
88 * @param aRetType [out] SmfPluginRetType |
|
89 * @param aIsLastPage [out] true if this the last page, else false |
|
90 * @return SmfPluginError |
|
91 */ |
|
92 virtual SmfPluginError responseAvailable( |
|
93 const SmfTransportResult aTransportResult, |
|
94 QNetworkReply *aReply, |
|
95 QVariant* aResult, |
|
96 SmfPluginRetType aRetType, |
|
97 bool aIsLastPage) = 0; |
|
98 |
|
99 }; |
|
100 |
|
101 Q_DECLARE_INTERFACE( SmfMusicServicePlugin, "org.symbian.smf.plugin.music.service/v1.0" ); |
|
102 |
|
103 #endif /* SMFMUSICSERVICEPLUGIN_H_ */ |