Bug 1131653: Move A2DP/AVRCP helper classes into BluetoothA2dpManager namespace, r=btian

As for Handsfree helpers, A2DP and AVRCP helpers might create naming
conflicts with other classes. Moving them into |BluetoothA2dpManager|'s
namespace resolves this problem.
This commit is contained in:
Thomas Zimmermann 2015-02-11 10:24:09 +01:00
parent a29aa5ea56
commit 9b4161b45c
2 changed files with 25 additions and 8 deletions

View File

@ -120,7 +120,8 @@ AvStatusToSinkString(BluetoothA2dpConnectionState aState, nsAString& aString)
}
}
class InitAvrcpResultHandler MOZ_FINAL : public BluetoothAvrcpResultHandler
class BluetoothA2dpManager::InitAvrcpResultHandler MOZ_FINAL
: public BluetoothAvrcpResultHandler
{
public:
InitAvrcpResultHandler(BluetoothProfileResultHandler* aRes)
@ -155,7 +156,8 @@ private:
nsRefPtr<BluetoothProfileResultHandler> mRes;
};
class InitA2dpResultHandler MOZ_FINAL : public BluetoothA2dpResultHandler
class BluetoothA2dpManager::InitA2dpResultHandler MOZ_FINAL
: public BluetoothA2dpResultHandler
{
public:
InitA2dpResultHandler(BluetoothProfileResultHandler* aRes)
@ -197,7 +199,8 @@ private:
nsRefPtr<BluetoothProfileResultHandler> mRes;
};
class OnErrorProfileResultHandlerRunnable MOZ_FINAL : public nsRunnable
class BluetoothA2dpManager::OnErrorProfileResultHandlerRunnable MOZ_FINAL
: public nsRunnable
{
public:
OnErrorProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes,
@ -328,7 +331,8 @@ BluetoothA2dpManager::Get()
return sBluetoothA2dpManager;
}
class CleanupAvrcpResultHandler MOZ_FINAL : public BluetoothAvrcpResultHandler
class BluetoothA2dpManager::CleanupAvrcpResultHandler MOZ_FINAL
: public BluetoothAvrcpResultHandler
{
public:
CleanupAvrcpResultHandler(BluetoothProfileResultHandler* aRes)
@ -364,7 +368,8 @@ private:
nsRefPtr<BluetoothProfileResultHandler> mRes;
};
class CleanupA2dpResultHandler MOZ_FINAL : public BluetoothA2dpResultHandler
class BluetoothA2dpManager::CleanupA2dpResultHandler MOZ_FINAL
: public BluetoothA2dpResultHandler
{
public:
CleanupA2dpResultHandler(BluetoothProfileResultHandler* aRes)
@ -397,7 +402,8 @@ private:
nsRefPtr<BluetoothProfileResultHandler> mRes;
};
class CleanupA2dpResultHandlerRunnable MOZ_FINAL : public nsRunnable
class BluetoothA2dpManager::CleanupA2dpResultHandlerRunnable MOZ_FINAL
: public nsRunnable
{
public:
CleanupA2dpResultHandlerRunnable(BluetoothProfileResultHandler* aRes)
@ -461,7 +467,8 @@ BluetoothA2dpManager::OnConnectError()
mDeviceAddress.Truncate();
}
class ConnectResultHandler MOZ_FINAL : public BluetoothA2dpResultHandler
class BluetoothA2dpManager::ConnectResultHandler MOZ_FINAL
: public BluetoothA2dpResultHandler
{
public:
void OnError(BluetoothStatus aStatus) MOZ_OVERRIDE
@ -512,7 +519,8 @@ BluetoothA2dpManager::OnDisconnectError()
mController->NotifyCompletion(NS_LITERAL_STRING(ERR_DISCONNECTION_FAILED));
}
class DisconnectResultHandler MOZ_FINAL : public BluetoothA2dpResultHandler
class BluetoothA2dpManager::DisconnectResultHandler MOZ_FINAL
: public BluetoothA2dpResultHandler
{
public:
void OnError(BluetoothStatus aStatus) MOZ_OVERRIDE

View File

@ -66,6 +66,15 @@ public:
void GetArtist(nsAString& aArtist);
private:
class CleanupA2dpResultHandler;
class CleanupA2dpResultHandlerRunnable;
class CleanupAvrcpResultHandler;
class ConnectResultHandler;
class DisconnectResultHandler;
class InitA2dpResultHandler;
class InitAvrcpResultHandler;
class OnErrorProfileResultHandlerRunnable;
BluetoothA2dpManager();
void ResetA2dp();
void ResetAvrcp();