|
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 fetching contacts |
|
17 * |
|
18 */ |
|
19 |
|
20 #ifndef SMFCONTACTFETCHERPLUGIN_H_ |
|
21 #define SMFCONTACTFETCHERPLUGIN_H_ |
|
22 |
|
23 #include <smfpluginbase.h> |
|
24 #include <smfcontact.h> |
|
25 #include <smfgroup.h> |
|
26 #include <smflocation.h> |
|
27 |
|
28 |
|
29 /** |
|
30 * @ingroup smf_plugin_group |
|
31 * Interface specification for fetching contacts. This class provides |
|
32 * basic functionality to allow applications to obtain list of |
|
33 * friends, followers, groups of a user in a social networking service. |
|
34 * |
|
35 * All of the functionality described here should be implemented by a service |
|
36 * specific plug-in. |
|
37 */ |
|
38 class SmfContactFetcherPlugin : public SmfPluginBase |
|
39 { |
|
40 public: |
|
41 /** |
|
42 * Destructor |
|
43 */ |
|
44 virtual ~SmfContactFetcherPlugin( ) {} |
|
45 |
|
46 /** |
|
47 * Method to get the list of friends |
|
48 * @param aRequest [out] The request data to be sent to network |
|
49 * @param aPageNum The page to be extracted |
|
50 * @param aItemsPerPage Number of items per page |
|
51 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
52 */ |
|
53 virtual SmfPluginError friends( SmfPluginRequestData &aRequest, |
|
54 const int aPageNum = SMF_FIRST_PAGE, |
|
55 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
56 |
|
57 /** |
|
58 * Method to get the list of followers |
|
59 * @param aRequest [out] The request data to be sent to network |
|
60 * @param aPageNum The page to be extracted |
|
61 * @param aItemsPerPage Number of items per page |
|
62 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
63 */ |
|
64 virtual SmfPluginError followers( SmfPluginRequestData &aRequest, |
|
65 const int aPageNum = SMF_FIRST_PAGE, |
|
66 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
67 |
|
68 /** |
|
69 * Method to search for a contact |
|
70 * @param aRequest [out] The request data to be sent to network |
|
71 * @param aContact contact to be searched |
|
72 * @param aPageNum The page to be extracted |
|
73 * @param aItemsPerPage Number of items per page |
|
74 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
75 */ |
|
76 virtual SmfPluginError search( SmfPluginRequestData &aRequest, |
|
77 const SmfContact &aContact, |
|
78 const int aPageNum = SMF_FIRST_PAGE, |
|
79 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
80 |
|
81 /** |
|
82 * Method to search for contacts (friends) who are near the user. |
|
83 * Proximity defines accuracy level |
|
84 * @param aRequest [out] The request data to be sent to network |
|
85 * @param aLocation The location search criteria |
|
86 * @param aProximity location search boundary |
|
87 * @param aPageNum The page to be extracted |
|
88 * @param aItemsPerPage Number of items per page |
|
89 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
90 */ |
|
91 virtual SmfPluginError searchNear( SmfPluginRequestData &aRequest, |
|
92 const SmfLocation &aLocation, |
|
93 const SmfLocationSearchBoundary &aProximity, |
|
94 const int aPageNum = SMF_FIRST_PAGE, |
|
95 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
96 |
|
97 /** |
|
98 * Method to get the list of groups |
|
99 * @param aRequest [out] The request data to be sent to network |
|
100 * @param aPageNum The page to be extracted |
|
101 * @param aItemsPerPage Number of items per page |
|
102 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
103 */ |
|
104 virtual SmfPluginError groups( SmfPluginRequestData &aRequest, |
|
105 const int aPageNum = SMF_FIRST_PAGE, |
|
106 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
107 |
|
108 /** |
|
109 * Method to search for a contact in a group |
|
110 * @param aRequest [out] The request data to be sent to network |
|
111 * @param aGroup the group in which to search |
|
112 * @param aPageNum The page to be extracted |
|
113 * @param aItemsPerPage Number of items per page |
|
114 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
115 */ |
|
116 virtual SmfPluginError searchInGroup( SmfPluginRequestData &aRequest, |
|
117 const SmfGroup &aGroup, |
|
118 const int aPageNum = SMF_FIRST_PAGE, |
|
119 const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0; |
|
120 |
|
121 /** |
|
122 * Customised method for SmfContactFetcherPlugin interface |
|
123 * @param aRequest [out] The request data to be sent to network |
|
124 * @param aOperation The operation type (should be known between |
|
125 * the client interface and the plugin) |
|
126 * @param aData The data required to form the request (The type |
|
127 * of data should be known between client and the plugin) |
|
128 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone |
|
129 */ |
|
130 virtual SmfPluginError customRequest( SmfPluginRequestData &aRequest, |
|
131 const int &aOperation, QByteArray *aData ) = 0; |
|
132 }; |
|
133 |
|
134 Q_DECLARE_INTERFACE( SmfContactFetcherPlugin, "org.symbian.smf.plugin.contact.fetcher/v1.0" ); |
|
135 |
|
136 #endif /* SMFCONTACTFETCHERPLUGIN_H_ */ |