Bug 1203092: Inherit Bluetooth result handlers from |DaemonSocketResultHandler|, r=shuang
☠☠ backed out by 2ead1d29f1b2 ☠ ☠
authorThomas Zimmermann <tdz@users.sourceforge.net>
Tue, 15 Sep 2015 10:38:13 +0200
changeset 295181 e682d4ccb6a59646a39cc6fe8b345bc7dff54877
parent 295180 23cb9eb406f93e5df11ebbb1edb26c30fa48a959
child 295182 bed325ace3688ccf8da0a35177f76026a1bced23
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersshuang
bugs1203092
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1203092: Inherit Bluetooth result handlers from |DaemonSocketResultHandler|, r=shuang
dom/bluetooth/bluedroid/BluetoothDaemonSetupInterface.h
dom/bluetooth/common/BluetoothInterface.h
--- a/dom/bluetooth/bluedroid/BluetoothDaemonSetupInterface.h
+++ b/dom/bluetooth/bluedroid/BluetoothDaemonSetupInterface.h
@@ -3,24 +3,24 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSetupInterface_h
 #define mozilla_dom_bluetooth_bluedroid_BluetoothDaemonSetupInterface_h
 
 #include "BluetoothCommon.h"
+#include "mozilla/ipc/DaemonSocketMessageHandlers.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 class BluetoothSetupResultHandler
+  : public mozilla::ipc::DaemonSocketResultHandler
 {
 public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BluetoothSetupResultHandler)
-
   virtual void OnError(BluetoothStatus aStatus);
   virtual void RegisterModule();
   virtual void UnregisterModule();
   virtual void Configuration();
 
 protected:
   virtual ~BluetoothSetupResultHandler();
 };
--- a/dom/bluetooth/common/BluetoothInterface.h
+++ b/dom/bluetooth/common/BluetoothInterface.h
@@ -4,28 +4,28 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this file,
  * You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef mozilla_dom_bluetooth_BluetoothInterface_h
 #define mozilla_dom_bluetooth_BluetoothInterface_h
 
 #include "BluetoothCommon.h"
 #include "mozilla/dom/bluetooth/BluetoothTypes.h"
+#include "mozilla/ipc/DaemonSocketMessageHandlers.h"
 
 BEGIN_BLUETOOTH_NAMESPACE
 
 //
 // Socket Interface
 //
 
 class BluetoothSocketResultHandler
+  : public mozilla::ipc::DaemonSocketResultHandler
 {
 public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BluetoothSocketResultHandler)
-
   virtual void OnError(BluetoothStatus aStatus)
   {
     BT_WARNING("Received error code %d", (int)aStatus);
   }
 
   virtual void Listen(int aSockFd) { }
   virtual void Connect(int aSockFd, const nsAString& aBdAddress,
                        int aConnectionState) { }
@@ -150,20 +150,19 @@ public:
 protected:
   BluetoothHandsfreeNotificationHandler()
   { }
 
   virtual ~BluetoothHandsfreeNotificationHandler();
 };
 
 class BluetoothHandsfreeResultHandler
+  : public mozilla::ipc::DaemonSocketResultHandler
 {
 public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BluetoothHandsfreeResultHandler)
-
   virtual void OnError(BluetoothStatus aStatus)
   {
     BT_WARNING("Received error code %d", (int)aStatus);
   }
 
   virtual void Init() { }
   virtual void Cleanup() { }
 
@@ -298,20 +297,19 @@ public:
 protected:
   BluetoothA2dpNotificationHandler()
   { }
 
   virtual ~BluetoothA2dpNotificationHandler();
 };
 
 class BluetoothA2dpResultHandler
+  : public mozilla::ipc::DaemonSocketResultHandler
 {
 public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BluetoothA2dpResultHandler)
-
   virtual void OnError(BluetoothStatus aStatus)
   {
     BT_WARNING("Received error code %d", (int)aStatus);
   }
 
   virtual void Init() { }
   virtual void Cleanup() { }
   virtual void Connect() { }
@@ -401,20 +399,19 @@ public:
 protected:
   BluetoothAvrcpNotificationHandler()
   { }
 
   virtual ~BluetoothAvrcpNotificationHandler();
 };
 
 class BluetoothAvrcpResultHandler
+  : public mozilla::ipc::DaemonSocketResultHandler
 {
 public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BluetoothAvrcpResultHandler)
-
   virtual void OnError(BluetoothStatus aStatus)
   {
     BT_WARNING("Received error code %d", (int)aStatus);
   }
 
   virtual void Init() { }
   virtual void Cleanup() { }
 
@@ -715,20 +712,19 @@ public:
 protected:
   BluetoothGattNotificationHandler()
   { }
 
   virtual ~BluetoothGattNotificationHandler();
 };
 
 class BluetoothGattResultHandler
+  : public mozilla::ipc::DaemonSocketResultHandler
 {
 public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BluetoothGattResultHandler)
-
   virtual void OnError(BluetoothStatus aStatus)
   {
     BT_WARNING("Received error code %d", (int)aStatus);
   }
 
   virtual void Init() { }
   virtual void Cleanup() { }
 
@@ -1043,20 +1039,19 @@ public:
 protected:
   BluetoothNotificationHandler()
   { }
 
   virtual ~BluetoothNotificationHandler();
 };
 
 class BluetoothResultHandler
+  : public mozilla::ipc::DaemonSocketResultHandler
 {
 public:
-  NS_INLINE_DECL_THREADSAFE_REFCOUNTING(BluetoothResultHandler)
-
   virtual void OnError(BluetoothStatus aStatus)
   {
     BT_LOGR("Received error code %d", aStatus);
   }
 
   virtual void Init() { }
   virtual void Cleanup() { }
   virtual void Enable() { }