Class: Selenium::WebDriver::BiDi::Protocol::Bluetooth Private

Inherits:
Domain
  • Object
show all
Defined in:
lib/selenium/webdriver/bidi/protocol/bluetooth.rb

Overview

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Defined Under Namespace

Classes: HandleRequestDevicePromptParameters

Constant Summary collapse

EVENTS =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  request_device_prompt_updated: 'bluetooth.requestDevicePromptUpdated',
  gatt_connection_attempted: 'bluetooth.gattConnectionAttempted'
}.freeze
SIMULATE_ADAPTER_PARAMETERS_STATE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  absent: 'absent',
  powered_off: 'powered-off',
  powered_on: 'powered-on'
}.freeze
SIMULATE_SERVICE_PARAMETERS_TYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  add: 'add',
  remove: 'remove'
}.freeze
SIMULATE_CHARACTERISTIC_PARAMETERS_TYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  add: 'add',
  remove: 'remove'
}.freeze
SIMULATE_CHARACTERISTIC_RESPONSE_PARAMETERS_TYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  read: 'read',
  write: 'write',
  subscribe_to_notifications: 'subscribe-to-notifications',
  unsubscribe_from_notifications: 'unsubscribe-from-notifications'
}.freeze
SIMULATE_DESCRIPTOR_PARAMETERS_TYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  add: 'add',
  remove: 'remove'
}.freeze
SIMULATE_DESCRIPTOR_RESPONSE_PARAMETERS_TYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  read: 'read',
  write: 'write'
}.freeze
CHARACTERISTIC_EVENT_GENERATED_PARAMETERS_TYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  read: 'read',
  write_with_response: 'write-with-response',
  write_without_response: 'write-without-response',
  subscribe_to_notifications: 'subscribe-to-notifications',
  unsubscribe_from_notifications: 'unsubscribe-from-notifications'
}.freeze
DESCRIPTOR_EVENT_GENERATED_PARAMETERS_TYPE =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  read: 'read',
  write: 'write'
}.freeze
BluetoothManufacturerData =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  key: {wire_key: 'key', primitive: 'integer'},
  data: {wire_key: 'data', primitive: 'string'}
)
CharacteristicProperties =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  broadcast: {wire_key: 'broadcast', required: false, primitive: 'boolean'},
  read: {wire_key: 'read', required: false, primitive: 'boolean'},
  write_without_response: {wire_key: 'writeWithoutResponse', required: false, primitive: 'boolean'},
  write: {wire_key: 'write', required: false, primitive: 'boolean'},
  notify: {wire_key: 'notify', required: false, primitive: 'boolean'},
  indicate: {wire_key: 'indicate', required: false, primitive: 'boolean'},
  authenticated_signed_writes: {wire_key: 'authenticatedSignedWrites', required: false, primitive: 'boolean'},
  extended_properties: {wire_key: 'extendedProperties', required: false, primitive: 'boolean'}
)
RequestDeviceInfo =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  id: {wire_key: 'id', primitive: 'string'},
  name: {wire_key: 'name', nullable: true, primitive: 'string'}
)
ScanRecord =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  name: {wire_key: 'name', required: false, primitive: 'string'},
  uuids: {wire_key: 'uuids', required: false, list: true},
  appearance: {wire_key: 'appearance', required: false, primitive: 'number'},
  manufacturer_data: {
    wire_key: 'manufacturerData',
    required: false,
    ref: 'Bluetooth::BluetoothManufacturerData',
    list: true
  }
)
SimulateAdapterParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  le_supported: {wire_key: 'leSupported', required: false, primitive: 'boolean'},
  state: {wire_key: 'state', enum: 'Bluetooth::SIMULATE_ADAPTER_PARAMETERS_STATE'}
)
DisableSimulationParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'}
)
SimulatePreconnectedPeripheralParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  address: {wire_key: 'address', primitive: 'string'},
  name: {wire_key: 'name', primitive: 'string'},
  manufacturer_data: {wire_key: 'manufacturerData', ref: 'Bluetooth::BluetoothManufacturerData', list: true},
  known_service_uuids: {wire_key: 'knownServiceUuids', list: true}
)
SimulateAdvertisementParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  scan_entry: {wire_key: 'scanEntry', ref: 'Bluetooth::SimulateAdvertisementScanEntryParameters'}
)
SimulateAdvertisementScanEntryParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  device_address: {wire_key: 'deviceAddress', primitive: 'string'},
  rssi: {wire_key: 'rssi', primitive: 'number'},
  scan_record: {wire_key: 'scanRecord', ref: 'Bluetooth::ScanRecord'}
)
SimulateGattConnectionResponseParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  address: {wire_key: 'address', primitive: 'string'},
  code: {wire_key: 'code', primitive: 'integer'}
)
SimulateGattDisconnectionParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  address: {wire_key: 'address', primitive: 'string'}
)
SimulateServiceParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  address: {wire_key: 'address', primitive: 'string'},
  uuid: {wire_key: 'uuid', primitive: 'string'},
  type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_SERVICE_PARAMETERS_TYPE'}
)
SimulateCharacteristicParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  address: {wire_key: 'address', primitive: 'string'},
  service_uuid: {wire_key: 'serviceUuid', primitive: 'string'},
  characteristic_uuid: {wire_key: 'characteristicUuid', primitive: 'string'},
  characteristic_properties: {
    wire_key: 'characteristicProperties',
    required: false,
    ref: 'Bluetooth::CharacteristicProperties'
  },
  type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_CHARACTERISTIC_PARAMETERS_TYPE'}
)
SimulateCharacteristicResponseParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  address: {wire_key: 'address', primitive: 'string'},
  service_uuid: {wire_key: 'serviceUuid', primitive: 'string'},
  characteristic_uuid: {wire_key: 'characteristicUuid', primitive: 'string'},
  type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_CHARACTERISTIC_RESPONSE_PARAMETERS_TYPE'},
  code: {wire_key: 'code', primitive: 'integer'},
  data: {wire_key: 'data', required: false, list: true}
)
SimulateDescriptorParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  address: {wire_key: 'address', primitive: 'string'},
  service_uuid: {wire_key: 'serviceUuid', primitive: 'string'},
  characteristic_uuid: {wire_key: 'characteristicUuid', primitive: 'string'},
  descriptor_uuid: {wire_key: 'descriptorUuid', primitive: 'string'},
  type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_DESCRIPTOR_PARAMETERS_TYPE'}
)
SimulateDescriptorResponseParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  address: {wire_key: 'address', primitive: 'string'},
  service_uuid: {wire_key: 'serviceUuid', primitive: 'string'},
  characteristic_uuid: {wire_key: 'characteristicUuid', primitive: 'string'},
  descriptor_uuid: {wire_key: 'descriptorUuid', primitive: 'string'},
  type: {wire_key: 'type', enum: 'Bluetooth::SIMULATE_DESCRIPTOR_RESPONSE_PARAMETERS_TYPE'},
  code: {wire_key: 'code', primitive: 'integer'},
  data: {wire_key: 'data', required: false, list: true}
)
RequestDevicePromptUpdatedParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  prompt: {wire_key: 'prompt', primitive: 'string'},
  devices: {wire_key: 'devices', ref: 'Bluetooth::RequestDeviceInfo', list: true}
)
GattConnectionAttemptedParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  address: {wire_key: 'address', primitive: 'string'}
)
CharacteristicEventGeneratedParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  address: {wire_key: 'address', primitive: 'string'},
  service_uuid: {wire_key: 'serviceUuid', primitive: 'string'},
  characteristic_uuid: {wire_key: 'characteristicUuid', primitive: 'string'},
  type: {wire_key: 'type', enum: 'Bluetooth::CHARACTERISTIC_EVENT_GENERATED_PARAMETERS_TYPE'},
  data: {wire_key: 'data', required: false, list: true}
)
DescriptorEventGeneratedParameters =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

Serialization::Record.define(
  context: {wire_key: 'context', primitive: 'string'},
  address: {wire_key: 'address', primitive: 'string'},
  service_uuid: {wire_key: 'serviceUuid', primitive: 'string'},
  characteristic_uuid: {wire_key: 'characteristicUuid', primitive: 'string'},
  descriptor_uuid: {wire_key: 'descriptorUuid', primitive: 'string'},
  type: {wire_key: 'type', enum: 'Bluetooth::DESCRIPTOR_EVENT_GENERATED_PARAMETERS_TYPE'},
  data: {wire_key: 'data', required: false, list: true}
)
EVENT_TYPES =

This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.

{
  'bluetooth.requestDevicePromptUpdated' => Bluetooth::RequestDevicePromptUpdatedParameters,
  'bluetooth.gattConnectionAttempted' => Bluetooth::GattConnectionAttemptedParameters
}.freeze

Instance Method Summary collapse

Methods inherited from Domain

#initialize

Constructor Details

This class inherits a constructor from Selenium::WebDriver::BiDi::Protocol::Domain

Instance Method Details

#bluetooth_manufacturer_dataObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



331
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 331

def bluetooth_manufacturer_data(**) = BluetoothManufacturerData.new(**)

#characteristic_propertiesObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



332
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 332

def characteristic_properties(**) = CharacteristicProperties.new(**)

#disable_simulation(context:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



358
359
360
361
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 358

def disable_simulation(context:)
  params = DisableSimulationParameters.new(context: context)
  execute(cmd: 'bluetooth.disableSimulation', params: params)
end

#handle_request_device_prompt(context:, prompt:, accept:, device: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



338
339
340
341
342
343
344
345
346
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 338

def handle_request_device_prompt(context:, prompt:, accept:, device: Serialization::UNSET)
  params = HandleRequestDevicePromptParameters.build(
    context: context,
    prompt: prompt,
    accept: accept,
    device: device
  )
  execute(cmd: 'bluetooth.handleRequestDevicePrompt', params: params)
end

#scan_recordObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



333
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 333

def scan_record(**) = ScanRecord.new(**)

#simulate_adapter(context:, state:, le_supported: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



350
351
352
353
354
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 350

def simulate_adapter(context:, state:, le_supported: Serialization::UNSET)
  Serialization.validate!('state', state, Bluetooth::SIMULATE_ADAPTER_PARAMETERS_STATE)
  params = SimulateAdapterParameters.new(context: context, le_supported: le_supported, state: state)
  execute(cmd: 'bluetooth.simulateAdapter', params: params)
end

#simulate_advertisement(context:, scan_entry:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



378
379
380
381
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 378

def simulate_advertisement(context:, scan_entry:)
  params = SimulateAdvertisementParameters.new(context: context, scan_entry: scan_entry)
  execute(cmd: 'bluetooth.simulateAdvertisement', params: params)
end

#simulate_advertisement_scan_entry_parametersObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



334
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 334

def simulate_advertisement_scan_entry_parameters(**) = SimulateAdvertisementScanEntryParameters.new(**)

#simulate_characteristic(context:, address:, service_uuid:, characteristic_uuid:, type:, characteristic_properties: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 407

def simulate_characteristic(
  context:,
  address:,
  service_uuid:,
  characteristic_uuid:,
  type:,
  characteristic_properties: Serialization::UNSET
)
  Serialization.validate!('type', type, Bluetooth::SIMULATE_CHARACTERISTIC_PARAMETERS_TYPE)
  params = SimulateCharacteristicParameters.new(
    context: context,
    address: address,
    service_uuid: service_uuid,
    characteristic_uuid: characteristic_uuid,
    characteristic_properties: characteristic_properties,
    type: type
  )
  execute(cmd: 'bluetooth.simulateCharacteristic', params: params)
end

#simulate_characteristic_response(context:, address:, service_uuid:, characteristic_uuid:, type:, code:, data: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 429

def simulate_characteristic_response(
  context:,
  address:,
  service_uuid:,
  characteristic_uuid:,
  type:,
  code:,
  data: Serialization::UNSET
)
  Serialization.validate!('type', type, Bluetooth::SIMULATE_CHARACTERISTIC_RESPONSE_PARAMETERS_TYPE)
  params = SimulateCharacteristicResponseParameters.new(
    context: context,
    address: address,
    service_uuid: service_uuid,
    characteristic_uuid: characteristic_uuid,
    type: type,
    code: code,
    data: data
  )
  execute(cmd: 'bluetooth.simulateCharacteristicResponse', params: params)
end

#simulate_descriptor(context:, address:, service_uuid:, characteristic_uuid:, descriptor_uuid:, type:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



453
454
455
456
457
458
459
460
461
462
463
464
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 453

def simulate_descriptor(context:, address:, service_uuid:, characteristic_uuid:, descriptor_uuid:, type:)
  Serialization.validate!('type', type, Bluetooth::SIMULATE_DESCRIPTOR_PARAMETERS_TYPE)
  params = SimulateDescriptorParameters.new(
    context: context,
    address: address,
    service_uuid: service_uuid,
    characteristic_uuid: characteristic_uuid,
    descriptor_uuid: descriptor_uuid,
    type: type
  )
  execute(cmd: 'bluetooth.simulateDescriptor', params: params)
end

#simulate_descriptor_response(context:, address:, service_uuid:, characteristic_uuid:, descriptor_uuid:, type:, code:, data: Serialization::UNSET) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 468

def simulate_descriptor_response(
  context:,
  address:,
  service_uuid:,
  characteristic_uuid:,
  descriptor_uuid:,
  type:,
  code:,
  data: Serialization::UNSET
)
  Serialization.validate!('type', type, Bluetooth::SIMULATE_DESCRIPTOR_RESPONSE_PARAMETERS_TYPE)
  params = SimulateDescriptorResponseParameters.new(
    context: context,
    address: address,
    service_uuid: service_uuid,
    characteristic_uuid: characteristic_uuid,
    descriptor_uuid: descriptor_uuid,
    type: type,
    code: code,
    data: data
  )
  execute(cmd: 'bluetooth.simulateDescriptorResponse', params: params)
end

#simulate_gatt_connection_response(context:, address:, code:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



385
386
387
388
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 385

def simulate_gatt_connection_response(context:, address:, code:)
  params = SimulateGattConnectionResponseParameters.new(context: context, address: address, code: code)
  execute(cmd: 'bluetooth.simulateGattConnectionResponse', params: params)
end

#simulate_gatt_disconnection(context:, address:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



392
393
394
395
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 392

def simulate_gatt_disconnection(context:, address:)
  params = SimulateGattDisconnectionParameters.new(context: context, address: address)
  execute(cmd: 'bluetooth.simulateGattDisconnection', params: params)
end

#simulate_preconnected_peripheral(context:, address:, name:, manufacturer_data:, known_service_uuids:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



365
366
367
368
369
370
371
372
373
374
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 365

def simulate_preconnected_peripheral(context:, address:, name:, manufacturer_data:, known_service_uuids:)
  params = SimulatePreconnectedPeripheralParameters.new(
    context: context,
    address: address,
    name: name,
    manufacturer_data: manufacturer_data,
    known_service_uuids: known_service_uuids
  )
  execute(cmd: 'bluetooth.simulatePreconnectedPeripheral', params: params)
end

#simulate_service(context:, address:, uuid:, type:) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



399
400
401
402
403
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 399

def simulate_service(context:, address:, uuid:, type:)
  Serialization.validate!('type', type, Bluetooth::SIMULATE_SERVICE_PARAMETERS_TYPE)
  params = SimulateServiceParameters.new(context: context, address: address, uuid: uuid, type: type)
  execute(cmd: 'bluetooth.simulateService', params: params)
end