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

Side by Side Diff: device/bluetooth/bluetooth_device_mac.h

Issue 2052513002: Read characteristic implementation on macOS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@characteristicscan_servicescan_cleanup
Patch Set: Addressing msarda's comment Created 4 years, 5 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
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_device_mac.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_BLUETOOTH_DEVICE_MAC_H_ 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_ 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "device/bluetooth/bluetooth_device.h" 9 #include "device/bluetooth/bluetooth_device.h"
10 #include "device/bluetooth/bluetooth_gatt_service.h"
10 11
11 @class NSDate; 12 @class NSDate;
12 13
13 namespace device { 14 namespace device {
14 15
15 class BluetoothAdapterMac; 16 class BluetoothAdapterMac;
16 17
17 class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceMac : public BluetoothDevice { 18 class DEVICE_BLUETOOTH_EXPORT BluetoothDeviceMac : public BluetoothDevice {
18 public: 19 public:
19 ~BluetoothDeviceMac() override; 20 ~BluetoothDeviceMac() override;
20 21
21 // Returns the time of the most recent interaction with the device. Returns 22 // Returns the time of the most recent interaction with the device. Returns
22 // nil if the device has never been seen. 23 // nil if the device has never been seen.
23 virtual NSDate* GetLastUpdateTime() const = 0; 24 virtual NSDate* GetLastUpdateTime() const = 0;
24 25
25 // Converts between ConnectErrorCode and NSError. 26 // Converts between ConnectErrorCode and NSError.
26 static NSError* GetNSErrorFromConnectErrorCode( 27 static NSError* GetNSErrorFromConnectErrorCode(
27 BluetoothDevice::ConnectErrorCode error_code); 28 BluetoothDevice::ConnectErrorCode error_code);
28 static BluetoothDevice::ConnectErrorCode GetConnectErrorCodeFromNSError( 29 static BluetoothDevice::ConnectErrorCode GetConnectErrorCodeFromNSError(
29 NSError* error); 30 NSError* error);
31 static NSError* GetNSErrorFromGattErrorCode(
32 BluetoothGattService::GattErrorCode error_code);
33 static BluetoothGattService::GattErrorCode GetGattErrorCodeFromNSError(
34 NSError* error);
30 35
31 protected: 36 protected:
32 BluetoothDeviceMac(BluetoothAdapterMac* adapter); 37 BluetoothDeviceMac(BluetoothAdapterMac* adapter);
33 38
34 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceMac); 39 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceMac);
35 }; 40 };
36 41
37 } // namespace device 42 } // namespace device
38 43
39 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_ 44 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_
OLDNEW
« no previous file with comments | « no previous file | device/bluetooth/bluetooth_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698