EXPORT_API int datacontrol_provider_write_socket(int fd, void *buffer, unsigned int nbytes,
unsigned int *bytes_write);
+/**
+ * @brief Gets select request page info.
+ * @details This API is made for C# API. C# API can control selected page in proivder's callback. \n
+ * This API provide request page info to the provider application so that provider application \n
+ * can manage which page should be sent to the consumer.
+ *
+ * @param[in] request_id The request ID
+ * @param[out] page_num The requested page number
+ * @param[out] count_per_page The requested count per page
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #DATACONTROL_ERROR_NONE Successful
+ * @retval #DATACONTROL_ERROR_IO_ERROR I/O error
+ * @retval #DATACONTROL_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+EXPORT_API int datacontrol_provider_get_select_page_info(int request_id, int *page_num, int *count_per_page);
+
#ifdef __cplusplus
}
#endif
return ret;
}
+int datacontrol_provider_get_select_page_info(int request_id, int *page_num, int *count_per_page)
+{
+ bundle *b;
+ const char *page_num_str;
+ const char *count_per_page_str;
+
+ if (__request_table == NULL) {
+ LOGE("__request_table is NULL");
+ return DATACONTROL_ERROR_IO_ERROR;
+ }
+
+ b = g_hash_table_lookup(__request_table, &request_id);
+ if (!b) {
+ LOGE("No data for the request id: %d", request_id);
+ return DATACONTROL_ERROR_INVALID_PARAMETER;
+ }
+
+ page_num_str = bundle_get_val(b, RESULT_PAGE_NUMBER);
+ count_per_page_str = bundle_get_val(b, MAX_COUNT_PER_PAGE);
+ if (page_num_str == NULL || count_per_page_str == NULL) {
+ LOGE("No page data for the request id: %d, ", request_id);
+ return DATACONTROL_ERROR_INVALID_PARAMETER;
+ }
+ *page_num = _get_int_from_str(page_num_str);
+ *count_per_page = _get_int_from_str(count_per_page_str);
+
+ return DATACONTROL_ERROR_NONE;
+}
+
int datacontrol_provider_send_bulk_insert_result(int request_id, data_control_bulk_result_data_h bulk_result_data)
{
int ret;