зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1187230: Convert Bluetooth to use daemon runnables, r=shuang
With this patch, Bluetooth uses the generic daemon runnables.
This commit is contained in:
Родитель
f64a6dcafc
Коммит
1c60aeafa6
|
@ -481,7 +481,7 @@ void
|
|||
BluetoothDaemonA2dpInterface::DispatchError(
|
||||
BluetoothA2dpResultHandler* aRes, BluetoothStatus aStatus)
|
||||
{
|
||||
BluetoothResultRunnable1<BluetoothA2dpResultHandler, void,
|
||||
DaemonResultRunnable1<BluetoothA2dpResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>::Dispatch(
|
||||
aRes, &BluetoothA2dpResultHandler::OnError,
|
||||
ConstantInitOp1<BluetoothStatus>(aStatus));
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
#include "mozilla/ipc/DaemonRunnables.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
|
@ -62,11 +63,12 @@ protected:
|
|||
// Responses
|
||||
//
|
||||
|
||||
typedef BluetoothResultRunnable0<BluetoothA2dpResultHandler, void>
|
||||
typedef mozilla::ipc::DaemonResultRunnable0<
|
||||
BluetoothA2dpResultHandler, void>
|
||||
ResultRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable1<BluetoothA2dpResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>
|
||||
typedef mozilla::ipc::DaemonResultRunnable1<
|
||||
BluetoothA2dpResultHandler, void, BluetoothStatus, BluetoothStatus>
|
||||
ErrorRunnable;
|
||||
|
||||
void ErrorRsp(const DaemonSocketPDUHeader& aHeader,
|
||||
|
@ -91,22 +93,18 @@ protected:
|
|||
|
||||
class NotificationHandlerWrapper;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
BluetoothA2dpConnectionState,
|
||||
nsString,
|
||||
BluetoothA2dpConnectionState,
|
||||
const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, BluetoothA2dpConnectionState, nsString,
|
||||
BluetoothA2dpConnectionState, const nsAString&>
|
||||
ConnectionStateNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
BluetoothA2dpAudioState,
|
||||
nsString,
|
||||
BluetoothA2dpAudioState,
|
||||
const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, BluetoothA2dpAudioState, nsString,
|
||||
BluetoothA2dpAudioState, const nsAString&>
|
||||
AudioStateNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<NotificationHandlerWrapper, void,
|
||||
nsString, uint32_t, uint8_t,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
NotificationHandlerWrapper, void, nsString, uint32_t, uint8_t,
|
||||
const nsAString&, uint32_t, uint8_t>
|
||||
AudioConfigNotification;
|
||||
|
||||
|
|
|
@ -1090,7 +1090,7 @@ void
|
|||
BluetoothDaemonAvrcpInterface::DispatchError(
|
||||
BluetoothAvrcpResultHandler* aRes, BluetoothStatus aStatus)
|
||||
{
|
||||
BluetoothResultRunnable1<BluetoothAvrcpResultHandler, void,
|
||||
DaemonResultRunnable1<BluetoothAvrcpResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>::Dispatch(
|
||||
aRes, &BluetoothAvrcpResultHandler::OnError,
|
||||
ConstantInitOp1<BluetoothStatus>(aStatus));
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
#include "mozilla/ipc/DaemonRunnables.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
|
@ -126,11 +127,12 @@ protected:
|
|||
// Responses
|
||||
//
|
||||
|
||||
typedef BluetoothResultRunnable0<BluetoothAvrcpResultHandler, void>
|
||||
typedef mozilla::ipc::DaemonResultRunnable0<
|
||||
BluetoothAvrcpResultHandler, void>
|
||||
ResultRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable1<BluetoothAvrcpResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>
|
||||
typedef mozilla::ipc::DaemonResultRunnable1<
|
||||
BluetoothAvrcpResultHandler, void, BluetoothStatus, BluetoothStatus>
|
||||
ErrorRunnable;
|
||||
|
||||
void ErrorRsp(const DaemonSocketPDUHeader& aHeader,
|
||||
|
@ -187,57 +189,61 @@ protected:
|
|||
|
||||
class NotificationHandlerWrapper;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
nsString, unsigned long,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, nsString, unsigned long,
|
||||
const nsAString&>
|
||||
RemoteFeatureNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable0<NotificationHandlerWrapper, void>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable0<
|
||||
NotificationHandlerWrapper, void>
|
||||
GetPlayStatusNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable0<NotificationHandlerWrapper, void>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable0<
|
||||
NotificationHandlerWrapper, void>
|
||||
ListPlayerAppAttrNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
BluetoothAvrcpPlayerAttribute>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable1<
|
||||
NotificationHandlerWrapper, void, BluetoothAvrcpPlayerAttribute>
|
||||
ListPlayerAppValuesNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
uint8_t, nsAutoArrayPtr<BluetoothAvrcpPlayerAttribute>,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, uint8_t,
|
||||
nsAutoArrayPtr<BluetoothAvrcpPlayerAttribute>,
|
||||
uint8_t, const BluetoothAvrcpPlayerAttribute*>
|
||||
GetPlayerAppValueNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
uint8_t, nsAutoArrayPtr<BluetoothAvrcpPlayerAttribute>,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, uint8_t,
|
||||
nsAutoArrayPtr<BluetoothAvrcpPlayerAttribute>,
|
||||
uint8_t, const BluetoothAvrcpPlayerAttribute*>
|
||||
GetPlayerAppAttrsTextNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<NotificationHandlerWrapper, void,
|
||||
uint8_t, uint8_t,
|
||||
nsAutoArrayPtr<uint8_t>, uint8_t,
|
||||
uint8_t, const uint8_t*>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
NotificationHandlerWrapper, void, uint8_t, uint8_t,
|
||||
nsAutoArrayPtr<uint8_t>, uint8_t, uint8_t, const uint8_t*>
|
||||
GetPlayerAppValuesTextNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
BluetoothAvrcpPlayerSettings,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable1<
|
||||
NotificationHandlerWrapper, void, BluetoothAvrcpPlayerSettings,
|
||||
const BluetoothAvrcpPlayerSettings&>
|
||||
SetPlayerAppValueNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
uint8_t, nsAutoArrayPtr<BluetoothAvrcpMediaAttribute>,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, uint8_t,
|
||||
nsAutoArrayPtr<BluetoothAvrcpMediaAttribute>,
|
||||
uint8_t, const BluetoothAvrcpMediaAttribute*>
|
||||
GetElementAttrNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
BluetoothAvrcpEvent, uint32_t>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, BluetoothAvrcpEvent, uint32_t>
|
||||
RegisterNotificationNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
uint8_t, uint8_t>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, uint8_t, uint8_t>
|
||||
VolumeChangeNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
int, int>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, int, int>
|
||||
PassthroughCmdNotification;
|
||||
|
||||
class GetElementAttrInitOp;
|
||||
|
|
|
@ -2964,7 +2964,7 @@ void
|
|||
BluetoothDaemonGattClientInterface::DispatchError(
|
||||
BluetoothGattClientResultHandler* aRes, BluetoothStatus aStatus)
|
||||
{
|
||||
BluetoothResultRunnable1<BluetoothGattClientResultHandler, void,
|
||||
DaemonResultRunnable1<BluetoothGattClientResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>::Dispatch(
|
||||
aRes, &BluetoothGattResultHandler::OnError,
|
||||
ConstantInitOp1<BluetoothStatus>(aStatus));
|
||||
|
@ -2986,7 +2986,7 @@ void
|
|||
BluetoothDaemonGattServerInterface::DispatchError(
|
||||
BluetoothGattServerResultHandler* aRes, BluetoothStatus aStatus)
|
||||
{
|
||||
BluetoothResultRunnable1<BluetoothGattServerResultHandler, void,
|
||||
DaemonResultRunnable1<BluetoothGattServerResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>::Dispatch(
|
||||
aRes, &BluetoothGattResultHandler::OnError,
|
||||
ConstantInitOp1<BluetoothStatus>(aStatus));
|
||||
|
@ -3008,7 +3008,7 @@ void
|
|||
BluetoothDaemonGattInterface::DispatchError(
|
||||
BluetoothGattResultHandler* aRes, BluetoothStatus aStatus)
|
||||
{
|
||||
BluetoothResultRunnable1<BluetoothGattResultHandler, void,
|
||||
DaemonResultRunnable1<BluetoothGattResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>::Dispatch(
|
||||
aRes, &BluetoothGattResultHandler::OnError,
|
||||
ConstantInitOp1<BluetoothStatus>(aStatus));
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
#include "mozilla/ipc/DaemonRunnables.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
|
@ -313,21 +314,25 @@ protected:
|
|||
// Responses
|
||||
//
|
||||
|
||||
typedef BluetoothResultRunnable0<BluetoothGattClientResultHandler, void>
|
||||
typedef mozilla::ipc::DaemonResultRunnable0<
|
||||
BluetoothGattClientResultHandler, void>
|
||||
ClientResultRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable1<BluetoothGattClientResultHandler, void,
|
||||
typedef mozilla::ipc::DaemonResultRunnable1<
|
||||
BluetoothGattClientResultHandler, void,
|
||||
BluetoothTypeOfDevice, BluetoothTypeOfDevice>
|
||||
ClientGetDeviceTypeResultRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable0<BluetoothGattServerResultHandler, void>
|
||||
typedef mozilla::ipc::DaemonResultRunnable0<
|
||||
BluetoothGattServerResultHandler, void>
|
||||
ServerResultRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable0<BluetoothGattResultHandler, void>
|
||||
typedef mozilla::ipc::DaemonResultRunnable0<
|
||||
BluetoothGattResultHandler, void>
|
||||
ResultRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable1<BluetoothGattResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>
|
||||
typedef mozilla::ipc::DaemonResultRunnable1<
|
||||
BluetoothGattResultHandler, void, BluetoothStatus, BluetoothStatus>
|
||||
ErrorRunnable;
|
||||
|
||||
void ErrorRsp(const DaemonSocketPDUHeader& aHeader,
|
||||
|
@ -488,42 +493,42 @@ protected:
|
|||
class ClientNotificationHandlerWrapper;
|
||||
class ServerNotificationHandlerWrapper;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
BluetoothGattStatus, int, BluetoothUuid,
|
||||
BluetoothGattStatus, int, const BluetoothUuid&>
|
||||
ClientRegisterNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
nsString, int, BluetoothGattAdvData,
|
||||
const nsAString&, int, const BluetoothGattAdvData&>
|
||||
ClientScanResultNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable4<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable4<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattStatus, int, nsString,
|
||||
int, BluetoothGattStatus, int, const nsAString&>
|
||||
ClientConnectNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable4<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable4<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattStatus, int, nsString,
|
||||
int, BluetoothGattStatus, int, const nsAString&>
|
||||
ClientDisconnectNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattStatus>
|
||||
ClientSearchCompleteNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattServiceId,
|
||||
int, const BluetoothGattServiceId&>
|
||||
ClientSearchResultNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable5<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable5<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattStatus, BluetoothGattServiceId,
|
||||
BluetoothGattId, BluetoothGattCharProp,
|
||||
|
@ -531,7 +536,7 @@ protected:
|
|||
const BluetoothGattId&, const BluetoothGattCharProp&>
|
||||
ClientGetCharacteristicNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable5<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable5<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattStatus, BluetoothGattServiceId,
|
||||
BluetoothGattId, BluetoothGattId,
|
||||
|
@ -539,14 +544,14 @@ protected:
|
|||
const BluetoothGattId&, const BluetoothGattId&>
|
||||
ClientGetDescriptorNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable4<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable4<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattStatus, BluetoothGattServiceId, BluetoothGattServiceId,
|
||||
int, BluetoothGattStatus, const BluetoothGattServiceId&,
|
||||
const BluetoothGattServiceId&>
|
||||
ClientGetIncludedServiceNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable5<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable5<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, int, BluetoothGattStatus,
|
||||
BluetoothGattServiceId, BluetoothGattId,
|
||||
|
@ -554,121 +559,121 @@ protected:
|
|||
const BluetoothGattServiceId&, const BluetoothGattId&>
|
||||
ClientRegisterNotificationNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattNotifyParam,
|
||||
int, const BluetoothGattNotifyParam&>
|
||||
ClientNotifyNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattStatus, BluetoothGattReadParam,
|
||||
int, BluetoothGattStatus, const BluetoothGattReadParam&>
|
||||
ClientReadCharacteristicNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattStatus, BluetoothGattWriteParam,
|
||||
int, BluetoothGattStatus, const BluetoothGattWriteParam&>
|
||||
ClientWriteCharacteristicNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattStatus, BluetoothGattReadParam,
|
||||
int, BluetoothGattStatus, const BluetoothGattReadParam&>
|
||||
ClientReadDescriptorNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattStatus, BluetoothGattWriteParam,
|
||||
int, BluetoothGattStatus, const BluetoothGattWriteParam&>
|
||||
ClientWriteDescriptorNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, BluetoothGattStatus>
|
||||
ClientExecuteWriteNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable4<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable4<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
int, nsString, int, BluetoothGattStatus,
|
||||
int, const nsAString&, int, BluetoothGattStatus>
|
||||
ClientReadRemoteRssiNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
ClientNotificationHandlerWrapper, void,
|
||||
BluetoothGattStatus, int>
|
||||
ClientListenNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
BluetoothGattStatus, int, BluetoothUuid,
|
||||
BluetoothGattStatus, int, const BluetoothUuid&>
|
||||
ServerRegisterNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable4<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable4<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
int, int, bool, nsString,
|
||||
int, int, bool, const nsAString&>
|
||||
ServerConnectionNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable4<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable4<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
BluetoothGattStatus, int, BluetoothGattServiceId, int,
|
||||
BluetoothGattStatus, int, const BluetoothGattServiceId&, int>
|
||||
ServerServiceAddedNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable4<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable4<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
BluetoothGattStatus, int, int, int>
|
||||
ServerIncludedServiceAddedNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable5<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable5<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
BluetoothGattStatus, int, BluetoothUuid, int, int,
|
||||
BluetoothGattStatus, int, const BluetoothUuid&, int, int>
|
||||
ServerCharacteristicAddedNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable5<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable5<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
BluetoothGattStatus, int, BluetoothUuid, int, int,
|
||||
BluetoothGattStatus, int, const BluetoothUuid&, int, int>
|
||||
ServerDescriptorAddedNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
BluetoothGattStatus, int, int>
|
||||
ServerServiceStartedNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
BluetoothGattStatus, int, int>
|
||||
ServerServiceStoppedNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
BluetoothGattStatus, int, int>
|
||||
ServerServiceDeletedNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable6<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable6<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
int, int, nsString, int, int, bool,
|
||||
int, int, const nsAString&, int, int, bool>
|
||||
ServerRequestReadNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable9<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable9<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
int, int, nsString, int, int, int, nsAutoArrayPtr<uint8_t>, bool, bool,
|
||||
int, int, const nsAString&, int, int, int, const uint8_t*, bool, bool>
|
||||
ServerRequestWriteNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable4<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable4<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
int, int, nsString, bool,
|
||||
int, int, const nsAString&, bool>
|
||||
ServerRequestExecuteWriteNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
ServerNotificationHandlerWrapper, void,
|
||||
BluetoothGattStatus, int>
|
||||
ServerResponseConfirmationNotification;
|
||||
|
|
|
@ -1799,7 +1799,7 @@ void
|
|||
BluetoothDaemonHandsfreeInterface::DispatchError(
|
||||
BluetoothHandsfreeResultHandler* aRes, BluetoothStatus aStatus)
|
||||
{
|
||||
BluetoothResultRunnable1<BluetoothHandsfreeResultHandler, void,
|
||||
DaemonResultRunnable1<BluetoothHandsfreeResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>::Dispatch(
|
||||
aRes, &BluetoothHandsfreeResultHandler::OnError,
|
||||
ConstantInitOp1<BluetoothStatus>(aStatus));
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
#include "mozilla/ipc/DaemonRunnables.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
|
@ -135,11 +136,12 @@ protected:
|
|||
// Responses
|
||||
//
|
||||
|
||||
typedef BluetoothResultRunnable0<BluetoothHandsfreeResultHandler, void>
|
||||
typedef mozilla::ipc::DaemonResultRunnable0<
|
||||
BluetoothHandsfreeResultHandler, void>
|
||||
ResultRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable1<BluetoothHandsfreeResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>
|
||||
typedef mozilla::ipc::DaemonResultRunnable1<
|
||||
BluetoothHandsfreeResultHandler, void, BluetoothStatus, BluetoothStatus>
|
||||
ErrorRunnable;
|
||||
|
||||
void ErrorRsp(const DaemonSocketPDUHeader& aHeader,
|
||||
|
@ -216,88 +218,76 @@ protected:
|
|||
|
||||
class NotificationHandlerWrapper;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
BluetoothHandsfreeConnectionState,
|
||||
nsString,
|
||||
BluetoothHandsfreeConnectionState,
|
||||
const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, BluetoothHandsfreeConnectionState,
|
||||
nsString, BluetoothHandsfreeConnectionState, const nsAString&>
|
||||
ConnectionStateNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
BluetoothHandsfreeAudioState,
|
||||
nsString,
|
||||
BluetoothHandsfreeAudioState,
|
||||
const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, BluetoothHandsfreeAudioState,
|
||||
nsString, BluetoothHandsfreeAudioState, const nsAString&>
|
||||
AudioStateNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
BluetoothHandsfreeVoiceRecognitionState, nsString,
|
||||
BluetoothHandsfreeVoiceRecognitionState, const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, BluetoothHandsfreeVoiceRecognitionState,
|
||||
nsString, BluetoothHandsfreeVoiceRecognitionState, const nsAString&>
|
||||
VoiceRecognitionNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
nsString,
|
||||
const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable1<
|
||||
NotificationHandlerWrapper, void, nsString, const nsAString&>
|
||||
AnswerCallNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
nsString,
|
||||
const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable1<
|
||||
NotificationHandlerWrapper, void, nsString, const nsAString&>
|
||||
HangupCallNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<NotificationHandlerWrapper, void,
|
||||
BluetoothHandsfreeVolumeType, int, nsString,
|
||||
BluetoothHandsfreeVolumeType, int, const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
NotificationHandlerWrapper, void, BluetoothHandsfreeVolumeType,
|
||||
int, nsString, BluetoothHandsfreeVolumeType, int, const nsAString&>
|
||||
VolumeNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
nsString, nsString,
|
||||
const nsAString&, const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, nsString, nsString, const nsAString&,
|
||||
const nsAString&>
|
||||
DialCallNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
char, nsString,
|
||||
char, const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, char, nsString, char, const nsAString&>
|
||||
DtmfNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
BluetoothHandsfreeNRECState, nsString,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, BluetoothHandsfreeNRECState, nsString,
|
||||
BluetoothHandsfreeNRECState, const nsAString&>
|
||||
NRECNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
BluetoothHandsfreeCallHoldType, nsString,
|
||||
BluetoothHandsfreeCallHoldType, const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, BluetoothHandsfreeCallHoldType,
|
||||
nsString, BluetoothHandsfreeCallHoldType, const nsAString&>
|
||||
CallHoldNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
nsString,
|
||||
const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable1<
|
||||
NotificationHandlerWrapper, void, nsString, const nsAString&>
|
||||
CnumNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
nsString,
|
||||
const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable1<
|
||||
NotificationHandlerWrapper, void, nsString, const nsAString&>
|
||||
CindNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
nsString,
|
||||
const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable1<
|
||||
NotificationHandlerWrapper, void, nsString, const nsAString&>
|
||||
CopsNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
nsString,
|
||||
const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable1<
|
||||
NotificationHandlerWrapper, void, nsString, const nsAString&>
|
||||
ClccNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
nsCString, nsString,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, nsCString, nsString,
|
||||
const nsACString&, const nsAString&>
|
||||
UnknownAtNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
nsString,
|
||||
const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable1<
|
||||
NotificationHandlerWrapper, void, nsString, const nsAString&>
|
||||
KeyPressedNotification;
|
||||
|
||||
class ConnectionStateInitOp;
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "BluetoothDaemonSetupInterface.h"
|
||||
#include "BluetoothDaemonSocketInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
#include "mozilla/ipc/DaemonRunnables.h"
|
||||
#include "mozilla/ipc/DaemonSocket.h"
|
||||
#include "mozilla/ipc/ListenSocket.h"
|
||||
#include "mozilla/unused.h"
|
||||
|
@ -147,11 +148,12 @@ private:
|
|||
// Responses
|
||||
//
|
||||
|
||||
typedef BluetoothResultRunnable0<BluetoothSetupResultHandler, void>
|
||||
typedef mozilla::ipc::DaemonResultRunnable0<
|
||||
BluetoothSetupResultHandler, void>
|
||||
ResultRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable1<BluetoothSetupResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>
|
||||
typedef mozilla::ipc::DaemonResultRunnable1<
|
||||
BluetoothSetupResultHandler, void, BluetoothStatus, BluetoothStatus>
|
||||
ErrorRunnable;
|
||||
|
||||
void
|
||||
|
@ -619,11 +621,12 @@ private:
|
|||
// Responses
|
||||
//
|
||||
|
||||
typedef BluetoothResultRunnable0<BluetoothResultHandler, void>
|
||||
typedef mozilla::ipc::DaemonResultRunnable0<
|
||||
BluetoothResultHandler, void>
|
||||
ResultRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable1<BluetoothResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>
|
||||
typedef mozilla::ipc::DaemonResultRunnable1<
|
||||
BluetoothResultHandler, void, BluetoothStatus, BluetoothStatus>
|
||||
ErrorRunnable;
|
||||
|
||||
void ErrorRsp(const DaemonSocketPDUHeader& aHeader,
|
||||
|
@ -881,63 +884,58 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
bool>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable1<
|
||||
NotificationHandlerWrapper, void, bool>
|
||||
AdapterStateChangedNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<NotificationHandlerWrapper, void,
|
||||
BluetoothStatus, int,
|
||||
nsAutoArrayPtr<BluetoothProperty>,
|
||||
BluetoothStatus, int,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
NotificationHandlerWrapper, void, BluetoothStatus, int,
|
||||
nsAutoArrayPtr<BluetoothProperty>, BluetoothStatus, int,
|
||||
const BluetoothProperty*>
|
||||
AdapterPropertiesNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable4<NotificationHandlerWrapper, void,
|
||||
BluetoothStatus, nsString, int,
|
||||
nsAutoArrayPtr<BluetoothProperty>,
|
||||
BluetoothStatus, const nsAString&,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable4<
|
||||
NotificationHandlerWrapper, void, BluetoothStatus, nsString, int,
|
||||
nsAutoArrayPtr<BluetoothProperty>, BluetoothStatus, const nsAString&,
|
||||
int, const BluetoothProperty*>
|
||||
RemoteDevicePropertiesNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
int,
|
||||
nsAutoArrayPtr<BluetoothProperty>,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, int, nsAutoArrayPtr<BluetoothProperty>,
|
||||
int, const BluetoothProperty*>
|
||||
DeviceFoundNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable1<NotificationHandlerWrapper, void,
|
||||
bool>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable1<
|
||||
NotificationHandlerWrapper, void, bool>
|
||||
DiscoveryStateChangedNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<NotificationHandlerWrapper, void,
|
||||
nsString, nsString, uint32_t,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
NotificationHandlerWrapper, void, nsString, nsString, uint32_t,
|
||||
const nsAString&, const nsAString&>
|
||||
PinRequestNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable5<NotificationHandlerWrapper, void,
|
||||
nsString, nsString, uint32_t,
|
||||
BluetoothSspVariant, uint32_t,
|
||||
const nsAString&, const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable5<
|
||||
NotificationHandlerWrapper, void, nsString, nsString, uint32_t,
|
||||
BluetoothSspVariant, uint32_t, const nsAString&, const nsAString&>
|
||||
SspRequestNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<NotificationHandlerWrapper, void,
|
||||
BluetoothStatus, nsString,
|
||||
BluetoothBondState,
|
||||
BluetoothStatus, const nsAString&>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
NotificationHandlerWrapper, void, BluetoothStatus, nsString,
|
||||
BluetoothBondState, BluetoothStatus, const nsAString&>
|
||||
BondStateChangedNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<NotificationHandlerWrapper, void,
|
||||
BluetoothStatus, nsString, bool,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
NotificationHandlerWrapper, void, BluetoothStatus, nsString, bool,
|
||||
BluetoothStatus, const nsAString&>
|
||||
AclStateChangedNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable3<NotificationHandlerWrapper, void,
|
||||
uint16_t, nsAutoArrayPtr<uint8_t>,
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable3<
|
||||
NotificationHandlerWrapper, void, uint16_t, nsAutoArrayPtr<uint8_t>,
|
||||
uint8_t, uint16_t, const uint8_t*>
|
||||
DutModeRecvNotification;
|
||||
|
||||
typedef BluetoothNotificationRunnable2<NotificationHandlerWrapper, void,
|
||||
BluetoothStatus, uint16_t>
|
||||
typedef mozilla::ipc::DaemonNotificationRunnable2<
|
||||
NotificationHandlerWrapper, void, BluetoothStatus, uint16_t>
|
||||
LeTestModeNotification;
|
||||
|
||||
void AdapterStateChangedNtf(const DaemonSocketPDUHeader& aHeader,
|
||||
|
@ -2241,7 +2239,7 @@ void
|
|||
BluetoothDaemonInterface::DispatchError(BluetoothResultHandler* aRes,
|
||||
BluetoothStatus aStatus)
|
||||
{
|
||||
BluetoothResultRunnable1<
|
||||
DaemonResultRunnable1<
|
||||
BluetoothResultHandler, void, BluetoothStatus, BluetoothStatus>::Dispatch(
|
||||
aRes, &BluetoothResultHandler::OnError,
|
||||
ConstantInitOp1<BluetoothStatus>(aStatus));
|
||||
|
|
|
@ -366,7 +366,7 @@ void
|
|||
BluetoothDaemonSocketInterface::DispatchError(
|
||||
BluetoothSocketResultHandler* aRes, BluetoothStatus aStatus)
|
||||
{
|
||||
BluetoothResultRunnable1<BluetoothSocketResultHandler, void,
|
||||
DaemonResultRunnable1<BluetoothSocketResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>::Dispatch(
|
||||
aRes, &BluetoothSocketResultHandler::OnError,
|
||||
ConstantInitOp1<BluetoothStatus>(aStatus));
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "BluetoothDaemonHelpers.h"
|
||||
#include "BluetoothInterface.h"
|
||||
#include "BluetoothInterfaceHelpers.h"
|
||||
#include "mozilla/ipc/DaemonRunnables.h"
|
||||
|
||||
BEGIN_BLUETOOTH_NAMESPACE
|
||||
|
||||
|
@ -58,20 +59,21 @@ private:
|
|||
// Responses
|
||||
//
|
||||
|
||||
typedef BluetoothResultRunnable0<BluetoothSocketResultHandler, void>
|
||||
typedef mozilla::ipc::DaemonResultRunnable0<
|
||||
BluetoothSocketResultHandler, void>
|
||||
ResultRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable1<BluetoothSocketResultHandler, void,
|
||||
int, int>
|
||||
typedef mozilla::ipc::DaemonResultRunnable1<
|
||||
BluetoothSocketResultHandler, void, int, int>
|
||||
IntResultRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable1<BluetoothSocketResultHandler, void,
|
||||
BluetoothStatus, BluetoothStatus>
|
||||
typedef mozilla::ipc::DaemonResultRunnable1<
|
||||
BluetoothSocketResultHandler, void, BluetoothStatus, BluetoothStatus>
|
||||
ErrorRunnable;
|
||||
|
||||
typedef BluetoothResultRunnable3<BluetoothSocketResultHandler, void,
|
||||
int, nsString, int,
|
||||
int, const nsAString_internal&, int>
|
||||
typedef mozilla::ipc::DaemonResultRunnable3<
|
||||
BluetoothSocketResultHandler, void, int, nsString, int, int,
|
||||
const nsAString_internal&, int>
|
||||
IntStringIntResultRunnable;
|
||||
|
||||
void ErrorRsp(const DaemonSocketPDUHeader& aHeader,
|
||||
|
|
Загрузка…
Ссылка в новой задаче