example/clientapi/smf/inc/smfplugins/smfcontacts/smfcontactfetcherplugin.h
changeset 3 0446eb7b28aa
parent 2 86af6c333601
child 4 969092730d34
equal deleted inserted replaced
2:86af6c333601 3:0446eb7b28aa
     1 /**
       
     2  * @file	smfcontactfetcherplugin.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 "Eclipse Public License v1.0"
       
    12  * which accompanies  this distribution, and is available 
       
    13  * at the URL "http://www.eclipse.org/legal/epl-v10.html"
       
    14  * 
       
    15  * @section DESCRIPTION
       
    16  *
       
    17  * Interface specification for fetching contacts
       
    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 <smfplace.h>
       
    27 
       
    28 /**
       
    29  * @ingroup smf_plugin_group
       
    30  * Interface specification for fetching contacts. This class provides 
       
    31  * basic functionality to allow applications to obtain list of
       
    32  * friends, followers, groups of a user in a social networking service.
       
    33  *
       
    34  * All of the functionality described here should be implemented by a service
       
    35  * specific plug-in.
       
    36  */
       
    37 class SmfContactFetcherPlugin : public SmfPluginBase
       
    38 	{
       
    39 	Q_OBJECT
       
    40 public:
       
    41 	/**
       
    42 	 * Constructor with default argument
       
    43 	 * @param aParent The parent object
       
    44 	 */
       
    45 	SmfContactFetcherPlugin( QObject* aParent = 0 );
       
    46 	
       
    47 	/**
       
    48 	 * Destructor
       
    49 	 */
       
    50 	~SmfContactFetcherPlugin( );
       
    51 	
       
    52 	/**
       
    53 	 * Method to get the list of friends
       
    54 	 * @param aRequest [out] The request data to be sent to network
       
    55 	 * @param aPageNum The page to be extracted
       
    56 	 * @param aItemsPerPage Number of items per page
       
    57 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    58 	 */
       
    59 	virtual SmfPluginError friends( SmfPluginRequestData *aRequest,
       
    60 			const int aPageNum = SMF_FIRST_PAGE, 
       
    61 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    62 	
       
    63 	/**
       
    64 	 * Method to get the list of followers
       
    65 	 * @param aRequest [out] The request data to be sent to network
       
    66 	 * @param aPageNum The page to be extracted
       
    67 	 * @param aItemsPerPage Number of items per page
       
    68 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    69 	 */
       
    70 	virtual SmfPluginError followers( SmfPluginRequestData *aRequest,
       
    71 			const int aPageNum = SMF_FIRST_PAGE, 
       
    72 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    73 	
       
    74 	/**
       
    75 	 * Method to search for a contact
       
    76 	 * @param aRequest [out] The request data to be sent to network
       
    77 	 * @param aContact contact to be searched
       
    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 search( SmfPluginRequestData *aRequest,
       
    83 			const SmfContact *aContact,
       
    84 			const int aPageNum = SMF_FIRST_PAGE, 
       
    85 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
    86 	
       
    87 	/**
       
    88 	 * Method to search for contacts (friends) who are near the user.
       
    89 	 * Proximity defines accuracy level
       
    90 	 * @param aRequest [out] The request data to be sent to network
       
    91 	 * @param aLocation The location search criteria
       
    92 	 * @param aProximity location search boundary
       
    93 	 * @param aPageNum The page to be extracted
       
    94 	 * @param aItemsPerPage Number of items per page
       
    95 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
    96 	 */
       
    97 	virtual SmfPluginError searchNear( SmfPluginRequestData *aRequest,
       
    98 			const SmfPlace* aLocation,
       
    99 			const SmfLocationSearchBoundary aProximity,
       
   100 			const int aPageNum = SMF_FIRST_PAGE, 
       
   101 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
   102 	
       
   103 	/**
       
   104 	 * Method to get the list of groups
       
   105 	 * @param aRequest [out] The request data to be sent to network
       
   106 	 * @param aPageNum The page to be extracted
       
   107 	 * @param aItemsPerPage Number of items per page
       
   108 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
   109 	 */
       
   110 	virtual SmfPluginError groups( SmfPluginRequestData *aRequest,
       
   111 			const int aPageNum = SMF_FIRST_PAGE, 
       
   112 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
   113 	
       
   114 	/**
       
   115 	 * Method to search for a contact in a group
       
   116 	 * @param aRequest [out] The request data to be sent to network
       
   117 	 * @param aGroup the group in which to search
       
   118 	 * @param aPageNum The page to be extracted
       
   119 	 * @param aItemsPerPage Number of items per page
       
   120 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
       
   121 	 */
       
   122 	virtual SmfPluginError searchInGroup( SmfPluginRequestData *aRequest,
       
   123 			const SmfGroup &aGroup,
       
   124 			const int aPageNum = SMF_FIRST_PAGE, 
       
   125 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
       
   126 	
       
   127 	};
       
   128 
       
   129 Q_DECLARE_INTERFACE( SmfContactFetcherPlugin, "org.symbian.smf.plugin.contact.fetcher/v1.0" );
       
   130 
       
   131 #endif /* SMFCONTACTFETCHERPLUGIN_H_ */