зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1131653: Move Handsfree helper classes into BluetoothHandsfreeManager namespace, r=btian
There are several equal-named, but different, classes in the Bluetooth namespace. The linker will pick only one of them, which leads to crashes in the compiled program.
This commit is contained in:
Родитель
2f54ae9e6d
Коммит
ff591d7ff2
|
@ -260,7 +260,8 @@ BluetoothHfpManager::Init()
|
|||
return true;
|
||||
}
|
||||
|
||||
class CleanupInitResultHandler MOZ_FINAL : public BluetoothHandsfreeResultHandler
|
||||
class BluetoothHfpManager::CleanupInitResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
CleanupInitResultHandler(BluetoothHandsfreeInterface* aInterface,
|
||||
|
@ -309,7 +310,8 @@ private:
|
|||
nsRefPtr<BluetoothProfileResultHandler> mRes;
|
||||
};
|
||||
|
||||
class InitResultHandlerRunnable MOZ_FINAL : public nsRunnable
|
||||
class BluetoothHfpManager::InitResultHandlerRunnable MOZ_FINAL
|
||||
: public nsRunnable
|
||||
{
|
||||
public:
|
||||
InitResultHandlerRunnable(CleanupInitResultHandler* aRes)
|
||||
|
@ -328,7 +330,8 @@ private:
|
|||
nsRefPtr<CleanupInitResultHandler> mRes;
|
||||
};
|
||||
|
||||
class OnErrorProfileResultHandlerRunnable MOZ_FINAL : public nsRunnable
|
||||
class BluetoothHfpManager::OnErrorProfileResultHandlerRunnable MOZ_FINAL
|
||||
: public nsRunnable
|
||||
{
|
||||
public:
|
||||
OnErrorProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes,
|
||||
|
@ -413,7 +416,8 @@ BluetoothHfpManager::~BluetoothHfpManager()
|
|||
hal::UnregisterBatteryObserver(this);
|
||||
}
|
||||
|
||||
class CleanupResultHandler MOZ_FINAL : public BluetoothHandsfreeResultHandler
|
||||
class BluetoothHfpManager::CleanupResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
CleanupResultHandler(BluetoothProfileResultHandler* aRes)
|
||||
|
@ -440,7 +444,8 @@ private:
|
|||
nsRefPtr<BluetoothProfileResultHandler> mRes;
|
||||
};
|
||||
|
||||
class DeinitResultHandlerRunnable MOZ_FINAL : public nsRunnable
|
||||
class BluetoothHfpManager::DeinitResultHandlerRunnable MOZ_FINAL
|
||||
: public nsRunnable
|
||||
{
|
||||
public:
|
||||
DeinitResultHandlerRunnable(BluetoothProfileResultHandler* aRes)
|
||||
|
@ -590,7 +595,7 @@ BluetoothHfpManager::NotifyDialer(const nsAString& aCommand)
|
|||
BT_ENSURE_TRUE_VOID_BROADCAST_SYSMSG(type, parameters);
|
||||
}
|
||||
|
||||
class VolumeControlResultHandler MOZ_FINAL
|
||||
class BluetoothHfpManager::VolumeControlResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
|
@ -728,7 +733,7 @@ BluetoothHfpManager::HandleShutdown()
|
|||
sBluetoothHfpManager = nullptr;
|
||||
}
|
||||
|
||||
class ClccResponseResultHandler MOZ_FINAL
|
||||
class BluetoothHfpManager::ClccResponseResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
|
@ -765,7 +770,7 @@ BluetoothHfpManager::SendCLCC(Call& aCall, int aIndex)
|
|||
aCall.mType, new ClccResponseResultHandler());
|
||||
}
|
||||
|
||||
class FormattedAtResponseResultHandler MOZ_FINAL
|
||||
class BluetoothHfpManager::FormattedAtResponseResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
|
@ -785,7 +790,7 @@ BluetoothHfpManager::SendLine(const char* aMessage)
|
|||
aMessage, new FormattedAtResponseResultHandler());
|
||||
}
|
||||
|
||||
class AtResponseResultHandler MOZ_FINAL
|
||||
class BluetoothHfpManager::AtResponseResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
|
@ -805,7 +810,7 @@ BluetoothHfpManager::SendResponse(BluetoothHandsfreeAtResponse aResponseCode)
|
|||
aResponseCode, 0, new AtResponseResultHandler());
|
||||
}
|
||||
|
||||
class PhoneStateChangeResultHandler MOZ_FINAL
|
||||
class BluetoothHfpManager::PhoneStateChangeResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
|
@ -837,7 +842,7 @@ BluetoothHfpManager::UpdatePhoneCIND(uint32_t aCallIndex)
|
|||
new PhoneStateChangeResultHandler());
|
||||
}
|
||||
|
||||
class DeviceStatusNotificationResultHandler MOZ_FINAL
|
||||
class BluetoothHfpManager::DeviceStatusNotificationResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
|
@ -1093,7 +1098,7 @@ BluetoothHfpManager::ToggleCalls()
|
|||
nsITelephonyService::CALL_STATE_CONNECTED;
|
||||
}
|
||||
|
||||
class ConnectAudioResultHandler MOZ_FINAL
|
||||
class BluetoothHfpManager::ConnectAudioResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
|
@ -1119,7 +1124,7 @@ BluetoothHfpManager::ConnectSco()
|
|||
return true;
|
||||
}
|
||||
|
||||
class DisconnectAudioResultHandler MOZ_FINAL
|
||||
class BluetoothHfpManager::DisconnectAudioResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
|
@ -1165,7 +1170,8 @@ BluetoothHfpManager::OnConnectError()
|
|||
mDeviceAddress.Truncate();
|
||||
}
|
||||
|
||||
class ConnectResultHandler MOZ_FINAL : public BluetoothHandsfreeResultHandler
|
||||
class BluetoothHfpManager::ConnectResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
ConnectResultHandler(BluetoothHfpManager* aHfpManager)
|
||||
|
@ -1218,7 +1224,8 @@ BluetoothHfpManager::OnDisconnectError()
|
|||
mController->NotifyCompletion(NS_LITERAL_STRING(ERR_CONNECTION_FAILED));
|
||||
}
|
||||
|
||||
class DisconnectResultHandler MOZ_FINAL : public BluetoothHandsfreeResultHandler
|
||||
class BluetoothHfpManager::DisconnectResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
DisconnectResultHandler(BluetoothHfpManager* aHfpManager)
|
||||
|
@ -1491,7 +1498,7 @@ BluetoothHfpManager::CnumNotification()
|
|||
SendResponse(HFP_AT_RESPONSE_OK);
|
||||
}
|
||||
|
||||
class CindResponseResultHandler MOZ_FINAL
|
||||
class BluetoothHfpManager::CindResponseResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
|
@ -1519,7 +1526,7 @@ BluetoothHfpManager::CindNotification()
|
|||
new CindResponseResultHandler());
|
||||
}
|
||||
|
||||
class CopsResponseResultHandler MOZ_FINAL
|
||||
class BluetoothHfpManager::CopsResponseResultHandler MOZ_FINAL
|
||||
: public BluetoothHandsfreeResultHandler
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -132,10 +132,27 @@ public:
|
|||
void KeyPressedNotification() MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
class AtResponseResultHandler;
|
||||
class GetVolumeTask;
|
||||
class CindResponseResultHandler;
|
||||
class ClccResponseResultHandler;
|
||||
class CleanupResultHandler;
|
||||
class CleanupInitResultHandler;
|
||||
class CloseScoTask;
|
||||
class CloseScoRunnable;
|
||||
class ConnectAudioResultHandler;
|
||||
class ConnectResultHandler;
|
||||
class CopsResponseResultHandler;
|
||||
class DeinitResultHandlerRunnable;
|
||||
class DeviceStatusNotificationResultHandler;
|
||||
class DisconnectAudioResultHandler;
|
||||
class DisconnectResultHandler;
|
||||
class FormattedAtResponseResultHandler;
|
||||
class InitResultHandlerRunnable;
|
||||
class OnErrorProfileResultHandlerRunnable;
|
||||
class PhoneStateChangeResultHandler;
|
||||
class RespondToBLDNTask;
|
||||
class VolumeControlResultHandler;
|
||||
|
||||
friend class BluetoothHfpManagerObserver;
|
||||
friend class GetVolumeTask;
|
||||
|
|
Загрузка…
Ссылка в новой задаче