I use CObexClient class to send file via Bluetooth. It is similar to example "BTObjectExchange", however I have added user dialogs, in particular Connection and Sending Progress which user can terminate by Cancel rightkey. So the Connecting dialog looks like in SDK "Notepad/Send/Bluetooth".
When Connection process started, remote device displays the "Receive message via Bluetooth from paired device ___ ?" dialog. If I press Cancel in Notepad, remote device dialog disappeares immediatelly - my device sends any "termination" command, and socket is in "safe" state after that.
But in my case (class CObexClient) - how can I do the same, when remote device user didn't press Yes or No, but I press Cancel? I have to:
1) modify status of ActiveObject which uses CObexClient. I do it via CObexClient::Error(kErrCancel) method. Control returns OK to RunL of my AO, but however I'm not 100% sure I can use that callback method for this safely;
2) notify remote device to terminate "connecting" process, and delete my CObexClient object to use it later when called from "Send/Bluetooth" menu... Both Abort() or Disconnect() methods (because IsConnected() is FALSE) do NOT force remote device to dismiss the dialog (probably my device sends nothing), and when I finally call "delete CObexClient", this is BLOCKING operation, until I press Yes or No on remote device.
So how can I force remote device to stop "connecting" process, as well as put local CObexClient into "safe" state? Probably use any methods of its RSocket member (whic is however protected)?
Is there any solution, or Notepad uses other socket classes?
Any advices, docs, links are welcome!