示例#1
0
 /// <summary>
 /// Cancel the ongoing transfer session.
 /// </summary>
 /// <param name="TransferId"> tranfer ID.</param>
 /// <feature>http://tizen.org/feature/network.bluetooth.opp</feature>
 /// <exception cref="NotSupportedException">Thrown when the required feature is not Supported.</exception>
 /// <exception cref="NotSupportedException">Thrown when the BT/BTLE is not Supported.</exception>
 /// <exception cref="InvalidOperationException">Thrown when the BT/BTLE is not Enabled or Other Bluetooth Errors.</exception>
 /// <since_tizen> 4 </since_tizen>
 public void CancelTransfer(int TransferId)
 {
     if (BluetoothAdapter.IsBluetoothEnabled && Globals.IsInitialize)
     {
         int ret = _impl.CancelTransferId(TransferId);
         if (ret != (int)BluetoothError.None)
         {
             Log.Error(Globals.LogTag, "Failed to Cancel Transfer - " + (BluetoothError)ret);
             BluetoothErrorFactory.ThrowBluetoothException(ret);
         }
     }
     else
     {
         BluetoothErrorFactory.ThrowBluetoothException((int)BluetoothError.NotEnabled);
     }
 }