6 * @section LICENSE |
6 * @section LICENSE |
7 * |
7 * |
8 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
8 * Copyright (c) 2010 Sasken Communication Technologies Ltd. |
9 * All rights reserved. |
9 * All rights reserved. |
10 * This component and the accompanying materials are made available |
10 * This component and the accompanying materials are made available |
11 * under the terms of the "{License}" |
11 * under the terms of the "Eclipse Public License v1.0" |
12 * which accompanies this distribution, and is available |
12 * which accompanies this distribution, and is available |
13 * at the URL "{LicenseUrl}". |
13 * at the URL "http://www.eclipse.org/legal/epl-v10.html" |
14 * |
14 * |
15 * @section DESCRIPTION |
15 * @section DESCRIPTION |
16 * |
16 * |
17 * Interface specification for music services |
17 * Interface specification for music services |
18 */ |
18 */ |
19 |
19 |
20 #ifndef SMFMUSICSERVICEPLUGIN_H_ |
20 #ifndef SMFMUSICSERVICEPLUGIN_H_ |
21 #define SMFMUSICSERVICEPLUGIN_H_ |
21 #define SMFMUSICSERVICEPLUGIN_H_ |
22 |
22 |
23 #include <smfproviderbase.h> |
23 #include <smfpluginbase.h> |
24 #include <smfmusicprofile.h> |
24 #include <smfmusicprofile.h> |
25 #include <smfvenue.h> |
25 #include <smfplace.h> |
26 |
26 |
27 /** |
27 /** |
|
28 * @ingroup smf_plugin_group |
28 * Interface specification for music services. This class provides basic |
29 * Interface specification for music services. This class provides basic |
29 * functionality to allow application to search for a user or check for |
30 * functionality to allow application to search for a user or check for |
30 * user information etc. |
31 * user information etc. |
31 * |
32 * |
32 * All of the functionality described here should be implemented by a service |
33 * All of the functionality described here should be implemented by a service |
33 * specific plug-in. |
34 * specific plug-in. |
34 */ |
35 */ |
35 class SmfMusicServicePlugin : public QObject |
36 class SmfMusicServicePlugin : public SmfPluginBase |
36 { |
37 { |
37 Q_OBJECT |
38 Q_OBJECT |
38 public: |
39 public: |
39 /** |
40 /** |
40 * Constructor with default argument |
41 * Constructor with default argument |
46 * Destructor |
47 * Destructor |
47 */ |
48 */ |
48 ~SmfMusicServicePlugin( ); |
49 ~SmfMusicServicePlugin( ); |
49 |
50 |
50 /** |
51 /** |
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 |
52 * Method to get self profile information |
58 * @param aRequest [out] The request data to be sent to network |
53 * @param aRequest [out] The request data to be sent to network |
59 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
54 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
60 */ |
55 */ |
61 virtual SmfPluginError userInfo( SmfPluginRequestData *aRequest ) = 0; |
56 virtual SmfPluginError userInfo( SmfPluginRequestData *aRequest ) = 0; |
62 |
57 |
63 /** |
58 /** |
64 * Method to search information about other service users for a |
59 * Method to search information about other service users for a |
65 * particular venue |
60 * particular place |
66 * @param aVenue The venue which is the search criteria |
|
67 * @param aRequest [out] The request data to be sent to network |
61 * @param aRequest [out] The request data to be sent to network |
|
62 * @param aPlace The place which is the search criteria |
68 * @param aPageNum The page to be extracted |
63 * @param aPageNum The page to be extracted |
69 * @param aItemsPerPage Number of items per page |
64 * @param aItemsPerPage Number of items per page |
70 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
65 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
71 */ |
66 */ |
72 virtual SmfPluginError searchUser( const SmfVenue aVenue, |
67 virtual SmfPluginError searchUser( SmfPluginRequestData *aRequest, |
73 SmfPluginRequestData *aRequest, |
68 const SmfPlace aPlace, |
74 const int aPageNum = 0, |
69 const int aPageNum = SMF_FIRST_PAGE, |
75 const int aItemsPerPage = 10) = 0; |
70 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 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 |
71 |
99 }; |
72 }; |
100 |
73 |
101 Q_DECLARE_INTERFACE( SmfMusicServicePlugin, "org.symbian.smf.plugin.music.service/v1.0" ); |
74 Q_DECLARE_INTERFACE( SmfMusicServicePlugin, "org.symbian.smf.plugin.music.service/v1.0" ); |
102 |
75 |