mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Bug 1142132
: Move helper classes of A2DP manager into manager's namespace, r=shuang
Keeping helper classes in Bluetooth's C++ namespace creates collisions between symbols of different managers' helpers. Moving A2DP helpers into the namespace of |BluetoothA2dpManager| fixes this problem for A2DP.
This commit is contained in:
parent
888dc86930
commit
41cc33c0c2
@ -120,11 +120,12 @@ AvStatusToSinkString(BluetoothA2dpConnectionState aState, nsAString& aString)
|
||||
}
|
||||
}
|
||||
|
||||
class InitAvrcpResultHandler MOZ_FINAL : public BluetoothAvrcpResultHandler
|
||||
class BluetoothA2dpManager::InitAvrcpResultHandler MOZ_FINAL
|
||||
: public BluetoothAvrcpResultHandler
|
||||
{
|
||||
public:
|
||||
InitAvrcpResultHandler(BluetoothProfileResultHandler* aRes)
|
||||
: mRes(aRes)
|
||||
: mRes(aRes)
|
||||
{ }
|
||||
|
||||
void OnError(BluetoothStatus aStatus) MOZ_OVERRIDE
|
||||
@ -155,11 +156,12 @@ private:
|
||||
nsRefPtr<BluetoothProfileResultHandler> mRes;
|
||||
};
|
||||
|
||||
class InitA2dpResultHandler MOZ_FINAL : public BluetoothA2dpResultHandler
|
||||
class BluetoothA2dpManager::InitA2dpResultHandler MOZ_FINAL
|
||||
: public BluetoothA2dpResultHandler
|
||||
{
|
||||
public:
|
||||
InitA2dpResultHandler(BluetoothProfileResultHandler* aRes)
|
||||
: mRes(aRes)
|
||||
: mRes(aRes)
|
||||
{ }
|
||||
|
||||
void OnError(BluetoothStatus aStatus) MOZ_OVERRIDE
|
||||
@ -193,13 +195,14 @@ private:
|
||||
nsRefPtr<BluetoothProfileResultHandler> mRes;
|
||||
};
|
||||
|
||||
class OnErrorProfileResultHandlerRunnable MOZ_FINAL : public nsRunnable
|
||||
class BluetoothA2dpManager::OnErrorProfileResultHandlerRunnable MOZ_FINAL
|
||||
: public nsRunnable
|
||||
{
|
||||
public:
|
||||
OnErrorProfileResultHandlerRunnable(BluetoothProfileResultHandler* aRes,
|
||||
nsresult aRv)
|
||||
: mRes(aRes)
|
||||
, mRv(aRv)
|
||||
: mRes(aRes)
|
||||
, mRv(aRv)
|
||||
{
|
||||
MOZ_ASSERT(mRes);
|
||||
}
|
||||
@ -324,11 +327,12 @@ BluetoothA2dpManager::Get()
|
||||
return sBluetoothA2dpManager;
|
||||
}
|
||||
|
||||
class CleanupAvrcpResultHandler MOZ_FINAL : public BluetoothAvrcpResultHandler
|
||||
class BluetoothA2dpManager::CleanupAvrcpResultHandler MOZ_FINAL
|
||||
: public BluetoothAvrcpResultHandler
|
||||
{
|
||||
public:
|
||||
CleanupAvrcpResultHandler(BluetoothProfileResultHandler* aRes)
|
||||
: mRes(aRes)
|
||||
: mRes(aRes)
|
||||
{ }
|
||||
|
||||
void OnError(BluetoothStatus aStatus) MOZ_OVERRIDE
|
||||
@ -363,11 +367,12 @@ private:
|
||||
nsRefPtr<BluetoothProfileResultHandler> mRes;
|
||||
};
|
||||
|
||||
class CleanupA2dpResultHandler MOZ_FINAL : public BluetoothA2dpResultHandler
|
||||
class BluetoothA2dpManager::CleanupA2dpResultHandler MOZ_FINAL
|
||||
: public BluetoothA2dpResultHandler
|
||||
{
|
||||
public:
|
||||
CleanupA2dpResultHandler(BluetoothProfileResultHandler* aRes)
|
||||
: mRes(aRes)
|
||||
: mRes(aRes)
|
||||
{ }
|
||||
|
||||
void OnError(BluetoothStatus aStatus) MOZ_OVERRIDE
|
||||
@ -399,11 +404,12 @@ private:
|
||||
nsRefPtr<BluetoothProfileResultHandler> mRes;
|
||||
};
|
||||
|
||||
class CleanupA2dpResultHandlerRunnable MOZ_FINAL : public nsRunnable
|
||||
class BluetoothA2dpManager::CleanupA2dpResultHandlerRunnable MOZ_FINAL
|
||||
: public nsRunnable
|
||||
{
|
||||
public:
|
||||
CleanupA2dpResultHandlerRunnable(BluetoothProfileResultHandler* aRes)
|
||||
: mRes(aRes)
|
||||
: mRes(aRes)
|
||||
{ }
|
||||
|
||||
NS_IMETHOD Run() MOZ_OVERRIDE
|
||||
@ -463,7 +469,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
|
||||
@ -514,7 +521,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
|
||||
|
@ -68,6 +68,15 @@ protected:
|
||||
virtual ~BluetoothA2dpManager();
|
||||
|
||||
private:
|
||||
class CleanupA2dpResultHandler;
|
||||
class CleanupA2dpResultHandlerRunnable;
|
||||
class CleanupAvrcpResultHandler;
|
||||
class ConnectResultHandler;
|
||||
class DisconnectResultHandler;
|
||||
class InitA2dpResultHandler;
|
||||
class InitAvrcpResultHandler;
|
||||
class OnErrorProfileResultHandlerRunnable;
|
||||
|
||||
BluetoothA2dpManager();
|
||||
void ResetA2dp();
|
||||
void ResetAvrcp();
|
||||
|
Loading…
Reference in New Issue
Block a user