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    þ
"