1 /*
2  * Copyright 2022 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #pragma once
18 
19 // Use gRPC HCI PacketType definitions so we don't expose Rootcanal's version
20 // outside of the Bluetooth Facade.
21 #include <cstdint>
22 
23 #include "netsim/common.pb.h"
24 #include "netsim/hci_packet.pb.h"
25 #include "rust/cxx.h"
26 
27 namespace netsim {
28 namespace backend {
29 
30 using netsim::common::ChipKind;
31 
32 /* Handle packet responses for the backend. */
33 
34 void HandleResponse(uint32_t chip_id, const std::vector<uint8_t> &packet,
35                     /* optional */ packet::HCIPacket_PacketType packet_type);
36 
37 void HandleResponseCxx(uint32_t chip_id, const rust::Vec<rust::u8> &packet,
38                        /* optional */ uint8_t packet_type);
39 
40 }  // namespace backend
41 }  // namespace netsim
42