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 #include "device/bluetooth/bluetooth_profile_mac.h" | 5 #include "device/bluetooth/bluetooth_profile_mac.h" |
6 | 6 |
7 #import <IOBluetooth/objc/IOBluetoothDevice.h> | 7 #import <IOBluetooth/objc/IOBluetoothDevice.h> |
8 #import <IOBluetooth/objc/IOBluetoothSDPServiceRecord.h> | 8 #import <IOBluetooth/objc/IOBluetoothSDPServiceRecord.h> |
9 #import <IOBluetooth/objc/IOBluetoothSDPUUID.h> | 9 #import <IOBluetooth/objc/IOBluetoothSDPUUID.h> |
10 | 10 |
11 #include <string> | 11 #include <string> |
12 #include <vector> | 12 #include <vector> |
13 | 13 |
14 #include "base/basictypes.h" | 14 #include "base/basictypes.h" |
15 #include "base/logging.h" | 15 #include "base/logging.h" |
16 #include "base/memory/ref_counted.h" | 16 #include "base/memory/ref_counted.h" |
17 #include "base/string_number_conversions.h" | 17 #include "base/strings/string_number_conversions.h" |
18 #include "device/bluetooth/bluetooth_device_mac.h" | 18 #include "device/bluetooth/bluetooth_device_mac.h" |
19 #include "device/bluetooth/bluetooth_socket_mac.h" | 19 #include "device/bluetooth/bluetooth_socket_mac.h" |
20 | 20 |
21 namespace { | 21 namespace { |
22 | 22 |
23 // Converts |uuid| to a IOBluetoothSDPUUID instance. | 23 // Converts |uuid| to a IOBluetoothSDPUUID instance. |
24 // | 24 // |
25 // |uuid| must be in the format of XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. | 25 // |uuid| must be in the format of XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. |
26 IOBluetoothSDPUUID* GetIOBluetoothSDPUUID(const std::string& uuid) { | 26 IOBluetoothSDPUUID* GetIOBluetoothSDPUUID(const std::string& uuid) { |
27 DCHECK(uuid.size() == 36); | 27 DCHECK(uuid.size() == 36); |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 if (socket.get() != NULL) { | 75 if (socket.get() != NULL) { |
76 BluetoothDeviceMac device_mac(device); | 76 BluetoothDeviceMac device_mac(device); |
77 connection_callback_.Run(&device_mac, socket); | 77 connection_callback_.Run(&device_mac, socket); |
78 return true; | 78 return true; |
79 } | 79 } |
80 } | 80 } |
81 return false; | 81 return false; |
82 } | 82 } |
83 | 83 |
84 } // namespace device | 84 } // namespace device |
OLD | NEW |