| 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_service_record_mac.h" | 5 #include "device/bluetooth/bluetooth_service_record_mac.h" |
| 6 | 6 |
| 7 #include <IOBluetooth/Bluetooth.h> | 7 #include <IOBluetooth/Bluetooth.h> |
| 8 #import <IOBluetooth/IOBluetoothUtilities.h> | 8 #import <IOBluetooth/IOBluetoothUtilities.h> |
| 9 #import <IOBluetooth/objc/IOBluetoothDevice.h> | 9 #import <IOBluetooth/objc/IOBluetoothDevice.h> |
| 10 #import <IOBluetooth/objc/IOBluetoothSDPDataElement.h> | 10 #import <IOBluetooth/objc/IOBluetoothSDPDataElement.h> |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 | 59 |
| 60 supports_rfcomm_ = | 60 supports_rfcomm_ = |
| 61 [record getRFCOMMChannelID:&rfcomm_channel_] == kIOReturnSuccess; | 61 [record getRFCOMMChannelID:&rfcomm_channel_] == kIOReturnSuccess; |
| 62 | 62 |
| 63 const BluetoothSDPServiceAttributeID service_class_id = 1; | 63 const BluetoothSDPServiceAttributeID service_class_id = 1; |
| 64 | 64 |
| 65 IOBluetoothSDPDataElement* service_class_data = | 65 IOBluetoothSDPDataElement* service_class_data = |
| 66 [record getAttributeDataElement:service_class_id]; | 66 [record getAttributeDataElement:service_class_id]; |
| 67 if ([service_class_data getTypeDescriptor] == | 67 if ([service_class_data getTypeDescriptor] == |
| 68 kBluetoothSDPDataElementTypeDataElementSequence) { | 68 kBluetoothSDPDataElementTypeDataElementSequence) { |
| 69 ExtractUuid(service_class_data, &uuid_); | 69 std::string uuid_str; |
| 70 ExtractUuid(service_class_data, &uuid_str); |
| 71 uuid_ = BluetoothUUID(uuid_str); |
| 70 } | 72 } |
| 71 } | 73 } |
| 72 | 74 |
| 73 BluetoothServiceRecordMac::~BluetoothServiceRecordMac() { | 75 BluetoothServiceRecordMac::~BluetoothServiceRecordMac() { |
| 74 [device_ release]; | 76 [device_ release]; |
| 75 } | 77 } |
| 76 | 78 |
| 77 } // namespace device | 79 } // namespace device |
| OLD | NEW |