Hacked By AnonymousFox

Current Path : /lib/python3.6/site-packages/slip/dbus/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/slip/dbus/__pycache__/mainloop.cpython-36.pyc

3

�uAc#
�@s@dZddlmZd
ZGdd�de�ZGdd�de�Zdd�Zd	S)zVThis module contains mainloop wrappers.

Currently only glib main loops are supported.�)�absolute_import�MainLoop�set_typecsXeZdZdZdZ�fdd�Zedd��Zdd�Zd	d
�Z	dd�Z
d
d�Zdd�Z�Z
S)raAn abstract main loop wrapper class and factory.

    Use MainLoop() to get a main loop wrapper object for a main loop type
    previously registered with set_type(). Defaults to glib main loops.

    Actual main loop wrapper classes are derived from this class.Ncs.tjdkrtjd�tt|�jtjf|�|�S)N�glib)rZ_mainloop_classr�super�__new__�_MainLoop__mainloop_class)�cls�args�kwargs)�	__class__��/usr/lib/python3.6/mainloop.pyr*s


zMainLoop.__new__cCsHtjdk	rtd��dti}||kr.||t_ntd|dj|�f��dS)zxSet a main loop type for non-blocking interfaces.

        mltype: "glib" (currently only glib main loops are supported)Nz(The main loop type can only be set once.rz0'%s' is not one of the valid main loop types:
%sz, )rr�RuntimeError�GlibMainLoop�
ValueError�join)r	�mltypeZ
ml_type_classr
r
rr1s
zMainLoop.set_typecCs
t��dS)z$Returns if there are pending events.N)�NotImplementedError)�selfr
r
r�pendingCszMainLoop.pendingcCs
t��dS)z Iterates over one pending event.N)r)rr
r
r�iterateHszMainLoop.iteratecCsx|j�r|j�qWdS)z!Iterates over all pending events.N)rr)rr
r
r�iterate_over_pending_eventsMs
z$MainLoop.iterate_over_pending_eventscCs
t��dS)zRuns the main loop.N)r)rr
r
r�runSszMainLoop.runcCs
t��dS)zQuits the main loop.N)r)rr
r
r�quitXsz
MainLoop.quit)�__name__�
__module__�__qualname__�__doc__rr�classmethodrrrrrr�
__classcell__r
r
)rrr sc@seZdZdd�ZdS)rcCsFddlm}|j�}|j�}||_|j|_|j|_|j|_|j	|_	dS)N�)�_glib)
Z	_wrappersr"rZget_contextZ	_mainlooprZ	iterationrrr)rr"ZmlZctxr
r
r�__init__`szGlibMainLoop.__init__N)rrrr#r
r
r
rr^srcCs$ddlm}|dt�tj|�dS)z�Set a main loop type for non-blocking interfaces.

    mltype: "glib" (currently only glib main loops are supported)

    Deprecated, use MainLoop.set_type() instead.r)�warnzuse MainLoop.set_type() insteadN)�warningsr$�DeprecationWarningrr)rr$r
r
rrls
N)rr)rZ
__future__r�__all__�objectrrrr
r
r
r�<module>s
>

Hacked By AnonymousFox1.0, Coded By AnonymousFox