Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: components/arc/bluetooth/arc_bluetooth_bridge.cc

Issue 2444673002: [M54] arc: bluetooth: Set advertisement max slot to 1 (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 "components/arc/bluetooth/arc_bluetooth_bridge.h" 5 #include "components/arc/bluetooth/arc_bluetooth_bridge.h"
6 6
7 #include <bluetooth/bluetooth.h> 7 #include <bluetooth/bluetooth.h>
8 #include <fcntl.h> 8 #include <fcntl.h>
9 #include <stddef.h> 9 #include <stddef.h>
10 #include <sys/socket.h> 10 #include <sys/socket.h>
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 constexpr int32_t kInvalidGattAttributeHandle = -1; 71 constexpr int32_t kInvalidGattAttributeHandle = -1;
72 // Bluetooth Specification Version 4.2 Vol 3 Part F Section 3.2.2 72 // Bluetooth Specification Version 4.2 Vol 3 Part F Section 3.2.2
73 // An attribute handle of value 0xFFFF is known as the maximum attribute handle. 73 // An attribute handle of value 0xFFFF is known as the maximum attribute handle.
74 constexpr int32_t kMaxGattAttributeHandle = 0xFFFF; 74 constexpr int32_t kMaxGattAttributeHandle = 0xFFFF;
75 // Bluetooth Specification Version 4.2 Vol 3 Part F Section 3.2.9 75 // Bluetooth Specification Version 4.2 Vol 3 Part F Section 3.2.9
76 // The maximum length of an attribute value shall be 512 octets. 76 // The maximum length of an attribute value shall be 512 octets.
77 constexpr int kMaxGattAttributeLength = 512; 77 constexpr int kMaxGattAttributeLength = 512;
78 // Copied from Android at system/bt/stack/btm/btm_ble_int.h 78 // Copied from Android at system/bt/stack/btm/btm_ble_int.h
79 // https://goo.gl/k7PM6u 79 // https://goo.gl/k7PM6u
80 constexpr uint16_t kAndroidMBluetoothVersionNumber = 95; 80 constexpr uint16_t kAndroidMBluetoothVersionNumber = 95;
81 constexpr uint16_t kMaxAdvertisement = 5; 81 constexpr uint16_t kMaxAdvertisement = 1;
82 // Bluetooth SDP Service Class ID List Attribute identifier 82 // Bluetooth SDP Service Class ID List Attribute identifier
83 constexpr uint16_t kServiceClassIDListAttributeID = 0x0001; 83 constexpr uint16_t kServiceClassIDListAttributeID = 0x0001;
84 84
85 using GattStatusCallback = 85 using GattStatusCallback =
86 base::Callback<void(arc::mojom::BluetoothGattStatus)>; 86 base::Callback<void(arc::mojom::BluetoothGattStatus)>;
87 using GattReadCallback = 87 using GattReadCallback =
88 base::Callback<void(arc::mojom::BluetoothGattValuePtr)>; 88 base::Callback<void(arc::mojom::BluetoothGattValuePtr)>;
89 using CreateSdpRecordCallback = 89 using CreateSdpRecordCallback =
90 base::Callback<void(arc::mojom::BluetoothCreateSdpRecordResultPtr)>; 90 base::Callback<void(arc::mojom::BluetoothCreateSdpRecordResultPtr)>;
91 using RemoveSdpRecordCallback = 91 using RemoveSdpRecordCallback =
(...skipping 1894 matching lines...) Expand 10 before | Expand all | Expand 10 after
1986 LOG(WARNING) << "Bluetooth instance is too old (version " << version 1986 LOG(WARNING) << "Bluetooth instance is too old (version " << version
1987 << ") need version " << version_need; 1987 << ") need version " << version_need;
1988 return false; 1988 return false;
1989 } 1989 }
1990 1990
1991 bool ArcBluetoothBridge::CalledOnValidThread() { 1991 bool ArcBluetoothBridge::CalledOnValidThread() {
1992 return thread_checker_.CalledOnValidThread(); 1992 return thread_checker_.CalledOnValidThread();
1993 } 1993 }
1994 1994
1995 } // namespace arc 1995 } // namespace arc
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698