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',
  characteristic_event_generated: 'bluetooth.characteristicEventGenerated',
  descriptor_event_generated: 'bluetooth.descriptorEventGenerated'
}.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,
  'bluetooth.characteristicEventGenerated' => Bluetooth::CharacteristicEventGeneratedParameters,
  'bluetooth.descriptorEventGenerated' => Bluetooth::DescriptorEventGeneratedParameters
}.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_data ⇒ 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.



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

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

#characteristic_properties ⇒ 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.



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

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.



362
363
364
365
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 362

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.



342
343
344
345
346
347
348
349
350
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 342

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_record ⇒ 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.



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

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.



354
355
356
357
358
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 354

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.



382
383
384
385
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 382

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_parameters ⇒ 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
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 338

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.



411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 411

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.



433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 433

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.



457
458
459
460
461
462
463
464
465
466
467
468
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 457

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.



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

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.



389
390
391
392
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 389

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.



396
397
398
399
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 396

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.



369
370
371
372
373
374
375
376
377
378
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 369

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.



403
404
405
406
407
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 403

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