Loading system/gd/rust/linux/stack/src/bluetooth_adv.rs +719 −22 File changed.Preview size limit exceeded, changes collapsed. Show changes system/gd/rust/linux/stack/src/bluetooth_gatt.rs +6 −2 Original line number Diff line number Diff line Loading @@ -20,8 +20,8 @@ use bt_utils::array_utils; use crate::async_helper::{AsyncHelper, CallbackSender}; use crate::bluetooth::{Bluetooth, BluetoothDevice}; use crate::bluetooth_adv::{ AdvertiseData, AdvertiseManager, AdvertisingSetParameters, BtifGattAdvCallbacks, IAdvertisingSetCallback, PeriodicAdvertisingParameters, AdvertiseData, AdvertiseManager, AdvertiserActions, AdvertisingSetParameters, BtifGattAdvCallbacks, IAdvertisingSetCallback, PeriodicAdvertisingParameters, }; use crate::callbacks::Callbacks; use crate::uuid::UuidHelper; Loading Loading @@ -1881,6 +1881,10 @@ impl BluetoothGatt { } } } pub fn handle_adv_action(&mut self, action: AdvertiserActions) { self.adv_manager.get_impl().handle_action(action); } } #[derive(Debug, FromPrimitive, ToPrimitive)] Loading system/gd/rust/linux/stack/src/lib.rs +6 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ use crate::bluetooth::{ BluetoothDevice, DelayedActions, IBluetooth, }; use crate::bluetooth_admin::{BluetoothAdmin, IBluetoothAdmin}; use crate::bluetooth_adv::dispatch_le_adv_callbacks; use crate::bluetooth_adv::{dispatch_le_adv_callbacks, AdvertiserActions}; use crate::bluetooth_gatt::{ dispatch_gatt_client_callbacks, dispatch_gatt_server_callbacks, dispatch_le_scanner_callbacks, dispatch_le_scanner_inband_callbacks, BluetoothGatt, GattActions, Loading Loading @@ -116,6 +116,7 @@ pub enum Message { // Advertising related AdvertiserCallbackDisconnected(u32), AdvertiserActions(AdvertiserActions), SocketManagerActions(SocketActions), SocketManagerCallbackDisconnected(u32), Loading Loading @@ -367,6 +368,10 @@ impl Stack { bluetooth_gatt.lock().unwrap().remove_adv_callback(id); } Message::AdvertiserActions(action) => { bluetooth_gatt.lock().unwrap().handle_adv_action(action); } Message::SocketManagerActions(action) => { bluetooth_socketmgr.lock().unwrap().handle_actions(action); } Loading Loading
system/gd/rust/linux/stack/src/bluetooth_adv.rs +719 −22 File changed.Preview size limit exceeded, changes collapsed. Show changes
system/gd/rust/linux/stack/src/bluetooth_gatt.rs +6 −2 Original line number Diff line number Diff line Loading @@ -20,8 +20,8 @@ use bt_utils::array_utils; use crate::async_helper::{AsyncHelper, CallbackSender}; use crate::bluetooth::{Bluetooth, BluetoothDevice}; use crate::bluetooth_adv::{ AdvertiseData, AdvertiseManager, AdvertisingSetParameters, BtifGattAdvCallbacks, IAdvertisingSetCallback, PeriodicAdvertisingParameters, AdvertiseData, AdvertiseManager, AdvertiserActions, AdvertisingSetParameters, BtifGattAdvCallbacks, IAdvertisingSetCallback, PeriodicAdvertisingParameters, }; use crate::callbacks::Callbacks; use crate::uuid::UuidHelper; Loading Loading @@ -1881,6 +1881,10 @@ impl BluetoothGatt { } } } pub fn handle_adv_action(&mut self, action: AdvertiserActions) { self.adv_manager.get_impl().handle_action(action); } } #[derive(Debug, FromPrimitive, ToPrimitive)] Loading
system/gd/rust/linux/stack/src/lib.rs +6 −1 Original line number Diff line number Diff line Loading @@ -35,7 +35,7 @@ use crate::bluetooth::{ BluetoothDevice, DelayedActions, IBluetooth, }; use crate::bluetooth_admin::{BluetoothAdmin, IBluetoothAdmin}; use crate::bluetooth_adv::dispatch_le_adv_callbacks; use crate::bluetooth_adv::{dispatch_le_adv_callbacks, AdvertiserActions}; use crate::bluetooth_gatt::{ dispatch_gatt_client_callbacks, dispatch_gatt_server_callbacks, dispatch_le_scanner_callbacks, dispatch_le_scanner_inband_callbacks, BluetoothGatt, GattActions, Loading Loading @@ -116,6 +116,7 @@ pub enum Message { // Advertising related AdvertiserCallbackDisconnected(u32), AdvertiserActions(AdvertiserActions), SocketManagerActions(SocketActions), SocketManagerCallbackDisconnected(u32), Loading Loading @@ -367,6 +368,10 @@ impl Stack { bluetooth_gatt.lock().unwrap().remove_adv_callback(id); } Message::AdvertiserActions(action) => { bluetooth_gatt.lock().unwrap().handle_adv_action(action); } Message::SocketManagerActions(action) => { bluetooth_socketmgr.lock().unwrap().handle_actions(action); } Loading