|
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 * Interface specification for events |
|
17 * Note: This class has dependencies on QtMobility project |
|
18 * |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef SMFEVENTSFETCHERPLUGIN_H_ |
|
23 #define SMFEVENTSFETCHERPLUGIN_H_ |
|
24 |
|
25 #include <smfpluginbase.h> |
|
26 #include <smfevent.h> |
|
27 #include <smflocation.h> |
|
28 #include <smfcontact.h> |
|
29 |
|
30 using namespace QtMobility; |
|
31 |
|
32 /** |
|
33 * @ingroup smf_plugin_group |
|
34 * Interface specification for events |
|
35 * |
|
36 * All of the functionality described here should be implemented by a service |
|
37 * specific plug-in. |
|
38 * |
|
39 * Note: This class has dependencies on QtMobility project |
|
40 */ |
|
41 class SmfEventsFetcherPlugin : public SmfPluginBase |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Destructor |
|
47 */ |
|
48 virtual ~SmfEventsFetcherPlugin( ) {} |
|
49 |
|
50 /** |
|
51 * Method to get the events on the specified location |
|
52 * @param aRequest [out] The request data to be sent to network |
|
53 * @param aLocation [in] Location of the event |
|
54 * @param aPageNum [in] The page to be extracted |
|
55 * @param aItemsPerPage [in] Number of items per page |
|
56 * @return Appropriate value of the enum SmfPluginError. |
|
57 * Plugin error if any, else SmfPluginErrNone for success |
|
58 */ |
|
59 virtual SmfPluginError events( SmfPluginRequestData &aRequest, |
|
60 const SmfLocation &aLocation, |
|
61 const int aPageNum = SMF_FIRST_PAGE, |
|
62 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
63 |
|
64 /** |
|
65 * Method to get the venues on the specified location |
|
66 * @param aRequest [out] The request data to be sent to network |
|
67 * @param aLocation [in] Location of the venue |
|
68 * @param aPageNum [in] The page to be extracted |
|
69 * @param aItemsPerPage [in] Number of items per page |
|
70 * @return Appropriate value of the enum SmfPluginError. |
|
71 * Plugin error if any, else SmfPluginErrNone for success |
|
72 */ |
|
73 virtual SmfPluginError venues( SmfPluginRequestData &aRequest, |
|
74 const SmfLocation &aLocation, |
|
75 const int aPageNum = SMF_FIRST_PAGE, |
|
76 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
77 |
|
78 /** |
|
79 * Method to get the list of attendees for an event |
|
80 * @param aRequest [out] The request data to be sent to network |
|
81 * @param aEvent [in] The event for which attendees should be fetched |
|
82 * @param aPageNum [in] The page to be extracted |
|
83 * @param aItemsPerPage [in] Number of items per page |
|
84 * @return Appropriate value of the enum SmfPluginError. |
|
85 * Plugin error if any, else SmfPluginErrNone for success |
|
86 */ |
|
87 virtual SmfPluginError attendees( SmfPluginRequestData &aRequest, |
|
88 const SmfEvent &aEvent, |
|
89 const int aPageNum = SMF_FIRST_PAGE, |
|
90 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
91 /** |
|
92 * Method to post event(s) |
|
93 * @param aRequest [out] The request data to be sent to network |
|
94 * @param aEventList [in] The list of events to be posted |
|
95 * @return Appropriate value of the enum SmfPluginError. |
|
96 * Plugin error if any, else SmfPluginErrNone for success |
|
97 */ |
|
98 virtual SmfPluginError postEvents( SmfPluginRequestData &aRequest, |
|
99 const QList<SmfEvent> &aEventList ) = 0; |
|
100 |
|
101 /** |
|
102 * Customised method for SmfEventsFetcherPlugin interface |
|
103 * @param aRequest [out] The request data to be sent to network |
|
104 * @param aOperation [in] The operation type (should be known between |
|
105 * the client interface and the plugin) |
|
106 * @param aData [in] The data required to form the request (The type |
|
107 * of data should be known between client and the plugin) |
|
108 * @return Appropriate value of the enum SmfPluginError. |
|
109 * Plugin error if any, else SmfPluginErrNone for success |
|
110 */ |
|
111 virtual SmfPluginError customRequest( SmfPluginRequestData &aRequest, |
|
112 const int &aOperation, QByteArray *aData ) = 0; |
|
113 |
|
114 }; |
|
115 |
|
116 Q_DECLARE_INTERFACE( SmfEventsFetcherPlugin, "org.symbian.smf.plugin.events.fetcher/v0.2" ); |
|
117 |
|
118 #endif /* SMFEVENTSFETCHERPLUGIN_H_ */ |