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

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

Issue 1542163002: Switch to standard integer types in device/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: win Created 5 years 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
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 <stdint.h>
9
8 #include <string> 10 #include <string>
9 #include <vector> 11 #include <vector>
10 12
11 #include "base/basictypes.h"
12 #include "base/callback.h" 13 #include "base/callback.h"
14 #include "base/macros.h"
13 #include "device/bluetooth/bluetooth_gatt_characteristic.h" 15 #include "device/bluetooth/bluetooth_gatt_characteristic.h"
14 #include "device/bluetooth/bluetooth_uuid.h" 16 #include "device/bluetooth/bluetooth_uuid.h"
15 #include "testing/gmock/include/gmock/gmock.h" 17 #include "testing/gmock/include/gmock/gmock.h"
16 18
17 namespace device { 19 namespace device {
18 20
19 class BluetoothGattDescriptor; 21 class BluetoothGattDescriptor;
20 class BluetoothGattService; 22 class BluetoothGattService;
21 class MockBluetoothGattService; 23 class MockBluetoothGattService;
22 24
23 class MockBluetoothGattCharacteristic : public BluetoothGattCharacteristic { 25 class MockBluetoothGattCharacteristic : public BluetoothGattCharacteristic {
24 public: 26 public:
25 MockBluetoothGattCharacteristic(MockBluetoothGattService* service, 27 MockBluetoothGattCharacteristic(MockBluetoothGattService* service,
26 const std::string& identifier, 28 const std::string& identifier,
27 const BluetoothUUID& uuid, 29 const BluetoothUUID& uuid,
28 bool is_local, 30 bool is_local,
29 Properties properties, 31 Properties properties,
30 Permissions permissions); 32 Permissions permissions);
31 virtual ~MockBluetoothGattCharacteristic(); 33 virtual ~MockBluetoothGattCharacteristic();
32 34
33 MOCK_CONST_METHOD0(GetIdentifier, std::string()); 35 MOCK_CONST_METHOD0(GetIdentifier, std::string());
34 MOCK_CONST_METHOD0(GetUUID, BluetoothUUID()); 36 MOCK_CONST_METHOD0(GetUUID, BluetoothUUID());
35 MOCK_CONST_METHOD0(IsLocal, bool()); 37 MOCK_CONST_METHOD0(IsLocal, bool());
36 MOCK_CONST_METHOD0(GetValue, const std::vector<uint8>&()); 38 MOCK_CONST_METHOD0(GetValue, const std::vector<uint8_t>&());
37 MOCK_CONST_METHOD0(GetService, BluetoothGattService*()); 39 MOCK_CONST_METHOD0(GetService, BluetoothGattService*());
38 MOCK_CONST_METHOD0(GetProperties, Properties()); 40 MOCK_CONST_METHOD0(GetProperties, Properties());
39 MOCK_CONST_METHOD0(GetPermissions, Permissions()); 41 MOCK_CONST_METHOD0(GetPermissions, Permissions());
40 MOCK_CONST_METHOD0(IsNotifying, bool()); 42 MOCK_CONST_METHOD0(IsNotifying, bool());
41 MOCK_CONST_METHOD0(GetDescriptors, std::vector<BluetoothGattDescriptor*>()); 43 MOCK_CONST_METHOD0(GetDescriptors, std::vector<BluetoothGattDescriptor*>());
42 MOCK_CONST_METHOD1(GetDescriptor, 44 MOCK_CONST_METHOD1(GetDescriptor,
43 BluetoothGattDescriptor*(const std::string&)); 45 BluetoothGattDescriptor*(const std::string&));
44 MOCK_METHOD1(AddDescriptor, bool(BluetoothGattDescriptor*)); 46 MOCK_METHOD1(AddDescriptor, bool(BluetoothGattDescriptor*));
45 MOCK_METHOD1(UpdateValue, bool(const std::vector<uint8>&)); 47 MOCK_METHOD1(UpdateValue, bool(const std::vector<uint8_t>&));
46 MOCK_METHOD2(StartNotifySession, 48 MOCK_METHOD2(StartNotifySession,
47 void(const NotifySessionCallback&, const ErrorCallback&)); 49 void(const NotifySessionCallback&, const ErrorCallback&));
48 MOCK_METHOD2(ReadRemoteCharacteristic, 50 MOCK_METHOD2(ReadRemoteCharacteristic,
49 void(const ValueCallback&, const ErrorCallback&)); 51 void(const ValueCallback&, const ErrorCallback&));
50 MOCK_METHOD3(WriteRemoteCharacteristic, 52 MOCK_METHOD3(WriteRemoteCharacteristic,
51 void(const std::vector<uint8>&, 53 void(const std::vector<uint8_t>&,
52 const base::Closure&, 54 const base::Closure&,
53 const ErrorCallback&)); 55 const ErrorCallback&));
54 56
55 private: 57 private:
56 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattCharacteristic); 58 DISALLOW_COPY_AND_ASSIGN(MockBluetoothGattCharacteristic);
57 }; 59 };
58 60
59 } // namespace device 61 } // namespace device
60 62
61 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_ 63 #endif // DEVICE_BLUETOOTH_TEST_MOCK_BLUETOOTH_GATT_CHARACTERISTIC_H_
OLDNEW
« no previous file with comments | « device/bluetooth/test/mock_bluetooth_discovery_session.h ('k') | device/bluetooth/test/mock_bluetooth_gatt_characteristic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698