OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #import <IOBluetooth/IOBluetooth.h> | 8 #import <IOBluetooth/IOBluetooth.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 const BluetoothUUID& uuid, | 66 const BluetoothUUID& uuid, |
67 const ConnectToServiceCallback& callback, | 67 const ConnectToServiceCallback& callback, |
68 const ConnectToServiceErrorCallback& error_callback) OVERRIDE; | 68 const ConnectToServiceErrorCallback& error_callback) OVERRIDE; |
69 virtual void SetOutOfBandPairingData( | 69 virtual void SetOutOfBandPairingData( |
70 const BluetoothOutOfBandPairingData& data, | 70 const BluetoothOutOfBandPairingData& data, |
71 const base::Closure& callback, | 71 const base::Closure& callback, |
72 const ErrorCallback& error_callback) OVERRIDE; | 72 const ErrorCallback& error_callback) OVERRIDE; |
73 virtual void ClearOutOfBandPairingData( | 73 virtual void ClearOutOfBandPairingData( |
74 const base::Closure& callback, | 74 const base::Closure& callback, |
75 const ErrorCallback& error_callback) OVERRIDE; | 75 const ErrorCallback& error_callback) OVERRIDE; |
| 76 virtual void StartConnectionMonitor( |
| 77 const base::Closure& callback, |
| 78 const ErrorCallback& error_callback) OVERRIDE; |
76 | 79 |
77 // Returns the Bluetooth address for the |device|. The returned address has a | 80 // Returns the Bluetooth address for the |device|. The returned address has a |
78 // normalized format (see below). | 81 // normalized format (see below). |
79 static std::string GetDeviceAddress(IOBluetoothDevice* device); | 82 static std::string GetDeviceAddress(IOBluetoothDevice* device); |
80 | 83 |
81 // Returns the address formatted according to Chrome's expectations rather | 84 // Returns the address formatted according to Chrome's expectations rather |
82 // than per the system convention: octets are separated by colons rather than | 85 // than per the system convention: octets are separated by colons rather than |
83 // by dashes. That is, the returned format is XX:XX:XX:XX:XX:XX rather than | 86 // by dashes. That is, the returned format is XX:XX:XX:XX:XX:XX rather than |
84 // xx-xx-xx-xx-xx-xx. | 87 // xx-xx-xx-xx-xx-xx. |
85 static std::string NormalizeAddress(const std::string& address); | 88 static std::string NormalizeAddress(const std::string& address); |
(...skipping 14 matching lines...) Expand all Loading... |
100 ObserverList<Observer> observers_; | 103 ObserverList<Observer> observers_; |
101 | 104 |
102 base::scoped_nsobject<IOBluetoothDevice> device_; | 105 base::scoped_nsobject<IOBluetoothDevice> device_; |
103 | 106 |
104 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceMac); | 107 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceMac); |
105 }; | 108 }; |
106 | 109 |
107 } // namespace device | 110 } // namespace device |
108 | 111 |
109 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_ | 112 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_MAC_H_ |
OLD | NEW |