| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ |
| 6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ | 6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 virtual ~Observer(); | 22 virtual ~Observer(); |
| 23 | 23 |
| 24 MOCK_METHOD2(AdapterPresentChanged, void(BluetoothAdapter*, bool)); | 24 MOCK_METHOD2(AdapterPresentChanged, void(BluetoothAdapter*, bool)); |
| 25 MOCK_METHOD2(AdapterPoweredChanged, void(BluetoothAdapter*, bool)); | 25 MOCK_METHOD2(AdapterPoweredChanged, void(BluetoothAdapter*, bool)); |
| 26 MOCK_METHOD2(AdapterDiscoveringChanged, void(BluetoothAdapter*, bool)); | 26 MOCK_METHOD2(AdapterDiscoveringChanged, void(BluetoothAdapter*, bool)); |
| 27 MOCK_METHOD2(DeviceAdded, void(BluetoothAdapter*, BluetoothDevice*)); | 27 MOCK_METHOD2(DeviceAdded, void(BluetoothAdapter*, BluetoothDevice*)); |
| 28 MOCK_METHOD2(DeviceChanged, void(BluetoothAdapter*, BluetoothDevice*)); | 28 MOCK_METHOD2(DeviceChanged, void(BluetoothAdapter*, BluetoothDevice*)); |
| 29 MOCK_METHOD2(DeviceRemoved, void(BluetoothAdapter*, BluetoothDevice*)); | 29 MOCK_METHOD2(DeviceRemoved, void(BluetoothAdapter*, BluetoothDevice*)); |
| 30 }; | 30 }; |
| 31 | 31 |
| 32 MockBluetoothAdapter(const std::string& address, const std::string& name); | 32 MockBluetoothAdapter(); |
| 33 | 33 |
| 34 MOCK_METHOD1(AddObserver, void(BluetoothAdapter::Observer*)); | 34 MOCK_METHOD1(AddObserver, void(BluetoothAdapter::Observer*)); |
| 35 MOCK_METHOD1(RemoveObserver, void(BluetoothAdapter::Observer*)); | 35 MOCK_METHOD1(RemoveObserver, void(BluetoothAdapter::Observer*)); |
| 36 MOCK_CONST_METHOD0(address, std::string()); |
| 37 MOCK_CONST_METHOD0(name, std::string()); |
| 36 MOCK_CONST_METHOD0(IsInitialized, bool()); | 38 MOCK_CONST_METHOD0(IsInitialized, bool()); |
| 37 MOCK_CONST_METHOD0(IsPresent, bool()); | 39 MOCK_CONST_METHOD0(IsPresent, bool()); |
| 38 MOCK_CONST_METHOD0(IsPowered, bool()); | 40 MOCK_CONST_METHOD0(IsPowered, bool()); |
| 39 MOCK_METHOD3(SetPowered, | 41 MOCK_METHOD3(SetPowered, |
| 40 void(bool discovering, | 42 void(bool discovering, |
| 41 const base::Closure& callback, | 43 const base::Closure& callback, |
| 42 const ErrorCallback& error_callback)); | 44 const ErrorCallback& error_callback)); |
| 43 MOCK_CONST_METHOD0(IsDiscovering, bool()); | 45 MOCK_CONST_METHOD0(IsDiscovering, bool()); |
| 44 MOCK_METHOD2(StartDiscovering, | 46 MOCK_METHOD2(StartDiscovering, |
| 45 void(const base::Closure& callback, | 47 void(const base::Closure& callback, |
| 46 const ErrorCallback& error_callback)); | 48 const ErrorCallback& error_callback)); |
| 47 MOCK_METHOD2(StopDiscovering, | 49 MOCK_METHOD2(StopDiscovering, |
| 48 void(const base::Closure& callback, | 50 void(const base::Closure& callback, |
| 49 const ErrorCallback& error_callback)); | 51 const ErrorCallback& error_callback)); |
| 50 MOCK_CONST_METHOD0(GetDevices, BluetoothAdapter::ConstDeviceList()); | 52 MOCK_CONST_METHOD0(GetDevices, BluetoothAdapter::ConstDeviceList()); |
| 51 MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address)); | 53 MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address)); |
| 52 MOCK_CONST_METHOD1(GetDevice, | 54 MOCK_CONST_METHOD1(GetDevice, |
| 53 const BluetoothDevice*(const std::string& address)); | 55 const BluetoothDevice*(const std::string& address)); |
| 54 MOCK_METHOD2( | 56 MOCK_METHOD2( |
| 55 ReadLocalOutOfBandPairingData, | 57 ReadLocalOutOfBandPairingData, |
| 56 void(const BluetoothOutOfBandPairingDataCallback& callback, | 58 void(const BluetoothOutOfBandPairingDataCallback& callback, |
| 57 const ErrorCallback& error_callback)); | 59 const ErrorCallback& error_callback)); |
| 58 protected: | 60 protected: |
| 59 virtual ~MockBluetoothAdapter(); | 61 virtual ~MockBluetoothAdapter(); |
| 60 }; | 62 }; |
| 61 | 63 |
| 62 } // namespace device | 64 } // namespace device |
| 63 | 65 |
| 64 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ | 66 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ |
| OLD | NEW |