%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/jeepney/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/jeepney/__pycache__/bus_messages.cpython-312.pyc

�

+�c����dZddlmZmZmZddlmZmZgd�ZGd�d�Z	Gd�de�Z
e
�ZGd	�d
e�ZGd�de�Z
Gd
�d�Zy)zcMessages for talking to the DBus daemon itself

Generated by jeepney.bindgen and modified by hand.
�)�Message�MessageType�HeaderFields)�MessageGenerator�new_method_call)�
DBusNameFlags�DBus�message_bus�
Monitoring�Stats�	MatchRulec��eZdZdZdZdZy)rr��N)�__name__�
__module__�__qualname__�allow_replacement�replace_existing�do_not_queue���6/usr/lib/python3/dist-packages/jeepney/bus_messages.pyrrs�������Lrrc���eZdZdZdZ		d�fd�	Zd�Zdd�Zd�Zd�Z	d�Z
d	�Zd
�Zd�Z
d�Zd
�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Z�xZS)r	z(Messages to talk to the message bus
    �org.freedesktop.DBusc�(��t�|�||��y�N)�object_path�bus_name��super�__init__��selfrr�	__class__s   �rr"z
DBus.__init__����
���[�8��Drc��t|d�S)N�Hello�r�r$s rr(z
DBus.Hello����t�W�-�-rc�"�t|dd||f�S)N�RequestName�sur))r$�name�flagss   rr-zDBus.RequestName"s���t�]�D�4��-�H�Hrc� �t|dd|f�S)N�ReleaseName�sr)�r$r/s  rr2zDBus.ReleaseName%s���t�]�C�$��A�Arc�"�t|dd|df�S)N�StartServiceByNamer.�r)r4s  rr6zDBus.StartServiceByName(s���t�%9�4� $�a�y�*�	*rc� �t|dd|f�S)N�UpdateActivationEnvironmentza{ss}r))r$�envs  rr9z DBus.UpdateActivationEnvironment,s���t�%B�G� #�v�'�	'rc� �t|dd|f�S)N�NameHasOwnerr3r)r4s  rr<zDBus.NameHasOwner0����t�^�S�4�'�B�Brc��t|d�S)N�	ListNamesr)r*s rr?zDBus.ListNames3s���t�[�1�1rc��t|d�S)N�ListActivatableNamesr)r*s rrAzDBus.ListActivatableNames6s���t�%;�<�<rc�`�t|t�r|j�}t|dd|f�S)z4*rule* can be a str or a :class:`MatchRule` instance�AddMatchr3��
isinstancer
�	serialiser�r$�rules  rrCz
DBus.AddMatch9s+���d�I�&��>�>�#�D��t�Z��t�g�>�>rc�`�t|t�r|j�}t|dd|f�S)N�RemoveMatchr3rDrGs  rrJzDBus.RemoveMatch?s+���d�I�&��>�>�#�D��t�]�C�$��A�Arc� �t|dd|f�S)N�GetNameOwnerr3r)r4s  rrLzDBus.GetNameOwnerDr=rc� �t|dd|f�S)N�ListQueuedOwnersr3r)r4s  rrNzDBus.ListQueuedOwnersGs���t�%7��t�g�F�Frc� �t|dd|f�S)N�GetConnectionUnixUserr3r)r4s  rrPzDBus.GetConnectionUnixUserJs���t�%<�c�D�7�K�Krc� �t|dd|f�S)N�GetConnectionUnixProcessIDr3r)r4s  rrRzDBus.GetConnectionUnixProcessIDMs���t�%A�3���P�Prc� �t|dd|f�S)N�GetAdtAuditSessionDatar3r)r4s  rrTzDBus.GetAdtAuditSessionDataPs���t�%=�s�T�G�L�Lrc� �t|dd|f�S)N�#GetConnectionSELinuxSecurityContextr3r)r4s  rrVz(DBus.GetConnectionSELinuxSecurityContextSs���t�%J�C� $�w�(�	(rc��t|d�S)N�ReloadConfigr)r*s rrXzDBus.ReloadConfigWs���t�^�4�4rc��t|d�S)N�GetIdr)r*s rrZz
DBus.GetIdZr+rc� �t|dd|f�S)N�GetConnectionCredentialsr3r)r4s  rr\zDBus.GetConnectionCredentials]s���t�%?��t�g�N�Nr�z/org/freedesktop/DBusr)r7)rrr�__doc__�	interfacer"r(r-r2r6r9r<r?rArCrJrLrNrPrRrTrVrXrZr\�
__classcell__�r%s@rr	r	s�����&�I�#:�0�E�.�I�B�*�'�C�2�=�?�B�
C�G�L�Q�M�(�5�.�Orr	c�.��eZdZdZ		d�fd�	Zd�Z�xZS)rzorg.freedesktop.DBus.Monitoringc�(��t�|�||��yrr r#s   �rr"zMonitoring.__init__er&rc�"�t|dd|df�S)z:Convert this connection to a monitor connection (advanced)�
BecomeMonitor�asur7r))r$�ruless  rrezMonitoring.BecomeMonitoris���t�_�e�e�Q�Z�H�Hrr])rrrr_r"rer`ras@rrrbs���1�I�#:�0�E�Irrc�:��eZdZdZ		d�fd�	Zd�Zd�Zd�Z�xZS)rz org.freedesktop.DBus.Debug.Statsc�(��t�|�||��yrr r#s   �rr"zStats.__init__pr&rc��t|d�S)N�GetStatsr)r*s rrkzStats.GetStatsts���t�Z�0�0rc� �t|dd|f�S)N�GetConnectionStatsr3r))r$�arg0s  rrmzStats.GetConnectionStatsws���t�%9�3� $�w�(�	(rc��t|d�S)N�GetAllMatchRulesr)r*s rrpzStats.GetAllMatchRules{s���t�%7�8�8rr])	rrrr_r"rkrmrpr`ras@rrrms#���2�I�#:�0�E�1�(�9rrc	�X�eZdZdZddddddddd�d�Zd
dedefd�Zd	efd
�Zde	d	e
fd�Zy)r
a>Construct a match rule to subscribe to DBus messages.
    
    e.g.::
    
        mr = MatchRule(
            interface='org.freedesktop.DBus',
            member='NameOwnerChanged',
            type='signal'
        )
        msg = message_bus.AddMatch(mr)
        # Send this message to subscribe to the signal
    NF)�type�senderr_�member�path�path_namespace�destination�	eavesdropc���t|t�r	t|}||_|||||d�}	|	j	�D�
�cic]\}
}|��	|
|��
c}}
|_||_||_i|_ycc}}
w)N)rsr_rtrurw)	rE�strr�message_type�items�
header_fieldsrvrx�arg_conditions)r$rrrsr_rtrurvrwrx�fields�k�vs            rr"zMatchRule.__init__�s����d�C� ��t�$�D� ����"���&�
�� &�|�|�~�
��a��!�-�A�q�D�
���-���"��� ����
s�
A+�A+�argno�valuec��|dvrtdj|���|dk(r|dk7rtd��||f|j|<y)z�Add a condition for a particular argument
        
        argno: int, 0-63
        kind: 'string', 'path', 'namespace'
        >ru�string�	namespacez	kind={!r}r�r7z$argno must be 0 for kind='namespace'N)�
ValueError�formatr~)r$r�r��kinds    r�add_arg_conditionzMatchRule.add_arg_condition�sQ���6�6��[�/�/��5�6�6��;��5�A�:��C�D�D�&+�T�]����E�"r�returnc��t|jj��}|jr'|j	d|jj
f�|jr|j	d�|jj�D]'\}\}}|dk(rd}|j	d|�|��|f��)djd�|D��S)zAConvert to a string to use in an AddMatch call to the message busrr)rx�truer���arg�,c3�fK�|])\}}dj||jdd�����+y�w)z{}='{}'�'z'\''N)r��replace)�.0r�r�s   r�	<genexpr>z&MatchRule.serialise.<locals>.<genexpr>�s1����
�=C�a��I���Q��	�	�#�w� 7�8�
�s�/1)	�listr}r|r{�appendr/rxr~�join)r$�pairsr��valr�s     rrFzMatchRule.serialise�s����T�'�'�-�-�/�0������L�L�&�$�"3�"3�"8�"8�9�:��>�>��L�L�.�/�"&�"5�"5�";�";�"=�	5��E�;�C���x�����L�L�C��w�t�f�-�s�3�4�	5��x�x�
�GL�
�
�	
r�msgc��|j}|j�|j|jk7ry|jj�D]-\}}|jjt|d�|k7s�-y|j�_|jjtjd�}|jjd�}||k(s|j|dz�sy|jj�D]�\}\}}|t|j�k\ry|j|}	t|	t�sy|dk(r|	|k7s�Oy|dk(rN|	|k(r�\|j!d�r|	j|�r�|	j!d�r|j|	�r��y|dk(s��|	|k(r��|	j|dz�r��yy	)
z%Returns True if msg matches this ruleNF��/r�rur��.T)�headerr{r}r|r�getrrvru�rstrip�
startswithr~�len�bodyrErz�endswith)
r$r��h�field�expectedru�path_nsr�r�r�s
          r�matcheszMatchRule.matches�s����J�J�����)�q�~�~��AR�AR�/R��#�1�1�7�7�9�	�O�E�8��x�x�|�|�L��/��6�(�B��	����*��8�8�<�<�� 1� 1�4�8�D��)�)�0�0��5�G��W�_�����3��)G��'+�':�':�'@�'@�'B�	!�#�E�#�H�d���C�H�H�
�%���(�(�5�/�C��c�3�'���x���(�?� �����H�_� �)�)�#�.�3�>�>�(�3K����S�)�h�.A�.A�#�.F� ���$��H�_��~�~�h��n�5� �+	!�.r)r�)rrrr^r"�intrzr�rFr�boolr�rrrr
r
sS��� $�D�D���4�T� �!�(
3�s�
3�3�
3�
�3�
�0'�7�'�t�'rr
N)r^�	low_levelrrr�wrappersrr�__all__rr	r
rrr
rrr�<module>r�si���:�9�7�����
HO��HO�T�f��	I�!�	I�9��9�$l�lr

Zerion Mini Shell 1.0