| 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_CHROMEOS_H | 5 #ifndef DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
| 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H | 6 #define DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 const device::BluetoothUUID& uuid, | 66 const device::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 CreateGattConnection( | 69 virtual void CreateGattConnection( |
| 70 const GattConnectionCallback& callback, | 70 const GattConnectionCallback& callback, |
| 71 const ConnectErrorCallback& error_callback) OVERRIDE; | 71 const ConnectErrorCallback& error_callback) OVERRIDE; |
| 72 virtual void StartConnectionMonitor( | 72 virtual void StartConnectionMonitor( |
| 73 const base::Closure& callback, | 73 const base::Closure& callback, |
| 74 const ErrorCallback& error_callback) OVERRIDE; | 74 const ErrorCallback& error_callback) OVERRIDE; |
| 75 | 75 |
| 76 // Attempts to initiate an insecure outgoing L2CAP or RFCOMM connection to the |
| 77 // advertised service on this device matching |uuid|, performing an SDP lookup |
| 78 // if necessary to determine the correct protocol and channel for the |
| 79 // connection. Unlike ConnectToService, the outgoing connection will request |
| 80 // no bonding rather than general bonding. |callback| will be called on a |
| 81 // successful connection with a BluetoothSocket instance that is to be owned |
| 82 // by the receiver. |error_callback| will be called on failure with a message |
| 83 // indicating the cause. |
| 84 void ConnectToServiceInsecurely( |
| 85 const device::BluetoothUUID& uuid, |
| 86 const ConnectToServiceCallback& callback, |
| 87 const ConnectToServiceErrorCallback& error_callback); |
| 88 |
| 76 // Creates a pairing object with the given delegate |pairing_delegate| and | 89 // Creates a pairing object with the given delegate |pairing_delegate| and |
| 77 // establishes it as the pairing context for this device. All pairing-related | 90 // establishes it as the pairing context for this device. All pairing-related |
| 78 // method calls will be forwarded to this object until it is released. | 91 // method calls will be forwarded to this object until it is released. |
| 79 BluetoothPairingChromeOS* BeginPairing( | 92 BluetoothPairingChromeOS* BeginPairing( |
| 80 BluetoothDevice::PairingDelegate* pairing_delegate); | 93 BluetoothDevice::PairingDelegate* pairing_delegate); |
| 81 | 94 |
| 82 // Releases the current pairing object, any pairing-related method calls will | 95 // Releases the current pairing object, any pairing-related method calls will |
| 83 // be ignored. | 96 // be ignored. |
| 84 void EndPairing(); | 97 void EndPairing(); |
| 85 | 98 |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 186 // Note: This should remain the last member so it'll be destroyed and | 199 // Note: This should remain the last member so it'll be destroyed and |
| 187 // invalidate its weak pointers before any other members are destroyed. | 200 // invalidate its weak pointers before any other members are destroyed. |
| 188 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; | 201 base::WeakPtrFactory<BluetoothDeviceChromeOS> weak_ptr_factory_; |
| 189 | 202 |
| 190 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); | 203 DISALLOW_COPY_AND_ASSIGN(BluetoothDeviceChromeOS); |
| 191 }; | 204 }; |
| 192 | 205 |
| 193 } // namespace chromeos | 206 } // namespace chromeos |
| 194 | 207 |
| 195 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H | 208 #endif // DEVICE_BLUETOOTH_BLUETOOTH_DEVICE_CHROMEOS_H |
| OLD | NEW |