%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__/AlertWatcher.cpython-312.pyc

�

QKfR��N�ddlmZddlZddlmZGd�dej�Zy)�)�GObjectN)�
DBusGMainLoopc�(�eZdZdZej
jdejffej
jdejffej
jdejejffd�Z	d�Z
d�Zd�Zd�Z
d�Zd	�Zd
�Zy)�AlertWatcherzVa class that checks for alerts and reports them, like a battery
    or network warningN)�
network-alert�
battery-alert�network-3g-alertc���tjj|�td��tjtjj
�|_d|_y)NT)�set_as_default�)r�__init__r�dbus�Bus�TYPE_SYSTEM�bus�
network_state)�selfs �A/usr/lib/python3/dist-packages/UpdateManager/Core/AlertWatcher.pyr
zAlertWatcher.__init__2s>����� � ��&��T�*��8�8�D�H�H�0�0�1������c��	|jjdd�}|jd|jd��t	j
|d�}|j
dd�|_|j|j�|jjdd�}|jd	|jd��|j�|j�y#tjj$rYywxYw)
Nzorg.freedesktop.NetworkManagerz/org/freedesktop/NetworkManager�StateChanged)�dbus_interface�org.freedesktop.DBus.Properties�State�org.freedesktop.UPower�/org/freedesktop/UPower�Changed)
r�
get_object�connect_to_signal�_on_network_state_changedr�	Interface�Getr�_network_alert�_power_changed�_update_3g_state�
exceptions�
DBusException)r�obj�	interfaces   r�check_alert_statezAlertWatcher.check_alert_state9s���	��(�(�%�%�0�1��C�
�!�!���.�.�?�
"�
�
���s�,M�N�I�!*���0�'�"�D��
���� 2� 2�3��(�(�%�%�(�*C��C�
�!�!���#�#�7�
"�
�

���!��!�!�#�����,�,�	��	�s�CC�C?�>C?c�F�|j|�|j�y)N)r#r%�r�states  rr z&AlertWatcher._on_network_state_changedXs�����E�"����rc��ddlm}|�}|j�}|j�}|j	||�y)N�)�NetworkManagerHelper)�roamr0� is_active_connection_gsm_or_cdma�(is_active_connection_gsm_or_cdma_roaming�_network_3g_alert)rr0�nm�on_3g�
is_roamings     rr%zAlertWatcher._update_3g_state\s9��.�
!�
#���3�3�5���@�@�B�
����u�j�1rc�*�|jd||�y)Nr	)�emit)rr6r7s   rr4zAlertWatcher._network_3g_alertds���	�	�$�e�Z�8rc�6�||_|jd|�y)Nr)rr9r,s  rr#zAlertWatcher._network_alertgs��"����	�	�/�5�)rc��|jjdd�}tj|d�}|j	dd�}|jd|�y)Nrrr�	OnBatteryr)rrrr!r"r9)rr(r)�
on_batterys    rr$zAlertWatcher._power_changedksN���h�h�!�!�$�&?�
���N�N�3�(I�J�	��]�]�#;�[�I�
��	�	�/�:�.r)�__name__�
__module__�__qualname__�__doc__r�SignalFlags�	RUN_FIRST�TYPE_INT�TYPE_BOOLEAN�__gsignals__r
r*r r%r4r#r$�rrrrs����

���)�)��
�
�
��
�
���)�)��
�
!�
!�#�
�
���)�)��
�
!�
!�7�#7�#7�8�
��L�$��> �2�9�*�/rr)�
gi.repositoryrr�dbus.mainloop.glibrrrGrr�<module>rJs"��."��,�U/�7�?�?�U/r

Zerion Mini Shell 1.0