|
1 /** |
|
2 * @file smfmusiceventsplugin.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 events |
|
18 * |
|
19 * Note: This class has dependencies on QtMobility project |
|
20 */ |
|
21 |
|
22 #ifndef SMFMUSICEVENTSPLUGIN_H_ |
|
23 #define SMFMUSICEVENTSPLUGIN_H_ |
|
24 |
|
25 #include <smfproviderbase.h> |
|
26 #include <qtcontacts.h> |
|
27 #include <smfevent.h> |
|
28 #include <smfvenue.h> |
|
29 |
|
30 using namespace QtMobility; |
|
31 |
|
32 /** |
|
33 * Interface specification for music events |
|
34 * |
|
35 * All of the functionality described here should be implemented by a service |
|
36 * specific plug-in. |
|
37 * |
|
38 * Note: This class has dependencies on QtMobility project |
|
39 */ |
|
40 class SmfMusicEventsPlugin : public QObject |
|
41 { |
|
42 Q_OBJECT |
|
43 public: |
|
44 /** |
|
45 * Constructor with default argument |
|
46 * @param aParent The parent object |
|
47 */ |
|
48 SmfMusicEventsPlugin( QObject* aParent = 0 ); |
|
49 |
|
50 /** |
|
51 * Destructor |
|
52 */ |
|
53 ~SmfMusicEventsPlugin( ); |
|
54 |
|
55 /** |
|
56 * Method to get the provider information |
|
57 * @return Instance of SmfProviderBase |
|
58 */ |
|
59 virtual SmfProviderBase* getProviderInfo( ) = 0; |
|
60 |
|
61 /** |
|
62 * Method to get the events based on location |
|
63 * @param aLocation Location of the event |
|
64 * @param aRequest [out] The request data to be sent to network |
|
65 * @param aPageNum The page to be extracted |
|
66 * @param aItemsPerPage Number of items per page |
|
67 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
68 */ |
|
69 virtual SmfPluginError events( const QtMobility::QContactGeolocation aLocation, |
|
70 SmfPluginRequestData *aRequest, |
|
71 const int aPageNum = 0, |
|
72 const int aItemsPerPage = 10 ) = 0; |
|
73 |
|
74 /** |
|
75 * Method to get the venues based on location |
|
76 * @param aLocation Location of the venue |
|
77 * @param aRequest [out] The request data to be sent to network |
|
78 * @param aPageNum The page to be extracted |
|
79 * @param aItemsPerPage Number of items per page |
|
80 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
81 */ |
|
82 virtual SmfPluginError venues( const QtMobility::QContactGeolocation aLocation, |
|
83 SmfPluginRequestData *aRequest, |
|
84 const int aPageNum = 0, |
|
85 const int aItemsPerPage = 10 ) = 0; |
|
86 |
|
87 /** |
|
88 * Method to get the events based on venues |
|
89 * @param aVenue Venue of the event |
|
90 * @param aRequest [out] The request data to be sent to network |
|
91 * @param aPageNum The page to be extracted |
|
92 * @param aItemsPerPage Number of items per page |
|
93 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
94 */ |
|
95 virtual SmfPluginError events( const SmfVenue aVenue, |
|
96 SmfPluginRequestData *aRequest, |
|
97 const int aPageNum = 0, |
|
98 const int aItemsPerPage = 10 ) = 0; |
|
99 |
|
100 /** |
|
101 * Method to post events |
|
102 * of posting the events is available |
|
103 * @param aEventList The list of events to be posted |
|
104 * @param aRequest [out] The request data to be sent to network |
|
105 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
106 */ |
|
107 virtual SmfPluginError postEvents( const QList<SmfEvent> aEventList, |
|
108 SmfPluginRequestData *aRequest ) = 0; |
|
109 |
|
110 |
|
111 /** |
|
112 * Method to get the result for a network request. |
|
113 * @param aTransportResult The result of transport operation |
|
114 * @param aReply The QNetworkReply instance for the request |
|
115 * @param aResult [out] An output parameter to the plugin manager.If the |
|
116 * return value is SmfSendRequestAgain, QVariant will be of type |
|
117 * SmfPluginRequestData. |
|
118 * If last operation was events(), aResult will be of type QList<SmfEvent> |
|
119 * If last operation was venues(), aResult will be of type QList<SmfVenue> |
|
120 * If last operation was postEvents(), aResult will be of type bool |
|
121 * @param aRetType [out] SmfPluginRetType |
|
122 * @param aIsLastPage [out] true if this the last page, else false |
|
123 * @return SmfPluginError |
|
124 */ |
|
125 virtual SmfPluginError responseAvailable( |
|
126 const SmfTransportResult aTransportResult, |
|
127 QNetworkReply *aReply, |
|
128 QVariant* aResult, |
|
129 SmfPluginRetType aRetType, |
|
130 bool aIsLastPage) = 0; |
|
131 |
|
132 }; |
|
133 |
|
134 Q_DECLARE_INTERFACE( SmfMusicEventsPlugin, "org.symbian.smf.plugin.music.events/v1.0" ); |
|
135 |
|
136 #endif /* SMFMUSICEVENTSPLUGIN_H_ */ |