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