
    ]js              	      V   d Z ddlmZ ddlmZ ddlmZmZ ddlm	Z	 ddl
mZ ddlmZmZmZ e G d d	             Ze G d
 d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d d             Ze G d  d!             Ze G d" d#             Ze G d$ d%             Ze G d& d'             Ze G d( d)             Z e G d* d+             Z!e G d, d-             Z"e G d. d/             Z#e G d0 d1             Z$e G d2 d3             Z%e G d4 d5             Z&d6d7d8Z' G d9 d:      Z( e)       jU                  d/e+      Z, e)       jU                  d1e+      Z- e)       Z. ed;d6e.jU                  d<      re.jU                  d<e+      ne+       ed=d7e.jU                  d>      re.jU                  d>e+      ne+      d8e(_/        y?)@z
WebDriver BiDi bluetooth module.

Provides a simulation API for Web Bluetooth, allowing tests to fake
Bluetooth adapters, nearby peripherals, GATT services, characteristics,
and descriptors without physical hardware.
    )annotations)Callable)	dataclassfield)Any)command_builder)EventConfig_EventWrapper_EventManagerc                       e Zd ZU dZdZded<   y)BluetoothManufacturerDatazBluetoothManufacturerData.N
Any | Nonekey)__name__
__module____qualname____doc__r   __annotations__     \/home/ubuntu/.local/lib/python3.12/site-packages/selenium/webdriver/common/bidi/bluetooth.pyr   r      s    $Cr   r   c                      e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	ded<   dZ
ded	<   dZded
<   dZded<   y)CharacteristicPropertieszCharacteristicProperties.Nbool | None	broadcastreadwrite_without_responsewritenotifyindicateauthenticated_signed_writesextended_properties)r   r   r   r   r   r   r   r   r   r   r    r!   r"   r   r   r   r   r      sX    #!I{!D+*.K.E;FK Hk /33'++r   r   c                  .    e Zd ZU dZdZded<   dZded<   y)RequestDeviceInfoz
    Identifies a simulated Bluetooth device returned in a device-request prompt.

    Attributes:
        id: The internal device identifier.
        name: The human-readable device name shown in the prompt.
    Nr   idname)r   r   r   r   r%   r   r&   r   r   r   r$   r$   -   s     B
D*r   r$   c                  f    e Zd ZU dZdZded<    ee      Zded<   dZ	ded	<    ee      Z
ded
<   y)
ScanRecordzScanRecord.N
str | Noner&   default_factory	list[Any]uuidsr   
appearancemanufacturer_data)r   r   r   r   r&   r   r   listr-   r.   r/   r   r   r   r(   r(   ;   s8    D*T2E92!J
!#(#>y>r   r(   c                  .    e Zd ZU dZdZded<   dZded<   y)#HandleRequestDevicePromptParametersz$HandleRequestDevicePromptParameters.Nr)   contextr   prompt)r   r   r   r   r3   r   r4   r   r   r   r2   r2   E   s    .GZFJr   r2   c                  .    e Zd ZU dZdZded<   dZded<   y))HandleRequestDevicePromptAcceptParametersz*HandleRequestDevicePromptAcceptParameters.Nr   acceptdevice)r   r   r   r   r7   r   r8   r   r   r   r6   r6   M   s    4FJFJr   r6   c                       e Zd ZU dZdZded<   y))HandleRequestDevicePromptCancelParametersz*HandleRequestDevicePromptCancelParameters.Nr   r7   )r   r   r   r   r7   r   r   r   r   r:   r:   U   s    4FJr   r:   c                  <    e Zd ZU dZdZded<   dZded<   dZded<   y)	SimulateAdapterParametersa  
    Parameters for simulating a Bluetooth adapter state.

    Attributes:
        context: The browsing context ID to target.
        le_supported: Whether the adapter supports Bluetooth Low Energy.
        state: Adapter power state (e.g. 'powered-on', 'powered-off', 'absent').
    Nr)   r3   r   le_supportedr   state)r   r   r   r   r3   r   r=   r>   r   r   r   r<   r<   \   s'     GZ $L+$E:r   r<   c                       e Zd ZU dZdZded<   y)DisableSimulationParameterszDisableSimulationParameters.Nr)   r3   )r   r   r   r   r3   r   r   r   r   r@   r@   l   s    &GZr   r@   c                  t    e Zd ZU dZdZded<   dZded<   dZded<    ee	      Z
ded	<    ee	      Zded
<   y)(SimulatePreconnectedPeripheralParametersa  
    Parameters for adding a pre-connected simulated peripheral.

    Attributes:
        context: The browsing context ID to target.
        address: The Bluetooth device address (e.g. '09:09:09:09:09:09').
        name: The device name advertised to the page.
        manufacturer_data: List of manufacturer-specific data records.
        known_service_uuids: UUIDs of GATT services the device exposes.
    Nr)   r3   addressr&   r*   r,   r/   known_service_uuids)r   r   r   r   r3   r   rC   r&   r   r0   r/   rD   r   r   r   rB   rB   s   sG    	 GZGZD*#(#>y>%*4%@@r   rB   c                  .    e Zd ZU dZdZded<   dZded<   y)SimulateAdvertisementParametersz
    Parameters for injecting a simulated advertisement packet.

    Attributes:
        context: The browsing context ID to target.
        scan_entry: The advertisement scan record to inject.
    Nr)   r3   r   
scan_entry)r   r   r   r   r3   r   rG   r   r   r   rF   rF      s     GZ!J
!r   rF   c                  <    e Zd ZU dZdZded<   dZded<   dZded<   y)(SimulateAdvertisementScanEntryParametersz)SimulateAdvertisementScanEntryParameters.Nr)   device_addressr   rssiscan_record)r   r   r   r   rJ   r   rK   rL   r   r   r   rI   rI      s#    3!%NJ%D*"K"r   rI   c                  <    e Zd ZU dZdZded<   dZded<   dZded<   y)(SimulateGattConnectionResponseParametersz
    Parameters for simulating a GATT connection response.

    Attributes:
        context: The browsing context ID to target.
        address: The address of the peripheral.
        code: The ATT error code (0 = success).
    Nr)   r3   rC   
int | Nonecode)r   r   r   r   r3   r   rC   rP   r   r   r   rN   rN      s'     GZGZD*r   rN   c                  .    e Zd ZU dZdZded<   dZded<   y)#SimulateGattDisconnectionParametersz$SimulateGattDisconnectionParameters.Nr)   r3   rC   r   r   r   r   r3   r   rC   r   r   r   rR   rR      s    .GZGZr   rR   c                  J    e Zd ZU dZdZded<   dZded<   dZded<   dZded<   y)	SimulateServiceParameterszSimulateServiceParameters.Nr)   r3   rC   r   uuidtype)	r   r   r   r   r3   r   rC   rV   rW   r   r   r   rU   rU      s-    $GZGZD*D*r   rU   c                  f    e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	ded	<   dZ
ded
<   y) SimulateCharacteristicParametersav  
    Parameters for adding a simulated GATT characteristic to a service.

    Attributes:
        context: The browsing context ID to target.
        address: The peripheral address.
        service: The service UUID the characteristic belongs to.
        characteristic: UUID of the characteristic.
        properties: Supported operations (read, write, notify, etc.).
    Nr)   r3   rC   r   service_uuidcharacteristic_uuidcharacteristic_propertiesrW   )r   r   r   r   r3   r   rC   rZ   r[   r\   rW   r   r   r   rY   rY      sG    	 GZGZ#L*#&**,0z0D*r   rY   c                      e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	ded	<   dZ
d
ed<    ee      Zded<   y)(SimulateCharacteristicResponseParametersz)SimulateCharacteristicResponseParameters.Nr)   r3   rC   r   rZ   r[   rW   rO   rP   r*   r,   data)r   r   r   r   r3   r   rC   rZ   r[   rW   rP   r   r0   r_   r   r   r   r^   r^      sQ    3GZGZ#L*#&**D*D*D1D)1r   r^   c                  f    e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	ded	<   dZ
ded
<   y)SimulateDescriptorParameterszSimulateDescriptorParameters.Nr)   r3   rC   r   rZ   r[   descriptor_uuidrW   )r   r   r   r   r3   r   rC   rZ   r[   rb   rW   r   r   r   ra   ra      sB    'GZGZ#L*#&**"&OZ&D*r   ra   c                      e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	ded	<   dZ
ded
<   dZded<    ee      Zded<   y)$SimulateDescriptorResponseParametersz%SimulateDescriptorResponseParameters.Nr)   r3   rC   r   rZ   r[   rb   rW   rO   rP   r*   r,   r_   )r   r   r   r   r3   r   rC   rZ   r[   rb   rW   rP   r   r0   r_   r   r   r   rd   rd      s[    /GZGZ#L*#&**"&OZ&D*D*D1D)1r   rd   c                  J    e Zd ZU dZdZded<   dZded<    ee      Z	ded	<   y)
$RequestDevicePromptUpdatedParametersz%RequestDevicePromptUpdatedParameters.Nr)   r3   r   r4   r*   r,   devices)
r   r   r   r   r3   r   r4   r   r0   rg   r   r   r   rf   rf      s(    /GZFJt4GY4r   rf   c                  .    e Zd ZU dZdZded<   dZded<   y)!GattConnectionAttemptedParametersz"GattConnectionAttemptedParameters.Nr)   r3   rC   rS   r   r   r   ri   ri     s    ,GZGZr   ri   c                  t    e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	ded	<    e
e
      Zded<   y)&CharacteristicEventGeneratedParametersz'CharacteristicEventGeneratedParameters.Nr)   r3   rC   r   rZ   r[   rW   r*   r,   r_   )r   r   r   r   r3   r   rC   rZ   r[   rW   r   r0   r_   r   r   r   rk   rk     sG    1GZGZ#L*#&**D*D1D)1r   rk   c                      e Zd ZU dZdZded<   dZded<   dZded<   dZded<   dZ	ded	<   dZ
ded
<    ee      Zded<   y)"DescriptorEventGeneratedParametersz#DescriptorEventGeneratedParameters.Nr)   r3   rC   r   rZ   r[   rb   rW   r*   r,   r_   )r   r   r   r   r3   r   rC   rZ   r[   rb   rW   r   r0   r_   r   r   r   rm   rm     sQ    -GZGZ#L*#&**"&OZ&D*D1D)1r   rm   z$bluetooth.requestDevicePromptUpdatedz!bluetooth.gattConnectionAttempted)request_device_prompt_updatedgatt_connection_attemptedc                     e Zd ZU dZi Zded<   ddZdddZdddZdddZ		 	 	 	 	 d	 	 	 	 	 	 	 	 	 dd	Z
dd d
Z	 	 	 d	 	 	 	 	 d!dZdd"dZ	 	 	 	 d#	 	 	 	 	 	 	 d$dZ	 	 	 	 	 	 d%	 	 	 	 	 	 	 	 	 	 	 d&dZ	 	 	 	 	 	 	 d'	 	 	 	 	 	 	 	 	 	 	 	 	 d(dZ	 	 	 	 	 	 d%	 	 	 	 	 	 	 	 	 	 	 d)dZ	 	 	 	 	 	 	 	 d*	 	 	 	 	 	 	 	 	 	 	 	 	 	 	 d+dZ	 	 	 	 	 	 d%	 	 	 	 	 	 	 	 	 	 	 d,dZ	 	 	 	 	 	 	 d'	 	 	 	 	 	 	 	 	 	 	 	 	 d-dZdd.dZd/dZddZy)0	Bluetoothz
    BiDi interface for simulating Web Bluetooth hardware.

    Simulate adapters, peripherals, GATT services, characteristics,
    and descriptors without physical hardware.
    zdict[str, EventConfig]EVENT_CONFIGSc                H    || _         t        || j                        | _        y N)_connr   rr   _event_manager)selfconns     r   __init__zBluetooth.__init__5  s    
+D$2D2DEr   Nc                    |t        d      |t        d      ||d}|j                         D ci c]  \  }}|	|| }}}t        d|      }| j                  j	                  |      }|S c c}}w )z
        Dismiss or accept a Bluetooth device-chooser prompt.

        Args:
            context: The browsing context containing the prompt.
            prompt: The prompt ID returned in the prompt-opened event.
        zChandle_request_device_prompt() missing required argument: 'context'zBhandle_request_device_prompt() missing required argument: 'prompt')r3   r4   z#bluetooth.handleRequestDevicePrompt	TypeErroritemsr   ru   execute)rw   r3   r4   paramskvcmdresults           r   handle_request_device_promptz&Bluetooth.handle_request_device_prompt9  s     ?abb>`aa 
 $*<<>C41aQ]!Q$CCCVL##C( D
   
A/A/c                    |t        d      |t        d      |||d}|j                         D ci c]  \  }}|	|| }}}t        d|      }| j                  j	                  |      }|S c c}}w )a  
        Simulate a Bluetooth adapter in the given browsing context.

        Args:
            context: The browsing context ID to target.
            le_supported: Whether Low Energy is supported.
            state: Adapter state ('powered-on', 'powered-off', 'absent').
        z7simulate_adapter() missing required argument: 'context'z5simulate_adapter() missing required argument: 'state')r3   leSupportedr>   zbluetooth.simulateAdapterr{   )	rw   r3   r=   r>   r   r   r   r   r   s	            r   simulate_adapterzBluetooth.simulate_adapterO  s     ?UVV=STT '

 $*<<>C41aQ]!Q$CC96B##C( Ds
   
A0A0c                    |t        d      d|i}|j                         D ci c]  \  }}|	|| }}}t        d|      }| j                  j	                  |      }|S c c}}w )z
        Disable all Bluetooth simulation in the given context, restoring real behaviour.

        Args:
            context: The browsing context ID to stop simulating.
        z9disable_simulation() missing required argument: 'context'r3   zbluetooth.disableSimulationr{   )rw   r3   r   r   r   r   r   s          r   disable_simulationzBluetooth.disable_simulationg  sv     ?WXX w
 $*<<>C41aQ]!Q$CC;VD##C( Ds
   
A!A!c                >   |t        d      |t        d      |t        d      |t        d      |t        d      |||||d}|j                         D ci c]  \  }}|	|| }}}t        d|      }	| j                  j	                  |	      }
|
S c c}}w )a  
        Register a simulated peripheral as already connected to the adapter.

        Args:
            context: The browsing context ID to target.
            address: The Bluetooth device address.
            name: The device name.
            manufacturer_data: Manufacturer-specific advertisement data.
            known_service_uuids: List of GATT service UUIDs the device exposes.
        zGsimulate_preconnected_peripheral() missing required argument: 'context'zGsimulate_preconnected_peripheral() missing required argument: 'address'zDsimulate_preconnected_peripheral() missing required argument: 'name'zQsimulate_preconnected_peripheral() missing required argument: 'manufacturer_data'zSsimulate_preconnected_peripheral() missing required argument: 'known_service_uuids')r3   rC   r&   manufacturerDataknownServiceUuidsz(bluetooth.simulatePreconnectedPeripheralr{   )rw   r3   rC   r&   r/   rD   r   r   r   r   r   s              r    simulate_preconnected_peripheralz*Bluetooth.simulate_preconnected_peripheraly  s    $ ?eff?eff<bcc$opp&qrr  1!4
 $*<<>C41aQ]!Q$CCH&Q##C( Ds   
B(Bc                    |t        d      |t        d      ||d}|j                         D ci c]  \  }}|	|| }}}t        d|      }| j                  j	                  |      }|S c c}}w )z
        Inject a simulated Bluetooth advertisement packet.

        Args:
            context: The browsing context ID to target.
            scan_entry: The advertisement scan record to inject.
        z=simulate_advertisement() missing required argument: 'context'z@simulate_advertisement() missing required argument: 'scan_entry')r3   	scanEntryzbluetooth.simulateAdvertisementr{   )rw   r3   rG   r   r   r   r   r   s           r   simulate_advertisementz Bluetooth.simulate_advertisement  s     ?[\\^__ #
 $*<<>C41aQ]!Q$CC?H##C( Dr   c                   |t        d      |t        d      |t        d      |||d}|j                         D ci c]  \  }}|	|| }}}t        d|      }| j                  j	                  |      }|S c c}}w )a  
        Respond to a pending GATT connection attempt from the page.

        Args:
            context: The browsing context ID.
            address: The peripheral address.
            code: ATT error code (0 = success; non-zero signals failure).
        zHsimulate_gatt_connection_response() missing required argument: 'context'zHsimulate_gatt_connection_response() missing required argument: 'address'zEsimulate_gatt_connection_response() missing required argument: 'code')r3   rC   rP   z(bluetooth.simulateGattConnectionResponser{   )	rw   r3   rC   rP   r   r   r   r   r   s	            r   !simulate_gatt_connection_responsez+Bluetooth.simulate_gatt_connection_response  s     ?fgg?fgg<cdd 

 $*<<>C41aQ]!Q$CCH&Q##C( Ds   
A=A=c                    |t        d      |t        d      ||d}|j                         D ci c]  \  }}|	|| }}}t        d|      }| j                  j	                  |      }|S c c}}w )z
        Simulate a GATT disconnection for the given peripheral.

        Args:
            context: The browsing context ID.
            address: The address of the peripheral to disconnect.
        zBsimulate_gatt_disconnection() missing required argument: 'context'zBsimulate_gatt_disconnection() missing required argument: 'address')r3   rC   z#bluetooth.simulateGattDisconnectionr{   )rw   r3   rC   r   r   r   r   r   s           r   simulate_gatt_disconnectionz%Bluetooth.simulate_gatt_disconnection  s     ?`aa?`aa 
 $*<<>C41aQ]!Q$CCCVL##C( Dr   c                "   |t        d      |t        d      |t        d      |t        d      ||||d}|j                         D ci c]  \  }}|	|| }}}t        d|      }| j                  j	                  |      }	|	S c c}}w )z
        Add a simulated GATT service to a peripheral.

        Args:
            context: The browsing context ID.
            address: The peripheral address.
            uuid: The service UUID.
        z7simulate_service() missing required argument: 'context'z7simulate_service() missing required argument: 'address'z4simulate_service() missing required argument: 'uuid'z4simulate_service() missing required argument: 'type')r3   rC   rV   rW   zbluetooth.simulateServicer{   )
rw   r3   rC   rV   rW   r   r   r   r   r   s
             r   simulate_servicezBluetooth.simulate_service  s     ?UVV?UVV<RSS<RSS 	
 $*<<>C41aQ]!Q$CC96B##C( Ds   
BBc                @   |t        d      |t        d      |t        d      |t        d      |t        d      ||||||d}|j                         D 	ci c]  \  }}	|		||	 }}}	t        d|      }
| j                  j	                  |
      }|S c c}	}w )a>  
        Add a simulated GATT characteristic to a service.

        Args:
            context: The browsing context ID.
            address: The peripheral address.
            service: The service UUID.
            characteristic: The characteristic UUID.
            properties: Supported operations bitmap.
        z>simulate_characteristic() missing required argument: 'context'z>simulate_characteristic() missing required argument: 'address'zCsimulate_characteristic() missing required argument: 'service_uuid'zJsimulate_characteristic() missing required argument: 'characteristic_uuid'z;simulate_characteristic() missing required argument: 'type')r3   rC   serviceUuidcharacteristicUuidcharacteristicPropertiesrW   z bluetooth.simulateCharacteristicr{   )rw   r3   rC   rZ   r[   r\   rW   r   r   r   r   r   s               r   simulate_characteristicz!Bluetooth.simulate_characteristic  s    & ?\]]?\]]abb&hii<YZZ '"5(A
 $*<<>C41aQ]!Q$CC@&I##C( D   
B)Bc                \   |t        d      |t        d      |t        d      |t        d      |t        d      |t        d      |||||||d}|j                         D 	
ci c]  \  }	}
|
	|	|
 }}	}
t        d|      }| j                  j	                  |      }|S c c}
}	w )	a  
        Respond to a pending read or write on a simulated characteristic.

        Args:
            context: The browsing context ID.
            address: The peripheral address.
            service: The service UUID.
            characteristic: The characteristic UUID.
            code: ATT error code (0 = success).
            body: The characteristic value bytes (for reads).
        zGsimulate_characteristic_response() missing required argument: 'context'zGsimulate_characteristic_response() missing required argument: 'address'zLsimulate_characteristic_response() missing required argument: 'service_uuid'zSsimulate_characteristic_response() missing required argument: 'characteristic_uuid'zDsimulate_characteristic_response() missing required argument: 'type'zDsimulate_characteristic_response() missing required argument: 'code')r3   rC   r   r   rW   rP   r_   z(bluetooth.simulateCharacteristicResponser{   )rw   r3   rC   rZ   r[   rW   rP   r_   r   r   r   r   r   s                r    simulate_characteristic_responsez*Bluetooth.simulate_characteristic_response;  s    * ?eff?effjkk&qrr<bcc<bcc '"5
 $*<<>C41aQ]!Q$CCH&Q##C( D   ,
B(7B(c                Z   |t        d      |t        d      |t        d      |t        d      |t        d      |t        d      ||||||d}|j                         D 	ci c]  \  }}	|		||	 }}}	t        d|      }
| j                  j	                  |
      }|S c c}	}w )	a9  
        Add a simulated GATT descriptor to a characteristic.

        Args:
            context: The browsing context ID.
            address: The peripheral address.
            service: The service UUID.
            characteristic: The characteristic UUID.
            descriptor: The descriptor UUID.
        z:simulate_descriptor() missing required argument: 'context'z:simulate_descriptor() missing required argument: 'address'z?simulate_descriptor() missing required argument: 'service_uuid'zFsimulate_descriptor() missing required argument: 'characteristic_uuid'zBsimulate_descriptor() missing required argument: 'descriptor_uuid'z7simulate_descriptor() missing required argument: 'type')r3   rC   r   r   descriptorUuidrW   zbluetooth.simulateDescriptorr{   )rw   r3   rC   rZ   r[   rb   rW   r   r   r   r   r   s               r   simulate_descriptorzBluetooth.simulate_descriptork  s    & ?XYY?XYY]^^&dee"`aa<UVV '"5-
 $*<<>C41aQ]!Q$CC<fE##C( Ds   +
B'6B'c	           	     x   |t        d      |t        d      |t        d      |t        d      |t        d      |t        d      |t        d      ||||||||d}	|	j                         D 
ci c]  \  }
}|	|
| }	}
}t        d	|	      }| j                  j	                  |      }|S c c}}
w )
a  
        Respond to a pending read or write on a simulated descriptor.

        Args:
            context: The browsing context ID.
            address: The peripheral address.
            service: The service UUID.
            characteristic: The characteristic UUID.
            descriptor: The descriptor UUID.
            code: ATT error code (0 = success).
            body: The descriptor value bytes (for reads).
        zCsimulate_descriptor_response() missing required argument: 'context'zCsimulate_descriptor_response() missing required argument: 'address'zHsimulate_descriptor_response() missing required argument: 'service_uuid'zOsimulate_descriptor_response() missing required argument: 'characteristic_uuid'zKsimulate_descriptor_response() missing required argument: 'descriptor_uuid'z@simulate_descriptor_response() missing required argument: 'type'z@simulate_descriptor_response() missing required argument: 'code')r3   rC   r   r   r   rW   rP   r_   z$bluetooth.simulateDescriptorResponser{   )rw   r3   rC   rZ   r[   rb   rW   rP   r_   r   r   r   r   r   s                 r   simulate_descriptor_responsez&Bluetooth.simulate_descriptor_response  s    . ?abb?abbfgg&mnn"ijj<^__<^__ '"5-	
 $*<<>C41aQ]!Q$CCDfM##C( Ds   :
B6B6c                @   |t        d      |t        d      |t        d      |t        d      |t        d      ||||||d}|j                         D 	ci c]  \  }}	|		||	 }}}	t        d|      }
| j                  j	                  |
      }|S c c}	}w )z.Execute bluetooth.characteristicEventGeneratedzEcharacteristic_event_generated() missing required argument: 'context'zEcharacteristic_event_generated() missing required argument: 'address'zJcharacteristic_event_generated() missing required argument: 'service_uuid'zQcharacteristic_event_generated() missing required argument: 'characteristic_uuid'zBcharacteristic_event_generated() missing required argument: 'type')r3   rC   r   r   rW   r_   z&bluetooth.characteristicEventGeneratedr{   )rw   r3   rC   rZ   r[   rW   r_   r   r   r   r   r   s               r   characteristic_event_generatedz(Bluetooth.characteristic_event_generated  s     ?cdd?cddhii&opp<`aa '"5
 $*<<>C41aQ]!Q$CCFO##C( Dr   c                \   |t        d      |t        d      |t        d      |t        d      |t        d      |t        d      |||||||d}|j                         D 	
ci c]  \  }	}
|
	|	|
 }}	}
t        d|      }| j                  j	                  |      }|S c c}
}	w )	z*Execute bluetooth.descriptorEventGeneratedzAdescriptor_event_generated() missing required argument: 'context'zAdescriptor_event_generated() missing required argument: 'address'zFdescriptor_event_generated() missing required argument: 'service_uuid'zMdescriptor_event_generated() missing required argument: 'characteristic_uuid'zIdescriptor_event_generated() missing required argument: 'descriptor_uuid'z>descriptor_event_generated() missing required argument: 'type')r3   rC   r   r   r   rW   r_   z"bluetooth.descriptorEventGeneratedr{   )rw   r3   rC   rZ   r[   rb   rW   r_   r   r   r   r   r   s                r   descriptor_event_generatedz$Bluetooth.descriptor_event_generated  s     ?_``?_``dee&kll"ghh<\]] '"5-
 $*<<>C41aQ]!Q$CCBFK##C( Dr   c                <    | j                   j                  |||      S )a  Add an event handler.

        Args:
            event: The event to subscribe to.
            callback: The callback function to execute on event.
            contexts: The context IDs to subscribe to (optional).

        Returns:
            The callback ID.
        )rv   add_event_handler)rw   eventcallbackcontextss       r   r   zBluetooth.add_event_handler  s     ""44UHhOOr   c                :    | j                   j                  ||      S )zRemove an event handler.

        Args:
            event: The event to unsubscribe from.
            callback_id: The callback ID.
        )rv   remove_event_handler)rw   r   callback_ids      r   r   zBluetooth.remove_event_handler#  s     ""77{KKr   c                6    | j                   j                         S )zClear all event handlers.)rv   clear_event_handlers)rw   s    r   r   zBluetooth.clear_event_handlers,  s    ""7799r   )returnNone)NN)r3   r   r4   r   )NNN)r3   r   r=   r   r>   r   rt   )r3   r   )NNNNN)
r3   r   rC   r   r&   r   r/   list[Any] | NonerD   r   )r3   r   rG   r   )r3   r   rC   r   rP   rO   )r3   r   rC   r   )NNNN)r3   r   rC   r   rV   r   rW   r   )NNNNNN)r3   r   rC   r   rZ   r   r[   r   r\   r   rW   r   )NNNNNNN)r3   r   rC   r   rZ   r   r[   r   rW   r   rP   rO   r_   r   )r3   r   rC   r   rZ   r   r[   r   rb   r   rW   r   )NNNNNNNN)r3   r   rC   r   rZ   r   r[   r   rb   r   rW   r   rP   rO   r_   r   )r3   r   rC   r   rZ   r   r[   r   rW   r   r_   r   )r3   r   rC   r   rZ   r   r[   r   rb   r   rW   r   r_   r   )r   strr   r   r   zlist[str] | Noner   int)r   r   r   r   r   r   )r   r   r   r   rr   r   ry   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   rq   rq   ,  s    -/M).F,0( #".204'' ' 	'
 ,' .'R0 #"	  	>0 #"!! ! 	!
 !J #"#'*.04)) ) !	)
 () $.) )Z #"#'*.!%.. . !	.
 (. . . .d #"#'*.&*++ + !	+
 (+ $+ +^ #"#'*.&*!%33 3 !	3
 (3 $3 3 3 3n #"#'*.!%     !	 
 (     H #"#'*.&*!%$$ $ !	$
 ($ $$ $ $NPL:r   rq   rn   RequestDevicePromptUpdatedro   GattConnectionAttemptedN)0r   
__future__r   collections.abcr   dataclassesr   r   typingr   %selenium.webdriver.common.bidi.commonr   -selenium.webdriver.common.bidi._event_managerr	   r
   r   r   r   r$   r(   r2   r6   r:   r<   r@   rB   rF   rI   rN   rR   rU   rY   r^   ra   rd   rf   ri   rk   rm   EVENT_NAME_MAPPINGrq   globalsgetdictr   r   _globalsrr   r   r   r   <module>r      s   # $ (  A c c
   
, 
, 
, 
 
 
 ? ? ?                A A A& 
" 
" 
" # # #            ( 	2 	2 	2    
2 
2 
2 5 5 5    2 2 2 	2 	2 	2 &L!D 
B: B:L %Y]]+QSWX  ")--(KTR  9%0'.<DLLIe<f148lp&
 "-#+9AF_9`.5fj"	 r   