OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/test/bluetooth_test_mac.h" | 5 #include "device/bluetooth/test/bluetooth_test_mac.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 | 8 |
9 #include "base/mac/foundation_util.h" | 9 #include "base/mac/foundation_util.h" |
10 #include "base/strings/string_number_conversions.h" | 10 #include "base/strings/string_number_conversions.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 case 2: | 169 case 2: |
170 identifier = kTestPeripheralUUID1.c_str(); | 170 identifier = kTestPeripheralUUID1.c_str(); |
171 name = @(kTestDeviceName.c_str()); | 171 name = @(kTestDeviceName.c_str()); |
172 rssi = @(static_cast<int8_t>(TestRSSI::LOWER)); | 172 rssi = @(static_cast<int8_t>(TestRSSI::LOWER)); |
173 uuids = @[ | 173 uuids = @[ |
174 [CBUUID UUIDWithString:@(kTestUUIDImmediateAlert.c_str())], | 174 [CBUUID UUIDWithString:@(kTestUUIDImmediateAlert.c_str())], |
175 [CBUUID UUIDWithString:@(kTestUUIDLinkLoss.c_str())] | 175 [CBUUID UUIDWithString:@(kTestUUIDLinkLoss.c_str())] |
176 ]; | 176 ]; |
177 service_data = @{ | 177 service_data = @{ |
178 [CBUUID UUIDWithString:@(kTestUUIDHeartRate.c_str())] : | 178 [CBUUID UUIDWithString:@(kTestUUIDHeartRate.c_str())] : |
179 [NSData dataWithBytes:(unsigned char[]){} length:0], | 179 [NSData dataWithBytes:(unsigned char[]){2} length:1], |
180 [CBUUID UUIDWithString:@(kTestUUIDImmediateAlert.c_str())] : | 180 [CBUUID UUIDWithString:@(kTestUUIDImmediateAlert.c_str())] : |
181 [NSData dataWithBytes:(unsigned char[]){0, 2} length:2] | 181 [NSData dataWithBytes:(unsigned char[]){0} length:1] |
182 }; | 182 }; |
183 tx_power = @(static_cast<int8_t>(TestTxPower::LOWER)); | 183 tx_power = @(static_cast<int8_t>(TestTxPower::LOWER)); |
184 break; | 184 break; |
185 case 3: | 185 case 3: |
186 identifier = kTestPeripheralUUID1.c_str(); | 186 identifier = kTestPeripheralUUID1.c_str(); |
187 name = @(kTestDeviceNameEmpty.c_str()); | 187 name = @(kTestDeviceNameEmpty.c_str()); |
188 rssi = @(static_cast<int8_t>(TestRSSI::LOW)); | 188 rssi = @(static_cast<int8_t>(TestRSSI::LOW)); |
189 uuids = nil; | 189 uuids = nil; |
190 service_data = nil; | 190 service_data = nil; |
191 tx_power = nil; | 191 tx_power = nil; |
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
589 // crypto::SHA256HashString(input_str, raw, sizeof(raw)); | 589 // crypto::SHA256HashString(input_str, raw, sizeof(raw)); |
590 // if (base::HexEncode(raw, sizeof(raw)) == target) { | 590 // if (base::HexEncode(raw, sizeof(raw)) == target) { |
591 // return input_str; | 591 // return input_str; |
592 // } | 592 // } |
593 // ++input[0]; | 593 // ++input[0]; |
594 // } | 594 // } |
595 // return ""; | 595 // return ""; |
596 // } | 596 // } |
597 | 597 |
598 } // namespace device | 598 } // namespace device |
OLD | NEW |