Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: device/bluetooth/test/mock_bluetooth_gatt_characteristic.h

Issue 264053004: device/bluetooth: Improvements to GATT descriptor access API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Pull & rebase. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <string> 8 #include <string>
9 #include <vector>
9 10
10 #include "base/basictypes.h" 11 #include "base/basictypes.h"
11 #include "base/callback.h" 12 #include "base/callback.h"
12 #include "device/bluetooth/bluetooth_gatt_characteristic.h" 13 #include "device/bluetooth/bluetooth_gatt_characteristic.h"
13 #include "device/bluetooth/bluetooth_uuid.h" 14 #include "device/bluetooth/bluetooth_uuid.h"
14 #include "testing/gmock/include/gmock/gmock.h" 15 #include "testing/gmock/include/gmock/gmock.h"
15 16
16 namespace device { 17 namespace device {
17 18
18 class BluetoothGattDescriptor; 19 class BluetoothGattDescriptor;
(...skipping 11 matching lines...) Expand all
30 virtual ~MockBluetoothGattCharacteristic(); 31 virtual ~MockBluetoothGattCharacteristic();
31 32
32 MOCK_CONST_METHOD0(GetIdentifier, std::string()); 33 MOCK_CONST_METHOD0(GetIdentifier, std::string());
33 MOCK_CONST_METHOD0(GetUUID, BluetoothUUID()); 34 MOCK_CONST_METHOD0(GetUUID, BluetoothUUID());
34 MOCK_CONST_METHOD0(IsLocal, bool()); 35 MOCK_CONST_METHOD0(IsLocal, bool());
35 MOCK_CONST_METHOD0(GetValue, const std::vector<uint8>&()); 36 MOCK_CONST_METHOD0(GetValue, const std::vector<uint8>&());
36 MOCK_CONST_METHOD0(GetService, BluetoothGattService*()); 37 MOCK_CONST_METHOD0(GetService, BluetoothGattService*());
37 MOCK_CONST_METHOD0(GetProperties, Properties()); 38 MOCK_CONST_METHOD0(GetProperties, Properties());
38 MOCK_CONST_METHOD0(GetPermissions, Permissions()); 39 MOCK_CONST_METHOD0(GetPermissions, Permissions());
39 MOCK_CONST_METHOD0(GetDescriptors, std::vector<BluetoothGattDescriptor*>()); 40 MOCK_CONST_METHOD0(GetDescriptors, std::vector<BluetoothGattDescriptor*>());
41 MOCK_CONST_METHOD1(GetDescriptor,
42 BluetoothGattDescriptor*(const std::string&));
40 MOCK_METHOD1(AddDescriptor, bool(BluetoothGattDescriptor*)); 43 MOCK_METHOD1(AddDescriptor, bool(BluetoothGattDescriptor*));
41 MOCK_METHOD1(UpdateValue, bool(const std::vector<uint8>&)); 44 MOCK_METHOD1(UpdateValue, bool(const std::vector<uint8>&));
42 MOCK_METHOD2(ReadRemoteCharacteristic, 45 MOCK_METHOD2(ReadRemoteCharacteristic,
43 void(const ValueCallback&, const ErrorCallback&)); 46 void(const ValueCallback&, const ErrorCallback&));
44 MOCK_METHOD3(WriteRemoteCharacteristic, 47 MOCK_METHOD3(WriteRemoteCharacteristic,
45 void(const std::vector<uint8>&, 48 void(const std::vector<uint8>&,
46 const base::Closure&, 49 const base::Closure&,
47 const ErrorCallback&)); 50 const ErrorCallback&));
48 51
49 private: 52 private:
50 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattCharacteristic); 53 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattCharacteristic);
51 }; 54 };
52 55
53 } // namespace device 56 } // namespace device
54 57
55 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_ 58 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_
OLDNEW
« no previous file with comments | « device/bluetooth/bluetooth_remote_gatt_service_chromeos.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698