smf/smfservermodule/smfserver/smfplugins/smfpostproviderplugin.h
changeset 25 a180113055cb
parent 18 013a02bf2bb0
equal deleted inserted replaced
24:1cee9f1b95e0 25:a180113055cb
    50 	 * provider can post without truncation. Negative value means 
    50 	 * provider can post without truncation. Negative value means 
    51 	 * no limit
    51 	 * no limit
    52 	 * @return Max characters that can be posted without truncation
    52 	 * @return Max characters that can be posted without truncation
    53 	 */
    53 	 */
    54 	virtual qint32 maxCharsInPost( ) const = 0;
    54 	virtual qint32 maxCharsInPost( ) const = 0;
       
    55 	
    55 	/**
    56 	/**
    56 	 * Method that returns maximum no of items that can be returned 
    57 	 * Method that returns maximum no of items that can be returned 
    57 	 * in a single query to getPosts. Negative value means feature 
    58 	 * in a single query to getPosts. Negative value means feature 
    58 	 * not supported.
    59 	 * not supported.
    59 	 * @return Max items that can be returned in a single query
    60 	 * @return Max items that can be returned in a single query
    76 	virtual bool supportsAppearence ( ) const = 0;
    77 	virtual bool supportsAppearence ( ) const = 0;
    77 	
    78 	
    78 	/**
    79 	/**
    79 	 * Method to get the latest posts
    80 	 * Method to get the latest posts
    80 	 * @param aRequest [out] The request data to be sent to network
    81 	 * @param aRequest [out] The request data to be sent to network
    81 	 * @param aUser The user's contact in this SP, omit for self contact
    82 	 * @param aUser [in] The user's contact in this SP, omit for self contact
    82 	 * @param aPageNum The page to be extracted
    83 	 * @param aPageNum [in] The page to be extracted
    83 	 * @param aItemsPerPage Number of items per page
    84 	 * @param aItemsPerPage [in] Number of items per page
    84 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    85 	 * @return Appropriate value of the enum SmfPluginError.
       
    86 	 * Plugin error if any, else SmfPluginErrNone for success
    85 	 */
    87 	 */
    86 	virtual SmfPluginError retrieve( SmfPluginRequestData &aRequest,
    88 	virtual SmfPluginError retrieve( SmfPluginRequestData &aRequest,
    87 			const SmfContact *aUser=0,
    89 			const SmfContact *aUser = NULL,
    88 			const int aPageNum = SMF_FIRST_PAGE, 
    90 			const int aPageNum = SMF_FIRST_PAGE, 
    89 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
    91 			const int aItemsPerPage = SMF_ITEMS_PER_PAGE ) = 0;
    90 
    92 
    91 	
    93 	
    92 	/**
    94 	/**
    93 	 * Method to update a post to own area.
    95 	 * Method to update a post to own area.
    94 	 * @param aRequest [out] The request data to be sent to network
    96 	 * @param aRequest [out] The request data to be sent to network
    95 	 * @param aPostData The post data to be posted
    97 	 * @param aPostData [in] The post data to be posted
    96 	 * @param aLocation The location
    98 	 * @param aLocation [in] The location
    97 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
    99 	 * @return Appropriate value of the enum SmfPluginError.
       
   100 	 * Plugin error if any, else SmfPluginErrNone for success
    98 	 */
   101 	 */
    99 	virtual SmfPluginError post( SmfPluginRequestData &aRequest,
   102 	virtual SmfPluginError post( SmfPluginRequestData &aRequest,
   100 			const SmfPost &aPostData, 
   103 			const SmfPost &aPostData, 
   101 			const SmfLocation &aLocation ) = 0;
   104 			const SmfLocation &aLocation ) = 0;
   102 	
   105 	
   103 	/**
   106 	/**
   104 	 * Method to update the last post to own area with new data
   107 	 * Method to update the last post to own area with new data
   105 	 * @param aRequest [out] The request data to be sent to network
   108 	 * @param aRequest [out] The request data to be sent to network
   106 	 * @param aPostData The edited/new data to be posted
   109 	 * @param aPostData [in] The edited/new data to be posted
   107 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   110 	 * @return Appropriate value of the enum SmfPluginError.
       
   111 	 * Plugin error if any, else SmfPluginErrNone for success
   108 	 */
   112 	 */
   109 	virtual SmfPluginError updatePost( SmfPluginRequestData &aRequest,
   113 	virtual SmfPluginError updatePost( SmfPluginRequestData &aRequest,
   110 			const SmfPost &aPostData ) = 0;
   114 			const SmfPost &aPostData ) = 0;
   111 	
   115 	
   112 	/**
   116 	/**
   113 	 * Method to update a post to a particular contact
   117 	 * Method to update a post to a particular contact
   114 	 * @param aRequest [out] The request data to be sent to network
   118 	 * @param aRequest [out] The request data to be sent to network
   115 	 * @param aPostData The post data to be posted
   119 	 * @param aPostData [in] The post data to be posted
   116 	 * @param aContact The contact where the data has to be posted
   120 	 * @param aContact [in] The contact where the data has to be posted
   117 	 * @param aLocation The location
   121 	 * @param aLocation [in] The location
   118 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   122 	 * @return Appropriate value of the enum SmfPluginError.
       
   123 	 * Plugin error if any, else SmfPluginErrNone for success
   119 	 */
   124 	 */
   120 	virtual SmfPluginError postDirected( SmfPluginRequestData &aRequest,
   125 	virtual SmfPluginError postDirected( SmfPluginRequestData &aRequest,
   121 			const SmfPost &aPostData, 
   126 			const SmfPost &aPostData, 
   122 			const SmfContact &aContact, 
   127 			const SmfContact &aContact, 
   123 			const SmfLocation *aLocation = NULL ) = 0;
   128 			const SmfLocation *aLocation = NULL ) = 0;
   124 	
   129 	
   125 	
   130 	
   126 	/**
   131 	/**
   127 	 * Method to post a comment on a post.
   132 	 * Method to post a comment on a post.
   128 	 * @param aRequest [out] The request data to be sent to network
   133 	 * @param aRequest [out] The request data to be sent to network
   129 	 * @param aTarget Post on which comment has to be posted
   134 	 * @param aTarget [in] Post on which comment has to be posted
   130 	 * @param aComment comment to be posted
   135 	 * @param aComment [in] comment to be posted
   131 	 * @param aLocation location data
   136 	 * @param aLocation [in] location data
       
   137 	 * @return Appropriate value of the enum SmfPluginError.
       
   138 	 * Plugin error if any, else SmfPluginErrNone for success
   132 	 */
   139 	 */
   133 	virtual SmfPluginError commentOnAPost(SmfPluginRequestData &aRequest,
   140 	virtual SmfPluginError commentOnAPost(SmfPluginRequestData &aRequest,
   134 			const SmfPost &aTarget,
   141 			const SmfPost &aTarget,
   135 			const SmfPost &aComment, 
   142 			const SmfPost &aComment, 
   136 			const SmfLocation *aLocation = NULL) = 0;
   143 			const SmfLocation *aLocation = NULL) = 0;
   137 	
   144 	
   138 	/**
   145 	/**
   139 	 * Method to update the presence information of the user
   146 	 * Method to update the presence information of the user
   140 	 * @param aRequest [out] The request data to be sent to network
   147 	 * @param aRequest [out] The request data to be sent to network
   141 	 * @param aAppearence The appearence information
   148 	 * @param aAppearence [in] The appearence information
   142 	 * @param aStatus The status string
   149 	 * @param aStatus [in] The status string
   143 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   150 	 * @return Appropriate value of the enum SmfPluginError.
       
   151 	 * Plugin error if any, else SmfPluginErrNone for success
   144 	 */
   152 	 */
   145 	virtual SmfPluginError postAppearence( SmfPluginRequestData &aRequest,  
   153 	virtual SmfPluginError postAppearence( SmfPluginRequestData &aRequest,  
   146 			const SmfPresenceInfo &aAppearence,
   154 			const SmfPresenceInfo &aAppearence,
   147 			const QString &aStatus ) = 0;
   155 			const QString &aStatus ) = 0;
   148 	
   156 	
   149 	/**
   157 	/**
   150 	 * Share a contact's post to user's friends and followers
   158 	 * Share a contact's post to user's friends and followers
   151 	 * (e.g. retweet in twitter, share on facebook)
   159 	 * (e.g. retweet in twitter, share on facebook)
   152 	 * @param aRequest [out] The request data to be sent to network
   160 	 * @param aRequest [out] The request data to be sent to network
   153 	 * @param aPostData data to be posted
   161 	 * @param aPostData [in] data to be posted
   154 	 * @param aContact contact to which the post belonged
   162 	 * @param aContact [in] contact to which the post belonged
   155 	 * @param aEdited whether user changed items within the post
   163 	 * @param aEdited [in] whether user changed items within the post
   156 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   164 	 * @return Appropriate value of the enum SmfPluginError.
       
   165 	 * Plugin error if any, else SmfPluginErrNone for success
   157 	 */
   166 	 */
   158 	virtual SmfPluginError sharePost( SmfPluginRequestData &aRequest, 
   167 	virtual SmfPluginError sharePost( SmfPluginRequestData &aRequest, 
   159 			const SmfPost &aPostData, 
   168 			const SmfPost &aPostData, 
   160 			const SmfContact &aContact, 
   169 			const SmfContact &aContact, 
   161 			const bool &aEdited) = 0;
   170 			const bool &aEdited ) = 0;
   162 	
   171 	
   163 	/**
   172 	/**
   164 	 * Customised method for SmfPostProviderPlugin interface
   173 	 * Customised method for SmfPostProviderPlugin interface
   165 	 * @param aRequest [out] The request data to be sent to network
   174 	 * @param aRequest [out] The request data to be sent to network
   166 	 * @param aOperation The operation type (should be known between 
   175 	 * @param aOperation [in] The operation type (should be known between 
   167 	 * the client interface and the plugin)
   176 	 * the client interface and the plugin)
   168 	 * @param aData The data required to form the request (The type 
   177 	 * @param aData [in] The data required to form the request (The type 
   169 	 * of data should be known between client and the plugin)
   178 	 * of data should be known between client and the plugin)
   170 	 * @return SmfPluginError Plugin error if any, else SmfPluginErrNone
   179 	 * @return Appropriate value of the enum SmfPluginError.
       
   180 	 * Plugin error if any, else SmfPluginErrNone for success
   171 	 */
   181 	 */
   172 	virtual SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
   182 	virtual SmfPluginError customRequest( SmfPluginRequestData &aRequest, 
   173 			const int &aOperation, QByteArray *aData ) = 0;
   183 			const int &aOperation, QByteArray *aData ) = 0;
   174 
   184 
   175 	
   185