OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_GATT_CHARACTERISTIC_H_ | 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_ | 6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 MOCK_CONST_METHOD0(GetPermissions, Permissions()); | 42 MOCK_CONST_METHOD0(GetPermissions, Permissions()); |
43 MOCK_CONST_METHOD0(IsNotifying, bool()); | 43 MOCK_CONST_METHOD0(IsNotifying, bool()); |
44 MOCK_CONST_METHOD0(GetDescriptors, | 44 MOCK_CONST_METHOD0(GetDescriptors, |
45 std::vector<BluetoothRemoteGattDescriptor*>()); | 45 std::vector<BluetoothRemoteGattDescriptor*>()); |
46 MOCK_CONST_METHOD1(GetDescriptor, | 46 MOCK_CONST_METHOD1(GetDescriptor, |
47 BluetoothRemoteGattDescriptor*(const std::string&)); | 47 BluetoothRemoteGattDescriptor*(const std::string&)); |
48 MOCK_METHOD1(AddDescriptor, bool(BluetoothRemoteGattDescriptor*)); | 48 MOCK_METHOD1(AddDescriptor, bool(BluetoothRemoteGattDescriptor*)); |
49 MOCK_METHOD1(UpdateValue, bool(const std::vector<uint8_t>&)); | 49 MOCK_METHOD1(UpdateValue, bool(const std::vector<uint8_t>&)); |
50 MOCK_METHOD2(StartNotifySession, | 50 MOCK_METHOD2(StartNotifySession, |
51 void(const NotifySessionCallback&, const ErrorCallback&)); | 51 void(const NotifySessionCallback&, const ErrorCallback&)); |
| 52 MOCK_METHOD2(StopNotifySession, |
| 53 void(BluetoothGattNotifySession*, const base::Closure&)); |
52 MOCK_METHOD2(ReadRemoteCharacteristic, | 54 MOCK_METHOD2(ReadRemoteCharacteristic, |
53 void(const ValueCallback&, const ErrorCallback&)); | 55 void(const ValueCallback&, const ErrorCallback&)); |
54 MOCK_METHOD3(WriteRemoteCharacteristic, | 56 MOCK_METHOD3(WriteRemoteCharacteristic, |
55 void(const std::vector<uint8_t>&, | 57 void(const std::vector<uint8_t>&, |
56 const base::Closure&, | 58 const base::Closure&, |
57 const ErrorCallback&)); | 59 const ErrorCallback&)); |
58 | 60 |
| 61 protected: |
| 62 MOCK_METHOD3(SubscribeToNotifications, |
| 63 void(BluetoothRemoteGattDescriptor*, |
| 64 const base::Closure&, |
| 65 const ErrorCallback&)); |
| 66 MOCK_METHOD3(UnsubscribeFromNotifications, |
| 67 void(BluetoothRemoteGattDescriptor*, |
| 68 const base::Closure&, |
| 69 const ErrorCallback&)); |
| 70 |
59 private: | 71 private: |
60 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattCharacteristic); | 72 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattCharacteristic); |
61 }; | 73 }; |
62 | 74 |
63 } // namespace device | 75 } // namespace device |
64 | 76 |
65 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_ | 77 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
OLD | NEW |