o
    `                     @   sf   d dl mZmZmZ d dlmZmZ edddZedZ	dd Z
d	d
 Zdd Zdd Zdd ZdS )    )DBusAddress
new_signalnew_method_call)	MatchRulemessage_busz/org/freedesktop/portal/desktopzorg.freedesktop.portal.Desktop)object_pathbus_nameorg.freedesktop.portal.Requestc                  C   sR   t ddd} | ttdsJ | ttdrJ | ttddr'J d S )Nsignalr	   )type	interfaceResponseBooz"org.freedesktop.portal.FileChooser)r   matchesr   portal_req_ifacer   portalwith_interfacerule r   A/usr/lib/python3/dist-packages/jeepney/tests/test_bus_messages.pytest_match_rule_simple   s   
r   c                   C   s8   t ddttdsJ t ddttdrJ d S )Nz/org/freedesktop/portal)path_namespacer   z/org/freedesktop/por)r   r   r   r   r   r   r   r   test_match_rule_path_namespace   s   

r   c                  C   sb   t dd} | dd | ttddddsJ | ttddd	dr%J | ttdr/J d S )
Nmethod_callr   r   foor   s)r   	signaturebody)foobarr   add_arg_conditionr   r   r   r   r   r   r   test_match_rule_arg%   s   
r$   c                  C   s   t dd} | jdddd | ttddd	d
sJ | ttdddd
s'J | ttdddd
s4J | ttdddd
rAJ | ttdddd
rNJ | ttdddd
r[J d S )Nr   r   r   /aa/bb/pathkindr   r   )r%   r   )z	/aa/bb/cc)z/aa/)z/aa)z/aa/bbu)   r"   r   r   r   r   test_match_rule_arg_path5   s(   
r+   c                  C   s~   t dd} | jdddd | ttdddsJ | ttddd	s%J | ttddd
r1J | ttdddr=J d S )NNameOwnerChanged)memberr   com.example.backend1	namespacer'   r   )r.   )zcom.example.backend1.foo.bar)zcom.example.backend12r)   )   )r   r#   r   r   r   r   r   r   r   test_match_rule_arg_namespaceW   s   



r1   N)jeepneyr   r   r   jeepney.bus_messagesr   r   r   r   r   r   r   r$   r+   r1   r   r   r   r   <module>   s    
"