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