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: 'id',
  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: 'uuid',
  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: 'serviceUuid',
  characteristic_uuid: 'characteristicUuid',
  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: 'serviceUuid',
  characteristic_uuid: 'characteristicUuid',
  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: 'serviceUuid',
  characteristic_uuid: 'characteristicUuid',
  descriptor_uuid: 'descriptorUuid',
  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: 'serviceUuid',
  characteristic_uuid: 'characteristicUuid',
  descriptor_uuid: 'descriptorUuid',
  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: 'prompt',
  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: 'serviceUuid',
  characteristic_uuid: 'characteristicUuid',
  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: 'serviceUuid',
  characteristic_uuid: 'characteristicUuid',
  descriptor_uuid: 'descriptorUuid',
  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

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



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

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.



308
309
310
311
312
313
314
315
316
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 308

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

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



320
321
322
323
324
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 320

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.



348
349
350
351
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 348

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

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



377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 377

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.



399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 399

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.



423
424
425
426
427
428
429
430
431
432
433
434
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 423

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.



438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 438

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.



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

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.



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

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.



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

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.



369
370
371
372
373
# File 'lib/selenium/webdriver/bidi/protocol/bluetooth.rb', line 369

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