smf/smfservermodule/smfclient/smfcontactfetcher_p.h
changeset 25 a180113055cb
parent 18 013a02bf2bb0
equal deleted inserted replaced
24:1cee9f1b95e0 25:a180113055cb
    69 	 * is emitted with SmfContactList once data is arrived. When the list is big,
    69 	 * is emitted with SmfContactList once data is arrived. When the list is big,
    70 	 * user can specify the page number and per page item data. If not supplied 
    70 	 * user can specify the page number and per page item data. If not supplied 
    71 	 * by the user default values are used. 
    71 	 * by the user default values are used. 
    72 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    72 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    73 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    73 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    74 	 * @return true if success, else false
    74 	 * @return SmfError. SmfNoError if success, else appropriate error code
    75 	 */
    75 	 */
    76 	bool friends ( int pageNum = SMF_FIRST_PAGE, int perPage = SMF_ITEMS_PER_PAGE );
    76 	SmfError friends ( int pageNum = SMF_FIRST_PAGE, int perPage = SMF_ITEMS_PER_PAGE );
    77 
    77 
    78 	/**
    78 	/**
    79 	 * Get the list of followers asynchronously. The followersListAvailable() signal
    79 	 * Get the list of followers asynchronously. The followersListAvailable() signal
    80 	 * is emitted with SmfContactList once data is arrived. Please note that some
    80 	 * is emitted with SmfContactList once data is arrived. Please note that some
    81 	 * service may not support followers/fans - FALSE is returned if not supported.
    81 	 * service may not support followers/fans - FALSE is returned if not supported.
    82 	 * When the list is big user can specify the page number and per page item data.
    82 	 * When the list is big user can specify the page number and per page item data.
    83 	 * If not supplied by the user default values are used.
    83 	 * If not supplied by the user default values are used.
    84 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    84 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    85 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    85 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    86 	 * @return true if success, else false
    86 	 * @return SmfError. SmfNoError if success, else appropriate error code
    87 	 */
    87 	 */
    88 	bool followers ( int pageNum = SMF_FIRST_PAGE, int perPage = SMF_ITEMS_PER_PAGE );
    88 	SmfError followers ( int pageNum = SMF_FIRST_PAGE, int perPage = SMF_ITEMS_PER_PAGE );
    89 
    89 
    90 	/**
    90 	/**
    91 	 * Searches for a contact The searchContactFinished() signal
    91 	 * Searches for a contact The searchContactFinished() signal
    92 	 * is emitted with SmfContactList once data is arrived.
    92 	 * is emitted with SmfContactList once data is arrived.
    93 	 * When the list is big user can specify the page number and per page item data.
    93 	 * When the list is big user can specify the page number and per page item data.
    94 	 * If not supplied by the user default values are used.
    94 	 * If not supplied by the user default values are used.
    95 	 * @param contact The contact to be searched. The serach criteria must be 
    95 	 * @param contact The contact to be searched. The serach criteria must be 
    96 	 * set as one of its fields.
    96 	 * set as one of its fields.
    97 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    97 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    98 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
    98 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
       
    99 	 * @return SmfError. SmfNoError if success, else appropriate error code
    99 	 */
   100 	 */
   100 	void search ( SmfContact* contact, int pageNum = SMF_FIRST_PAGE,
   101 	SmfError search ( SmfContact* contact, int pageNum = SMF_FIRST_PAGE,
   101 					int perPage = SMF_ITEMS_PER_PAGE );
   102 					int perPage = SMF_ITEMS_PER_PAGE );
   102 	
   103 	
   103 	/**
   104 	/**
   104 	 * Searches for a contacts (friends) who are near the user. The signal 
   105 	 * Searches for a contacts (friends) who are near the user. The signal 
   105 	 * searchNearFinished() is emitted with SmfContactList once data is arrived.
   106 	 * searchNearFinished() is emitted with SmfContactList once data is arrived.
   108 	 * default values are used.
   109 	 * default values are used.
   109 	 * @param location The location information
   110 	 * @param location The location information
   110 	 * @param proximity The search boundary criteria
   111 	 * @param proximity The search boundary criteria
   111 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
   112 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
   112 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
   113 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
       
   114 	 * @return SmfError. SmfNoError if success, else appropriate error code
   113 	 */
   115 	 */
   114 	bool searchNear ( SmfLocation* location, 
   116 	SmfError searchNear ( SmfLocation* location, 
   115 					SmfLocationSearchBoundary proximity,
   117 					SmfLocationSearchBoundary proximity,
   116 					int pageNum = SMF_FIRST_PAGE,
   118 					int pageNum = SMF_FIRST_PAGE,
   117 					int perPage = SMF_ITEMS_PER_PAGE);
   119 					int perPage = SMF_ITEMS_PER_PAGE);
   118 	
   120 	
   119 	/**
   121 	/**
   122 	 * doesn't support any mode of grouping (very rare). When the list is big, 
   124 	 * doesn't support any mode of grouping (very rare). When the list is big, 
   123 	 * user can specify the page number and per page item data. If not supplied 
   125 	 * user can specify the page number and per page item data. If not supplied 
   124 	 * by the user default values are used.
   126 	 * by the user default values are used.
   125 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
   127 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
   126 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
   128 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
       
   129 	 * @return SmfError. SmfNoError if success, else appropriate error code
   127 	 */
   130 	 */
   128 	bool groups ( int pageNum = SMF_FIRST_PAGE, int perPage = SMF_ITEMS_PER_PAGE );
   131 	SmfError groups ( int pageNum = SMF_FIRST_PAGE, int perPage = SMF_ITEMS_PER_PAGE );
   129 
   132 
   130 	/**
   133 	/**
   131 	 * Searches for Smf Contacts in an Smf group. The signal searchInGroupFinished() 
   134 	 * Searches for Smf Contacts in an Smf group. The signal searchInGroupFinished() 
   132 	 * is emitted with SmfContactList once data is arrived. When the list is big user 
   135 	 * is emitted with SmfContactList once data is arrived. When the list is big user 
   133 	 * can specify the page number and per page item data. If not supplied by the 
   136 	 * can specify the page number and per page item data. If not supplied by the 
   134 	 * user default values are used.
   137 	 * user default values are used.
   135 	 * @param group The group to be searched in
   138 	 * @param group The group to be searched in
       
   139 	 * @contact The contact to be searched, default (NULL) is the self contact.
   136 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
   140 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
   137 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
   141 	 * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE
   138 	 * @return true if success, else false
   142 	 * @return SmfError. SmfNoError if success, else appropriate error code
   139 	 */
   143 	 */
   140 	bool searchInGroup ( SmfGroup group,
   144 	SmfError searchInGroup ( SmfGroup group,
       
   145 						SmfContact* contact = NULL,
   141 						int pageNum = SMF_FIRST_PAGE,
   146 						int pageNum = SMF_FIRST_PAGE,
   142 						int perPage = SMF_ITEMS_PER_PAGE );
   147 						int perPage = SMF_ITEMS_PER_PAGE );
   143 
   148 
   144 	/**
   149 	/**
   145 	 * Request for a custom operation. The signal customDataAvailable() is emitted 
   150 	 * Request for a custom operation. The signal customDataAvailable() is emitted 
   146 	 * when the result is available.
   151 	 * when the result is available.
   147 	 * @param operationId OperationId
   152 	 * @param operationId OperationId
   148 	 * @param customData Custom data to be sent
   153 	 * @param customData Custom data to be sent
       
   154 	 * @return SmfError. SmfNoError if success, else appropriate error code
   149 	 * Note:-Interpretation of operationId and customData is upto the concerned
   155 	 * Note:-Interpretation of operationId and customData is upto the concerned
   150 	 * plugin and client application. service provider should provide some
   156 	 * plugin and client application. service provider should provide some
   151 	 * serializing-deserializing utilities for these custom data
   157 	 * serializing-deserializing utilities for these custom data
   152 	 */
   158 	 */
   153 	void customRequest ( const int& operationId, QByteArray* customData );
   159 	SmfError customRequest ( const int& operationId, QByteArray* customData );
       
   160 	
       
   161     /**
       
   162      * Cancels a request generated due to the call to any API which results 
       
   163      * into http request. Might return error if no request is currently pending.
       
   164      * Please note that there can be only one request pending at any point of time
       
   165      * @return Appropriate SmfError value
       
   166      */
       
   167 	SmfError cancelRequest ();
   154    
   168    
   155 public: //from smfobserver
   169 public: //from smfobserver
   156 	/**
   170 	/**
   157 	 * To notify availibility of asynchronous requests.
   171 	 * To notify availibility of asynchronous requests.
   158 	 * @param result Requested result, before using must check error param.
   172 	 * @param result Requested result, before using must check error param.