smf/smfservermodule/smfclient/smfpostprovider.h
changeset 25 a180113055cb
parent 18 013a02bf2bb0
equal deleted inserted replaced
24:1cee9f1b95e0 25:a180113055cb
    89 	 * Gets the posts asynchronously. The signal postsAvailable()with SmfPostList is emitted
    89 	 * Gets the posts asynchronously. The signal postsAvailable()with SmfPostList is emitted
    90 	 * once the post lists are available
    90 	 * once the post lists are available
    91 	 * @param user user's contact in this SP, omit for self contact
    91 	 * @param user user's contact in this SP, omit for self contact
    92 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    92 	 * @param pageNum Page number to download, SMF_FIRST_PAGE denotes fresh query.
    93      * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE 
    93      * @param perPage Item per page, default is SMF_ITEMS_PER_PAGE 
       
    94      * @return SmfError. SmfNoError if success, else appropriate error code
    94 	 * @see postsAvailable()
    95 	 * @see postsAvailable()
    95 	 */
    96 	 */
    96 	void posts(SmfContact* user = 0,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
    97 	SmfError posts(SmfContact* user = 0,int pageNum=SMF_FIRST_PAGE,int perPage=SMF_ITEMS_PER_PAGE);
    97 	
    98 	
    98 	/**
    99 	/**
    99 	 * Updates a post to own area, the success of the post can be checked with signal
   100 	 * Updates a post to own area, the success of the post can be checked with signal
   100 	 * updatePostFinished() signal
   101 	 * updatePostFinished() signal
   101 	 * @param postData data to be posted
   102 	 * @param postData data to be posted
   102 	 * @param location location data
   103 	 * @param location location data
   103 	 */
   104 	 * @return SmfError. SmfNoError if success, else appropriate error code
   104 	void post(SmfPost& postData,SmfLocation& location);
   105 	 */
       
   106 	SmfError post(SmfPost& postData,SmfLocation& location);
   105 	
   107 	
   106 	/**
   108 	/**
   107 	 * Updates the last post to own area with new data, the success of the post can be checked with signal
   109 	 * Updates the last post to own area with new data, the success of the post can be checked with signal
   108 	 * updatePostFinished() signal
   110 	 * updatePostFinished() signal
   109 	 * @param postData edited/new data to be posted
   111 	 * @param postData edited/new data to be posted
   110 	 * @param location location data
   112 	 * @param location location data
   111 	 */
   113 	 * @return SmfError. SmfNoError if success, else appropriate error code
   112 	void updatePost(SmfPost& postData); 
   114 	 */
       
   115 	SmfError updatePost(SmfPost& postData); 
   113 	
   116 	
   114 	/**
   117 	/**
   115 	 * Updates a post to a particular Smf contact. the success of the post can be checked with signal
   118 	 * Updates a post to a particular Smf contact. the success of the post can be checked with signal
   116 	 * updatePostFinished() signal.
   119 	 * updatePostFinished() signal.
   117 	 * @param postData data to be posted
   120 	 * @param postData data to be posted
   118 	 * @param contact contact to which the post is to be directed
   121 	 * @param contact contact to which the post is to be directed
   119 	 * @param location location data
   122 	 * @param location location data
   120 	 */
   123 	 * @return SmfError. SmfNoError if success, else appropriate error code
   121 	void postDirected(SmfPost& postData,SmfContact& contact,SmfLocation* location=0);
   124 	 */
       
   125 	SmfError postDirected(SmfPost& postData,SmfContact& contact,SmfLocation* location=0);
   122 	
   126 	
   123 	/**
   127 	/**
   124 	 * Method to post a comment on a post.
   128 	 * Method to post a comment on a post.
   125 	 * @param aTarget Post on which comment has to be posted
   129 	 * @param aTarget Post on which comment has to be posted
   126 	 * @param aComment comment to be posted
   130 	 * @param aComment comment to be posted
   127 	 * @param aLocation location data
   131 	 * @param aLocation location data
   128 	 */
   132 	 * @return SmfError. SmfNoError if success, else appropriate error code
   129 	void commentOnAPost( SmfPost &aTarget, SmfPost &aComment, SmfLocation *aLocation = NULL);
   133 	 */
       
   134 	SmfError commentOnAPost( SmfPost &aTarget, SmfPost &aComment, SmfLocation *aLocation = NULL);
   130 	
   135 	
   131 	/**
   136 	/**
   132 	 * Posts appearance info of the user.e.g. appear offline, busy, do-not-disturb
   137 	 * Posts appearance info of the user.e.g. appear offline, busy, do-not-disturb
   133 	 * @param appearence user appearance
   138 	 * @param appearence user appearance
   134 	 * @see SmfPresenceInfo
   139 	 * @see SmfPresenceInfo
   135 	 * @return False on Failure/Not supported 
   140 	 * @return SmfError. SmfNoError if success, else appropriate error code
   136 	 */
   141 	 */
   137 	bool postAppearence(SmfAppearenceInfo appearence, const QString &status); 
   142 	SmfError postAppearence(SmfAppearenceInfo appearence, const QString &status); 
   138 	
   143 	
   139 	/**
   144 	/**
   140 	 * Share /a contact's post to user's friends and followers (e.g. retweet in twitter, share on facebook)
   145 	 * Share /a contact's post to user's friends and followers (e.g. retweet in twitter, share on facebook)
   141 	 * emits updatePostFinished() signal when done.
   146 	 * emits updatePostFinished() signal when done.
   142 	 * @param postData data to be posted
   147 	 * @param postData data to be posted
   143 	 * @param contact contact to which the post belonged
   148 	 * @param contact contact to which the post belonged
   144 	 * @param bool whether user changed items within the post
   149 	 * @param bool whether user changed items within the post
   145 	 */
   150 	 * @return SmfError. SmfNoError if success, else appropriate error code
   146 	void sharePost(SmfPost& postData,SmfContact& contact,bool edited);
   151 	 */
       
   152 	SmfError sharePost(SmfPost& postData,SmfContact& contact,bool edited);
   147 	
   153 	
   148    /**
   154    /**
   149 	* Request for a custom operation.
   155 	* Request for a custom operation.
   150 	* @param operationId OperationId
   156 	* @param operationId OperationId
   151 	* @param customData Custom data to be sent
   157 	* @param customData Custom data to be sent
       
   158 	* @return SmfError. SmfNoError if success, else appropriate error code
   152 	* Note:-Interpretation of operationId and customData is upto the concerned
   159 	* Note:-Interpretation of operationId and customData is upto the concerned
   153 	* plugin and client application. service provider should provide some
   160 	* plugin and client application. service provider should provide some
   154 	* serializing-deserializing utilities for these custom data
   161 	* serializing-deserializing utilities for these custom data
   155 	*/
   162 	*/
   156    void customRequest(const int& operationId,QByteArray* customData);
   163    SmfError customRequest(const int& operationId,QByteArray* customData);
       
   164    
       
   165    /**
       
   166     * Cancels a request generated due to the call to any API which results 
       
   167     * into http request. Might return error if no request is currently pending.
       
   168     * Please note that there can be only one request pending at any point of time
       
   169     * @return Appropriate SmfError value
       
   170     */
       
   171 	SmfError cancelRequest ();
   157 	
   172 	
   158 signals:
   173 signals:
   159 	
   174 	
   160 	/**
   175 	/**
   161 	 * Emitted when a request to  getPosts() is finished
   176 	 * Emitted when a request to  getPosts() is finished