Bug 1142132: Move helper classes of OPP manager into manager's namespace, r=shuang

Keeping helper classes in Bluetooth's C++ namespace creates collisions
between symbols of different managers' helpers. Moving OPP helpers into
the namespace of |BluetoothOPPManager| fixes this problem for OPP.
This commit is contained in:
Thomas Zimmermann 2015-03-12 13:07:32 +01:00
parent e0b98d63a1
commit a5ce379baf
2 changed files with 15 additions and 6 deletions

View File

@ -59,7 +59,10 @@ StaticRefPtr<BluetoothOppManager> sBluetoothOppManager;
static bool sInShutdown = false;
}
class mozilla::dom::bluetooth::SendFileBatch {
BEGIN_BLUETOOTH_NAMESPACE
class BluetoothOppManager::SendFileBatch MOZ_FINAL
{
public:
SendFileBatch(const nsAString& aDeviceAddress, nsIDOMBlob* aBlob)
: mDeviceAddress(aDeviceAddress)
@ -92,7 +95,7 @@ BluetoothOppManager::Observe(nsISupports* aSubject,
return NS_ERROR_UNEXPECTED;
}
class SendSocketDataTask : public nsRunnable
class BluetoothOppManager::SendSocketDataTask MOZ_FINAL : public nsRunnable
{
public:
SendSocketDataTask(uint8_t* aStream, uint32_t aSize)
@ -116,7 +119,7 @@ private:
uint32_t mSize;
};
class ReadFileTask : public nsRunnable
class BluetoothOppManager::ReadFileTask MOZ_FINAL : public nsRunnable
{
public:
ReadFileTask(nsIInputStream* aInputStream,
@ -161,7 +164,7 @@ private:
uint32_t mAvailablePacketSize;
};
class CloseSocketTask : public Task
class BluetoothOppManager::CloseSocketTask MOZ_FINAL : public Task
{
public:
CloseSocketTask(BluetoothSocket* aSocket) : mSocket(aSocket)
@ -1605,3 +1608,5 @@ BluetoothOppManager::Reset()
{
MOZ_ASSERT(false);
}
END_BLUETOOTH_NAMESPACE

View File

@ -29,11 +29,15 @@ BEGIN_BLUETOOTH_NAMESPACE
class BluetoothSocket;
class ObexHeaderSet;
class SendFileBatch;
class BluetoothOppManager : public BluetoothSocketObserver
, public BluetoothProfileManagerBase
{
class CloseSocketTask;
class ReadFileTask;
class SendFileBatch;
class SendSocketDataTask;
public:
BT_DECL_PROFILE_MGR_BASE
virtual void GetName(nsACString& aName)