CAPI/OPP: Implement function bt_opp_server_cancel_transfer() 28/23028/1
authorWu Jiangbo <jiangbox.wu@intel.com>
Fri, 13 Jun 2014 07:36:40 +0000 (15:36 +0800)
committerWu Jiangbo <jiangbox.wu@intel.com>
Mon, 16 Jun 2014 09:15:33 +0000 (17:15 +0800)
Change-Id: I13ced45bcc20239f2ba77be447d661bc158e94f0
Signed-off-by: Wu Jiangbo <jiangbox.wu@intel.com>
capi/bluetooth-obex.c
include/bluetooth.h

index 60825b4..17a39c7 100644 (file)
@@ -572,3 +572,8 @@ int bt_opp_server_reject(void)
 {
        return bt_opp_server_reject_request();
 }
+
+int bt_opp_server_cancel_transfer(int transfer_id)
+{
+       return bt_opp_transfer_cancel(transfer_id);
+}
index cb936e7..64a6082 100644 (file)
@@ -2191,6 +2191,21 @@ int bt_opp_server_accept(bt_opp_server_transfer_progress_cb progress_cb, bt_opp_
  */
 int bt_opp_server_reject(void);
 
+/**
+ * @ingroup CAPI_NETWORK_BLUETOOTH_OPP_SERVER_MODULE
+ * @brief Cancels the transfer.
+ * @param[in] transfer_id  The ID of transfer
+ * @return 0 on success, otherwise a negative error value.
+ * @retval #BT_ERROR_NONE  Successful
+ * @retval #BT_ERROR_NOT_INITIALIZED  Not initialized
+ * @retval #BT_ERROR_NOT_ENABLED  Not enabled
+ * @retval #BT_ERROR_INVALID_PARAMETER  Invalid parameter
+ * @retval #BT_ERROR_OPERATION_FAILED  Operation failed
+ * @see  bt_opp_server_accept_connection()
+ * @see  bt_opp_server_accept()
+ */
+int bt_opp_server_cancel_transfer(int transfer_id);
+
 /* New OPP API*/
 int bt_opp_init(void);