smf/inc/smfplugins/smfcontacts/smfcontactfetcherplugin.h
changeset 3 0446eb7b28aa
child 5 edb9dc8273d9
equal deleted inserted replaced
2:86af6c333601 3:0446eb7b28aa
       
     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 SmfPluginManagerUtil;
       
    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 	Q_OBJECT
       
    44 public:
       
    45 	/**
       
    46 	 * Constructor with default argument
       
    47 	 * @param aUtil The SmfPluginManagerUtil instance. The plugins can 
       
    48 	 * call the method getAuthKeys() of this class, with its pluginID to 
       
    49 	 * get the OAuth keys, keys are returned only if this plugin is 
       
    50 	 * authorised by Smf franework
       
    51 	 */
       
    52 	SmfContactFetcherPlugin( SmfPluginManagerUtil* aUtil );
       
    53 	
       
    54 	/**
       
    55 	 * Destructor
       
    56 	 */
       
    57 	~SmfContactFetcherPlugin( );
       
    58 	
       
    59 	/**
       
    60 	 * Method to get the list of friends
       
    61 	 * @param aRequest [out] The request data to be sent to network
       
    62 	 * @param aPageNum The page to be extracted
       
    63 	 * @param aItemsPerPage Number of items per page
       
    64 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    65 	 */
       
    66 	virtual SmfPluginError friends( SmfPluginRequestData &aRequest,
       
    67 			const int aPageNum = SMF_FIRST_PAGE, 
       
    68 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    69 	
       
    70 	/**
       
    71 	 * Method to get the list of followers
       
    72 	 * @param aRequest [out] The request data to be sent to network
       
    73 	 * @param aPageNum The page to be extracted
       
    74 	 * @param aItemsPerPage Number of items per page
       
    75 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    76 	 */
       
    77 	virtual SmfPluginError followers( SmfPluginRequestData &aRequest,
       
    78 			const int aPageNum = SMF_FIRST_PAGE, 
       
    79 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    80 	
       
    81 	/**
       
    82 	 * Method to search for a contact
       
    83 	 * @param aRequest [out] The request data to be sent to network
       
    84 	 * @param aContact contact to be searched
       
    85 	 * @param aPageNum The page to be extracted
       
    86 	 * @param aItemsPerPage Number of items per page
       
    87 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    88 	 */
       
    89 	virtual SmfPluginError search( SmfPluginRequestData &aRequest,
       
    90 			const SmfContact &aContact,
       
    91 			const int aPageNum = SMF_FIRST_PAGE, 
       
    92 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    93 	
       
    94 	/**
       
    95 	 * Method to search for contacts (friends) who are near the user.
       
    96 	 * Proximity defines accuracy level
       
    97 	 * @param aRequest [out] The request data to be sent to network
       
    98 	 * @param aLocation The location search criteria
       
    99 	 * @param aProximity location search boundary
       
   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 searchNear( SmfPluginRequestData &aRequest,
       
   105 			const SmfPlace &aLocation,
       
   106 			const SmfLocationSearchBoundary &aProximity,
       
   107 			const int aPageNum = SMF_FIRST_PAGE, 
       
   108 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
   109 	
       
   110 	/**
       
   111 	 * Method to get the list of groups
       
   112 	 * @param aRequest [out] The request data to be sent to network
       
   113 	 * @param aPageNum The page to be extracted
       
   114 	 * @param aItemsPerPage Number of items per page
       
   115 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
   116 	 */
       
   117 	virtual SmfPluginError groups( SmfPluginRequestData &aRequest,
       
   118 			const int aPageNum = SMF_FIRST_PAGE, 
       
   119 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
   120 	
       
   121 	/**
       
   122 	 * Method to search for a contact in a group
       
   123 	 * @param aRequest [out] The request data to be sent to network
       
   124 	 * @param aGroup the group in which to search
       
   125 	 * @param aPageNum The page to be extracted
       
   126 	 * @param aItemsPerPage Number of items per page
       
   127 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
   128 	 */
       
   129 	virtual SmfPluginError searchInGroup( SmfPluginRequestData &aRequest,
       
   130 			const SmfGroup &aGroup,
       
   131 			const int aPageNum = SMF_FIRST_PAGE, 
       
   132 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
   133 	
       
   134 	};
       
   135 
       
   136 Q_DECLARE_INTERFACE( SmfContactFetcherPlugin, "org.symbian.smf.plugin.contact.fetcher/v1.0" );
       
   137 
       
   138 #endif /* SMFCONTACTFETCHERPLUGIN_H_ */