Index: components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc |
diff --git a/components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc b/components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc |
index 576296ca3b6f5fc647ae84d882251d707c0e578a..fd05ecfc0935ee8c85e833fcd107aea31645b0c3 100644 |
--- a/components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc |
+++ b/components/proximity_auth/ble/bluetooth_low_energy_weave_packet_generator.cc |
@@ -16,25 +16,16 @@ |
#include "base/logging.h" |
+namespace proximity_auth { |
+namespace weave { |
namespace { |
-typedef proximity_auth::BluetoothLowEnergyWeavePacketGenerator::Packet Packet; |
- |
-const uint16_t kMinSupportedWeaveVersion = 1; |
-const uint16_t kMaxSupportedWeaveVersion = 1; |
-const uint16_t kServerWeaveVersion = 1; |
const uint16_t kMinConnectionRequestSize = 7; |
const uint16_t kMinConnectionResponseSize = 5; |
const uint16_t kMinConnectionCloseSize = 3; |
-const uint32_t kDefaultMaxPacketSize = 20; |
-// Max packet size is 0, which means defer the decision to the server. |
-const uint16_t kMaxSupportedPacketSize = 0; |
-const uint8_t kMaxPacketCounter = 8; |
} // namespace |
-namespace proximity_auth { |
- |
// static. |
BluetoothLowEnergyWeavePacketGenerator::Factory* |
BluetoothLowEnergyWeavePacketGenerator::Factory::factory_instance_ = |
@@ -72,9 +63,9 @@ Packet BluetoothLowEnergyWeavePacketGenerator::CreateConnectionRequest() { |
// resets the packet counter. |
next_packet_counter_ = 1; |
SetControlCommand(ControlCommand::CONNECTION_REQUEST, &packet); |
- SetShortField(1, kMinSupportedWeaveVersion, &packet); |
- SetShortField(3, kMaxSupportedWeaveVersion, &packet); |
- SetShortField(5, kMaxSupportedPacketSize, &packet); |
+ SetShortField(1, kWeaveVersion, &packet); |
+ SetShortField(3, kWeaveVersion, &packet); |
+ SetShortField(5, kSelectMaxPacketSize, &packet); |
return packet; |
} |
@@ -87,7 +78,7 @@ Packet BluetoothLowEnergyWeavePacketGenerator::CreateConnectionResponse() { |
// resets the next packet counter. |
next_packet_counter_ = 1; |
SetControlCommand(ControlCommand::CONNECTION_RESPONSE, &packet); |
- SetShortField(1, kServerWeaveVersion, &packet); |
+ SetShortField(1, kWeaveVersion, &packet); |
SetShortField(3, max_packet_size_, &packet); |
return packet; |
@@ -212,4 +203,5 @@ void BluetoothLowEnergyWeavePacketGenerator::SetDataLastBit(Packet* packet) { |
packet->at(0) = packet->at(0) | (1 << 2); |
} |
+} // namespace weave |
} // namespace proximity_auth |