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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 MOCK_METHOD3(SetPowered, | 45 MOCK_METHOD3(SetPowered, |
46 void(bool powered, | 46 void(bool powered, |
47 const base::Closure& callback, | 47 const base::Closure& callback, |
48 const ErrorCallback& error_callback)); | 48 const ErrorCallback& error_callback)); |
49 MOCK_CONST_METHOD0(IsDiscoverable, bool()); | 49 MOCK_CONST_METHOD0(IsDiscoverable, bool()); |
50 MOCK_METHOD3(SetDiscoverable, | 50 MOCK_METHOD3(SetDiscoverable, |
51 void(bool discoverable, | 51 void(bool discoverable, |
52 const base::Closure& callback, | 52 const base::Closure& callback, |
53 const ErrorCallback& error_callback)); | 53 const ErrorCallback& error_callback)); |
54 MOCK_CONST_METHOD0(IsDiscovering, bool()); | 54 MOCK_CONST_METHOD0(IsDiscovering, bool()); |
55 MOCK_METHOD2(StartDiscoverySession, | |
56 void(const DiscoverySessionCallback& callback, | |
57 const ErrorCallback& error_callback)); | |
58 MOCK_METHOD2(StartDiscovering, | 55 MOCK_METHOD2(StartDiscovering, |
59 void(const base::Closure& callback, | 56 void(const base::Closure& callback, |
60 const ErrorCallback& error_callback)); | 57 const ErrorCallback& error_callback)); |
61 MOCK_METHOD2(StopDiscovering, | 58 MOCK_METHOD2(StopDiscovering, |
62 void(const base::Closure& callback, | 59 void(const base::Closure& callback, |
63 const ErrorCallback& error_callback)); | 60 const ErrorCallback& error_callback)); |
64 MOCK_CONST_METHOD0(GetDevices, BluetoothAdapter::ConstDeviceList()); | 61 MOCK_CONST_METHOD0(GetDevices, BluetoothAdapter::ConstDeviceList()); |
65 MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address)); | 62 MOCK_METHOD1(GetDevice, BluetoothDevice*(const std::string& address)); |
66 MOCK_CONST_METHOD1(GetDevice, | 63 MOCK_CONST_METHOD1(GetDevice, |
67 const BluetoothDevice*(const std::string& address)); | 64 const BluetoothDevice*(const std::string& address)); |
68 MOCK_METHOD2( | 65 MOCK_METHOD2( |
69 ReadLocalOutOfBandPairingData, | 66 ReadLocalOutOfBandPairingData, |
70 void(const BluetoothOutOfBandPairingDataCallback& callback, | 67 void(const BluetoothOutOfBandPairingDataCallback& callback, |
71 const ErrorCallback& error_callback)); | 68 const ErrorCallback& error_callback)); |
72 MOCK_METHOD2(AddPairingDelegate, | 69 MOCK_METHOD2(AddPairingDelegate, |
73 void(BluetoothDevice::PairingDelegate* pairing_delegate, | 70 void(BluetoothDevice::PairingDelegate* pairing_delegate, |
74 enum PairingDelegatePriority priority)); | 71 enum PairingDelegatePriority priority)); |
75 MOCK_METHOD1(RemovePairingDelegate, | 72 MOCK_METHOD1(RemovePairingDelegate, |
76 void(BluetoothDevice::PairingDelegate* pairing_delegate)); | 73 void(BluetoothDevice::PairingDelegate* pairing_delegate)); |
77 MOCK_METHOD0(DefaultPairingDelegate, BluetoothDevice::PairingDelegate*()); | 74 MOCK_METHOD0(DefaultPairingDelegate, BluetoothDevice::PairingDelegate*()); |
78 | 75 |
79 protected: | 76 protected: |
80 virtual void AddDiscoverySession(const base::Closure& callback, | 77 MOCK_METHOD2(AddDiscoverySession, |
81 const ErrorCallback& error_callback); | 78 void(const base::Closure& callback, |
82 virtual void RemoveDiscoverySession(const base::Closure& callback, | 79 const ErrorCallback& error_callback)); |
83 const ErrorCallback& error_callback); | 80 MOCK_METHOD2(RemoveDiscoverySession, |
| 81 void(const base::Closure& callback, |
| 82 const ErrorCallback& error_callback)); |
84 virtual ~MockBluetoothAdapter(); | 83 virtual ~MockBluetoothAdapter(); |
85 | 84 |
86 MOCK_METHOD1(RemovePairingDelegateInternal, | 85 MOCK_METHOD1(RemovePairingDelegateInternal, |
87 void(BluetoothDevice::PairingDelegate* pairing_delegate)); | 86 void(BluetoothDevice::PairingDelegate* pairing_delegate)); |
88 }; | 87 }; |
89 | 88 |
90 } // namespace device | 89 } // namespace device |
91 | 90 |
92 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ | 91 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_ADAPTER_H_ |
OLD | NEW |