| 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 #ifndef COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_WEAVE_PACKET_RECEIVER
_H_ | 5 #ifndef COMPONENTS_CRYPTAUTH_BLE_BLUETOOTH_LOW_ENERGY_WEAVE_PACKET_RECEIVER_H_ |
| 6 #define COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_WEAVE_PACKET_RECEIVER
_H_ | 6 #define COMPONENTS_CRYPTAUTH_BLE_BLUETOOTH_LOW_ENERGY_WEAVE_PACKET_RECEIVER_H_ |
| 7 | 7 |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| 11 #include <string> | 11 #include <string> |
| 12 #include <vector> | 12 #include <vector> |
| 13 | 13 |
| 14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 #include "components/proximity_auth/ble/bluetooth_low_energy_weave_defines.h" | 15 #include "components/cryptauth/ble/bluetooth_low_energy_weave_defines.h" |
| 16 | 16 |
| 17 namespace proximity_auth { | 17 namespace cryptauth { |
| 18 namespace weave { | 18 namespace weave { |
| 19 | 19 |
| 20 // Receive the messages sent with uWeave protocol. | 20 // Receive the messages sent with uWeave protocol. |
| 21 // Example Usage: | 21 // Example Usage: |
| 22 // State state = ReceivePacket(packet); | 22 // State state = ReceivePacket(packet); |
| 23 // switch (state) { | 23 // switch (state) { |
| 24 // case ReceiverState::DATA_READY: | 24 // case ReceiverState::DATA_READY: |
| 25 // OnBytesReceived(GetDataMessage()); | 25 // OnBytesReceived(GetDataMessage()); |
| 26 // break; | 26 // break; |
| 27 // case ReceiverState::CONNECTION_CLOSED: | 27 // case ReceiverState::CONNECTION_CLOSED: |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // The data message if there is one. | 210 // The data message if there is one. |
| 211 Packet data_message_; | 211 Packet data_message_; |
| 212 | 212 |
| 213 // The error the receiver encountered while processing packets. | 213 // The error the receiver encountered while processing packets. |
| 214 // Used for debugging purproses. | 214 // Used for debugging purproses. |
| 215 ReceiverError receiver_error_; | 215 ReceiverError receiver_error_; |
| 216 }; | 216 }; |
| 217 | 217 |
| 218 } // namespace weave | 218 } // namespace weave |
| 219 | 219 |
| 220 } // namespace proximity_auth | 220 } // namespace cryptauth |
| 221 | 221 |
| 222 #endif // COMPONENTS_PROXIMITY_AUTH_BLE_BLUETOOTH_LOW_ENERGY_WEAVE_PACKET_RECEI
VER_H_ | 222 #endif // COMPONENTS_CRYPTAUTH_BLE_BLUETOOTH_LOW_ENERGY_WEAVE_PACKET_RECEIVER_H
_ |
| OLD | NEW |