OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
| 6 #define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/basictypes.h" |
| 11 #include "base/callback.h" |
| 12 #include "device/bluetooth/bluetooth_gatt_characteristic.h" |
| 13 #include "device/bluetooth/bluetooth_uuid.h" |
| 14 #include "testing/gmock/include/gmock/gmock.h" |
| 15 |
| 16 namespace device { |
| 17 |
| 18 class BluetoothGattDescriptor; |
| 19 class BluetoothGattService; |
| 20 class MockBluetoothGattService; |
| 21 |
| 22 class MockBluetoothGattCharacteristic : public BluetoothGattCharacteristic { |
| 23 public: |
| 24 MockBluetoothGattCharacteristic(MockBluetoothGattService* service, |
| 25 const std::string& identifier, |
| 26 const BluetoothUUID& uuid, |
| 27 bool is_local, |
| 28 Properties properties, |
| 29 Permissions permissions); |
| 30 virtual ~MockBluetoothGattCharacteristic(); |
| 31 |
| 32 MOCK_CONST_METHOD0(GetIdentifier, std::string()); |
| 33 MOCK_CONST_METHOD0(GetUUID, BluetoothUUID()); |
| 34 MOCK_CONST_METHOD0(IsLocal, bool()); |
| 35 MOCK_CONST_METHOD0(GetValue, const std::vector<uint8>&()); |
| 36 MOCK_CONST_METHOD0(GetService, BluetoothGattService*()); |
| 37 MOCK_CONST_METHOD0(GetProperties, Properties()); |
| 38 MOCK_CONST_METHOD0(GetPermissions, Permissions()); |
| 39 MOCK_CONST_METHOD0(GetDescriptors, std::vector<BluetoothGattDescriptor*>()); |
| 40 MOCK_METHOD1(AddDescriptor, bool(BluetoothGattDescriptor*)); |
| 41 MOCK_METHOD1(UpdateValue, bool(const std::vector<uint8>&)); |
| 42 MOCK_METHOD2(ReadRemoteCharacteristic, |
| 43 void(const ValueCallback&, const ErrorCallback&)); |
| 44 MOCK_METHOD3(WriteRemoteCharacteristic, |
| 45 void(const std::vector<uint8>&, |
| 46 const base::Closure&, |
| 47 const ErrorCallback&)); |
| 48 |
| 49 private: |
| 50 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattCharacteristic); |
| 51 }; |
| 52 |
| 53 } // namespace device |
| 54 |
| 55 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_ |
OLD | NEW |