OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 <utility> | 5 #include <utility> |
6 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "base/memory/ptr_util.h" | 8 #include "base/memory/ptr_util.h" |
9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
10 #include "device/bluetooth/device.h" | 10 #include "device/bluetooth/device.h" |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 services.push_back(ConstructServiceInfoStruct(*service)); | 112 services.push_back(ConstructServiceInfoStruct(*service)); |
113 } | 113 } |
114 | 114 |
115 callback.Run(std::move(services)); | 115 callback.Run(std::move(services)); |
116 } | 116 } |
117 | 117 |
118 mojom::ServiceInfoPtr Device::ConstructServiceInfoStruct( | 118 mojom::ServiceInfoPtr Device::ConstructServiceInfoStruct( |
119 const device::BluetoothRemoteGattService& service) { | 119 const device::BluetoothRemoteGattService& service) { |
120 mojom::ServiceInfoPtr service_info = mojom::ServiceInfo::New(); | 120 mojom::ServiceInfoPtr service_info = mojom::ServiceInfo::New(); |
121 | 121 |
| 122 service_info->id = service.GetIdentifier(); |
122 service_info->uuid = service.GetUUID(); | 123 service_info->uuid = service.GetUUID(); |
123 service_info->is_primary = service.IsPrimary(); | 124 service_info->is_primary = service.IsPrimary(); |
124 | 125 |
125 return service_info; | 126 return service_info; |
126 } | 127 } |
127 | 128 |
128 const std::string& Device::GetAddress() { | 129 const std::string& Device::GetAddress() { |
129 return connection_->GetDeviceAddress(); | 130 return connection_->GetDeviceAddress(); |
130 } | 131 } |
131 | 132 |
132 } // namespace bluetooth | 133 } // namespace bluetooth |
OLD | NEW |