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&)); | |
54 MOCK_METHOD2(ReadRemoteCharacteristic, | 52 MOCK_METHOD2(ReadRemoteCharacteristic, |
55 void(const ValueCallback&, const ErrorCallback&)); | 53 void(const ValueCallback&, const ErrorCallback&)); |
56 MOCK_METHOD3(WriteRemoteCharacteristic, | 54 MOCK_METHOD3(WriteRemoteCharacteristic, |
57 void(const std::vector<uint8_t>&, | 55 void(const std::vector<uint8_t>&, |
58 const base::Closure&, | 56 const base::Closure&, |
59 const ErrorCallback&)); | 57 const ErrorCallback&)); |
60 | 58 |
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 | |
71 private: | 59 private: |
72 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattCharacteristic); | 60 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattCharacteristic); |
73 }; | 61 }; |
74 | 62 |
75 } // namespace device | 63 } // namespace device |
76 | 64 |
77 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_ | 65 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
OLD | NEW |