зеркало из https://github.com/mozilla/gecko-dev.git
Bug 878745 - BluetoothService cleanup, r=echou
This commit is contained in:
Родитель
4817823795
Коммит
c9e209a7b9
|
@ -820,3 +820,13 @@ BluetoothService::Notify(const BluetoothSignal& aData)
|
|||
systemMessenger->BroadcastMessage(oldType, OBJECT_TO_JSVAL(obj));
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothService::DispatchToCommandThread(nsRunnable* aRunnable)
|
||||
{
|
||||
MOZ_ASSERT(NS_IsMainThread());
|
||||
MOZ_ASSERT(aRunnable);
|
||||
MOZ_ASSERT(mBluetoothCommandThread);
|
||||
|
||||
mBluetoothCommandThread->Dispatch(aRunnable, NS_DISPATCH_NORMAL);
|
||||
}
|
||||
|
|
|
@ -158,16 +158,6 @@ public:
|
|||
virtual nsresult
|
||||
StartDiscoveryInternal(BluetoothReplyRunnable* aRunnable) = 0;
|
||||
|
||||
/**
|
||||
* Fetches the propertes for the specified device
|
||||
*
|
||||
* @param aSignal BluetoothSignal to be distrubuted after retrieving device properties
|
||||
*
|
||||
* @return NS_OK on function run, NS_ERROR_FAILURE otherwise
|
||||
*/
|
||||
virtual nsresult
|
||||
GetDevicePropertiesInternal(const BluetoothSignal& aSignal) = 0;
|
||||
|
||||
/**
|
||||
* Set a property for the specified object
|
||||
*
|
||||
|
@ -246,9 +236,6 @@ public:
|
|||
SetAuthorizationInternal(const nsAString& aDeviceAddress, bool aAllow,
|
||||
BluetoothReplyRunnable* aRunnable) = 0;
|
||||
|
||||
virtual nsresult
|
||||
PrepareAdapterInternal() = 0;
|
||||
|
||||
virtual void
|
||||
Connect(const nsAString& aDeviceAddress,
|
||||
uint16_t aProfileId,
|
||||
|
@ -299,6 +286,9 @@ public:
|
|||
void
|
||||
RemoveObserverFromTable(const nsAString& key);
|
||||
|
||||
void
|
||||
DispatchToCommandThread(nsRunnable* aRunnable);
|
||||
|
||||
protected:
|
||||
BluetoothService()
|
||||
: mEnabled(false)
|
||||
|
|
|
@ -102,14 +102,6 @@ BluetoothServiceChildProcess::GetDefaultAdapterPathInternal(
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
BluetoothServiceChildProcess::GetDevicePropertiesInternal(
|
||||
const BluetoothSignal& aSignal)
|
||||
{
|
||||
MOZ_NOT_REACHED("Should never be called from child");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
nsresult
|
||||
BluetoothServiceChildProcess::GetConnectedDevicePropertiesInternal(
|
||||
uint16_t aProfileId,
|
||||
|
@ -277,13 +269,6 @@ BluetoothServiceChildProcess::SetAuthorizationInternal(
|
|||
return true;
|
||||
}
|
||||
|
||||
nsresult
|
||||
BluetoothServiceChildProcess::PrepareAdapterInternal()
|
||||
{
|
||||
MOZ_NOT_REACHED("Should never be called from child");
|
||||
return NS_ERROR_NOT_IMPLEMENTED;
|
||||
}
|
||||
|
||||
void
|
||||
BluetoothServiceChildProcess::Connect(
|
||||
const nsAString& aDeviceAddress,
|
||||
|
|
|
@ -185,14 +185,6 @@ private:
|
|||
virtual bool
|
||||
IsEnabledInternal() MOZ_OVERRIDE;
|
||||
|
||||
// Should never be called from the child
|
||||
virtual nsresult
|
||||
GetDevicePropertiesInternal(const BluetoothSignal& aSignal) MOZ_OVERRIDE;
|
||||
|
||||
// This method should never be called from the child.
|
||||
virtual nsresult
|
||||
PrepareAdapterInternal() MOZ_OVERRIDE;
|
||||
|
||||
bool
|
||||
IsSignalRegistered(const nsAString& aNodeName) {
|
||||
return !!mBluetoothSignalObserverTable.Get(aNodeName);
|
||||
|
|
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -47,9 +47,6 @@ public:
|
|||
|
||||
virtual nsresult StopDiscoveryInternal(BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult
|
||||
GetDevicePropertiesInternal(const BluetoothSignal& aSignal) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult
|
||||
SetProperty(BluetoothObjectType aType,
|
||||
const BluetoothNamedValue& aValue,
|
||||
|
@ -119,9 +116,6 @@ public:
|
|||
SetAuthorizationInternal(const nsAString& aDeviceAddress, bool aAllow,
|
||||
BluetoothReplyRunnable* aRunnable) MOZ_OVERRIDE;
|
||||
|
||||
virtual nsresult
|
||||
PrepareAdapterInternal() MOZ_OVERRIDE;
|
||||
|
||||
virtual void
|
||||
Connect(const nsAString& aDeviceAddress,
|
||||
const uint16_t aProfileId,
|
||||
|
|
Загрузка…
Ссылка в новой задаче