зеркало из https://github.com/mozilla/gecko-dev.git
Bug 827267 - Added function IsTransferring() to distinguish if there is an ongoing file-transferring session, r=gyeh
This commit is contained in:
Родитель
e6ef867f95
Коммит
2c3717fb14
|
@ -1010,6 +1010,12 @@ BluetoothOppManager::SendAbortRequest()
|
|||
SendSocketData(s);
|
||||
}
|
||||
|
||||
bool
|
||||
BluetoothOppManager::IsTransferring()
|
||||
{
|
||||
return (mConnected && !mSendTransferCompleteFlag);
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothOppManager::ReplyToConnect()
|
||||
{
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче