Bug 827267 - Added function IsTransferring() to distinguish if there is an ongoing file-transferring session, r=gyeh

This commit is contained in:
Eric Chou 2013-01-08 14:02:00 +01:00
parent b3297d9469
commit 975bccb26d
3 changed files with 11 additions and 1 deletions

View File

@ -1010,6 +1010,12 @@ BluetoothOppManager::SendAbortRequest()
SendSocketData(s);
}
bool
BluetoothOppManager::IsTransferring()
{
return (mConnected && !mSendTransferCompleteFlag);
}
void
BluetoothOppManager::ReplyToConnect()
{

View File

@ -68,6 +68,10 @@ public:
void ExtractPacketHeaders(const ObexHeaderSet& aHeader);
bool ExtractBlobHeaders();
nsresult HandleShutdown();
// Return true if there is an ongoing file-transfer session, please see
// Bug 827267 for more information.
bool IsTransferring();
private:
BluetoothOppManager();
void StartFileTransfer();

View File

@ -2497,7 +2497,7 @@ BluetoothDBusService::IsConnected(const uint16_t aProfileId)
return hfp->GetConnectionStatus() == SocketConnectionStatus::SOCKET_CONNECTED;
} else if (aProfileId == BluetoothServiceClass::OBJECT_PUSH) {
BluetoothOppManager* opp = BluetoothOppManager::Get();
return opp->GetConnectionStatus() == SocketConnectionStatus::SOCKET_CONNECTED;
return opp->IsTransferring();
}
return false;