Upstream version 7.36.149.0
[platform/framework/web/crosswalk.git] / src / device / bluetooth / test / mock_bluetooth_device.h
index 7c20c00..e624f9a 100644 (file)
@@ -10,6 +10,7 @@
 #include "base/strings/string16.h"
 #include "device/bluetooth/bluetooth_device.h"
 #include "device/bluetooth/bluetooth_out_of_band_pairing_data.h"
+#include "device/bluetooth/bluetooth_uuid.h"
 #include "testing/gmock/include/gmock/gmock.h"
 
 namespace device {
@@ -26,6 +27,8 @@ class MockBluetoothDevice : public BluetoothDevice {
                       bool connected);
   virtual ~MockBluetoothDevice();
 
+  MOCK_METHOD1(AddObserver, void(BluetoothDevice::Observer*));
+  MOCK_METHOD1(RemoveObserver, void(BluetoothDevice::Observer*));
   MOCK_CONST_METHOD0(GetBluetoothClass, uint32());
   MOCK_CONST_METHOD0(GetDeviceName, std::string());
   MOCK_CONST_METHOD0(GetAddress, std::string());
@@ -35,6 +38,9 @@ class MockBluetoothDevice : public BluetoothDevice {
   MOCK_CONST_METHOD0(GetDeviceID, uint16());
   MOCK_CONST_METHOD0(GetName, base::string16());
   MOCK_CONST_METHOD0(GetDeviceType, BluetoothDevice::DeviceType());
+  MOCK_CONST_METHOD0(GetRSSI, int());
+  MOCK_CONST_METHOD0(GetCurrentHostTransmitPower, int());
+  MOCK_CONST_METHOD0(GetMaximumHostTransmitPower, int());
   MOCK_CONST_METHOD0(IsPaired, bool());
   MOCK_CONST_METHOD0(IsConnected, bool());
   MOCK_CONST_METHOD0(IsConnectable, bool());
@@ -57,13 +63,14 @@ class MockBluetoothDevice : public BluetoothDevice {
                void(const base::Closure& callback,
                     const BluetoothDevice::ErrorCallback& error_callback));
   MOCK_METHOD1(Forget, void(const BluetoothDevice::ErrorCallback&));
-  MOCK_METHOD2(ConnectToService,
-               void(const std::string&,
-                    const BluetoothDevice::SocketCallback&));
   MOCK_METHOD3(ConnectToProfile,
-               void(BluetoothProfile*,
-                    const base::Closure&,
-                    const BluetoothDevice::ErrorCallback&));
+               void(BluetoothProfile* profile,
+                    const base::Closure& callback,
+                    const ConnectToProfileErrorCallback& error_callback));
+  MOCK_METHOD3(ConnectToService,
+               void(const BluetoothUUID& uuid,
+                    const ConnectToServiceCallback& callback,
+                    const ConnectToServiceErrorCallback& error_callback));
 
   MOCK_METHOD3(SetOutOfBandPairingData,
       void(const BluetoothOutOfBandPairingData& data,
@@ -72,6 +79,12 @@ class MockBluetoothDevice : public BluetoothDevice {
   MOCK_METHOD2(ClearOutOfBandPairingData,
       void(const base::Closure& callback,
            const BluetoothDevice::ErrorCallback& error_callback));
+  MOCK_METHOD2(StartConnectionMonitor,
+               void(const base::Closure& callback,
+                    const BluetoothDevice::ErrorCallback& error_callback));
+
+  MOCK_CONST_METHOD0(GetGattServices, std::vector<BluetoothGattService*>());
+  MOCK_CONST_METHOD1(GetGattService, BluetoothGattService*(const std::string&));
 
  private:
   uint32 bluetooth_class_;