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