cdp-driver 0.3.0

Chrome DevTools Protocol client for AI agent browser control
Documentation
// @generated by `just generate-methods` from protocol/*.json.
// Do not edit by hand; edit xtask/ and regenerate.

//! This domain allows configuring virtual Bluetooth devices to test the
//! web-bluetooth API.
//!
//! Method names for the `BluetoothEmulation` domain, for use with
//! [`CdpClient::call`](crate::CdpClient::call).
//!
//! This domain is experimental and may change without notice.

/// Enable the BluetoothEmulation domain.
///
/// Parameters:
/// - `state`: CentralState
/// - `leSupported`: boolean
pub const ENABLE: &str = "BluetoothEmulation.enable";

/// Set the state of the simulated central.
///
/// Parameters:
/// - `state`: CentralState
pub const SET_SIMULATED_CENTRAL_STATE: &str = "BluetoothEmulation.setSimulatedCentralState";

/// Disable the BluetoothEmulation domain.
pub const DISABLE: &str = "BluetoothEmulation.disable";

/// Simulates a peripheral with |address|, |name| and |knownServiceUuids| that
/// has already been connected to the system.
///
/// Parameters:
/// - `address`: string
/// - `name`: string
/// - `manufacturerData`: array
/// - `knownServiceUuids`: array
pub const SIMULATE_PRECONNECTED_PERIPHERAL: &str =
    "BluetoothEmulation.simulatePreconnectedPeripheral";

/// Simulates an advertisement packet described in |entry| being received by
/// the central.
///
/// Parameters:
/// - `entry`: ScanEntry
pub const SIMULATE_ADVERTISEMENT: &str = "BluetoothEmulation.simulateAdvertisement";

/// Simulates the response code from the peripheral with |address| for a GATT
/// operation of |type|. The |code| value follows the HCI Error Codes from
/// Bluetooth Core Specification Vol 2 Part D 1.3 List Of Error Codes.
///
/// Parameters:
/// - `address`: string
/// - `type`: GATTOperationType
/// - `code`: integer
pub const SIMULATE_GATT_OPERATION_RESPONSE: &str =
    "BluetoothEmulation.simulateGATTOperationResponse";

/// Simulates the response from the characteristic with |characteristicId| for
/// a characteristic operation of |type|. The |code| value follows the Error
/// Codes from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error
/// Response. The |data| is expected to exist when simulating a successful
/// read operation response.
///
/// Parameters:
/// - `characteristicId`: string
/// - `type`: CharacteristicOperationType
/// - `code`: integer
/// - `data`: string (optional)
pub const SIMULATE_CHARACTERISTIC_OPERATION_RESPONSE: &str =
    "BluetoothEmulation.simulateCharacteristicOperationResponse";

/// Simulates the response from the descriptor with |descriptorId| for a
/// descriptor operation of |type|. The |code| value follows the Error Codes
/// from Bluetooth Core Specification Vol 3 Part F 3.4.1.1 Error Response. The
/// |data| is expected to exist when simulating a successful read operation
/// response.
///
/// Parameters:
/// - `descriptorId`: string
/// - `type`: DescriptorOperationType
/// - `code`: integer
/// - `data`: string (optional)
pub const SIMULATE_DESCRIPTOR_OPERATION_RESPONSE: &str =
    "BluetoothEmulation.simulateDescriptorOperationResponse";

/// Adds a service with |serviceUuid| to the peripheral with |address|.
///
/// Parameters:
/// - `address`: string
/// - `serviceUuid`: string
///
/// Returns: `serviceId`
pub const ADD_SERVICE: &str = "BluetoothEmulation.addService";

/// Removes the service respresented by |serviceId| from the simulated
/// central.
///
/// Parameters:
/// - `serviceId`: string
pub const REMOVE_SERVICE: &str = "BluetoothEmulation.removeService";

/// Adds a characteristic with |characteristicUuid| and |properties| to the
/// service represented by |serviceId|.
///
/// Parameters:
/// - `serviceId`: string
/// - `characteristicUuid`: string
/// - `properties`: CharacteristicProperties
///
/// Returns: `characteristicId`
pub const ADD_CHARACTERISTIC: &str = "BluetoothEmulation.addCharacteristic";

/// Removes the characteristic respresented by |characteristicId| from the
/// simulated central.
///
/// Parameters:
/// - `characteristicId`: string
pub const REMOVE_CHARACTERISTIC: &str = "BluetoothEmulation.removeCharacteristic";

/// Adds a descriptor with |descriptorUuid| to the characteristic respresented
/// by |characteristicId|.
///
/// Parameters:
/// - `characteristicId`: string
/// - `descriptorUuid`: string
///
/// Returns: `descriptorId`
pub const ADD_DESCRIPTOR: &str = "BluetoothEmulation.addDescriptor";

/// Removes the descriptor with |descriptorId| from the simulated central.
///
/// Parameters:
/// - `descriptorId`: string
pub const REMOVE_DESCRIPTOR: &str = "BluetoothEmulation.removeDescriptor";

/// Simulates a GATT disconnection from the peripheral with |address|.
///
/// Parameters:
/// - `address`: string
pub const SIMULATE_GATT_DISCONNECTION: &str = "BluetoothEmulation.simulateGATTDisconnection";