1cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved. 2cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be 3cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)// found in the LICENSE file. 4cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 5cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#ifndef DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_DESCRIPTOR_H_ 6cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#define DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_DESCRIPTOR_H_ 7cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 8cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include <string> 9cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include <vector> 10cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 11cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "base/basictypes.h" 12cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "base/callback.h" 13cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "device/bluetooth/bluetooth_gatt_characteristic.h" 14cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "device/bluetooth/bluetooth_gatt_descriptor.h" 15cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "device/bluetooth/bluetooth_uuid.h" 16cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#include "testing/gmock/include/gmock/gmock.h" 17cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 18cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)namespace device { 19cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 20cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)class MockBluetoothGattCharacteristic; 21cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 22cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)class MockBluetoothGattDescriptor : public BluetoothGattDescriptor { 23cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) public: 24cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) MockBluetoothGattDescriptor( 25cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) MockBluetoothGattCharacteristic* characteristic, 26cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) const std::string& identifier, 27cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) const BluetoothUUID& uuid, 28cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) bool is_local, 29cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) BluetoothGattCharacteristic::Permissions permissions); 30cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) virtual ~MockBluetoothGattDescriptor(); 31cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 32cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) MOCK_CONST_METHOD0(GetIdentifier, std::string()); 33cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) MOCK_CONST_METHOD0(GetUUID, BluetoothUUID()); 34cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) MOCK_CONST_METHOD0(IsLocal, bool()); 35cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) MOCK_CONST_METHOD0(GetValue, const std::vector<uint8>&()); 36cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) MOCK_CONST_METHOD0(GetCharacteristic, BluetoothGattCharacteristic*()); 37cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) MOCK_CONST_METHOD0(GetPermissions, 38cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) BluetoothGattCharacteristic::Permissions()); 39cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) MOCK_METHOD2(ReadRemoteDescriptor, 40cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) void(const ValueCallback&, const ErrorCallback&)); 41cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) MOCK_METHOD3(WriteRemoteDescriptor, 42cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) void(const std::vector<uint8>&, 43cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) const base::Closure&, 44cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) const ErrorCallback&)); 45cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 46cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) private: 47cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattDescriptor); 48cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)}; 49cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 50cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)} // namespace device 51cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles) 52cedac228d2dd51db4b79ea1e72c7f249408ee061Torne (Richard Coles)#endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_DESCRIPTOR_H_ 53