Mini Shell

Direktori : /lib/python3.6/site-packages/blivet/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/blivet/__pycache__/callbacks.cpython-36.pyc

3

{)c�$�@s�dZddlmZeddddddd	g�Zddd�Zed
dg�Zeddg�Zeddg�Zeddg�Zedddg�Z	eddg�Z
Gdd�de�ZGdd�de�Z
e
�Zd
S)zV
Module providing classes defining the callbacks used by Blivet and their
arguments.

�)�
namedtuple�_CallbacksRegister�create_format_pre�create_format_post�resize_format_pre�resize_format_post�wait_for_entropy�report_progressNcCst||||||�S)a�
    A function for creating a new opaque object holding the references to
    callbacks. The point of this function is to hide the implementation of such
    object and to provide default values for non-specified fields (e.g. newly
    added callbacks).

    :type create_format_pre: :class:`.CreateFormatPreData` -> NoneType
    :type create_format_post: :class:`.CreateFormatPostData` -> NoneType
    :type resize_format_pre: :class:`.ResizeFormatPreData` -> NoneType
    :type resize_format_post: :class:`.ResizeFormatPostData` -> NoneType
    :param wait_for_entropy: callback for waiting for enough entropy whose return
                             value indicates whether continuing regardless of
                             available entropy should be forced (True) or not (False)
    :type wait_for_entropy: :class:`.WaitForEntropyData` -> bool
    :type report_progress: :class:`.ReportProgressData` -> NoneType

    )r)rrrrrr	�r
�/usr/lib/python3.6/callbacks.py�create_new_callbacks_register*sr�CreateFormatPreData�msg�CreateFormatPostData�ResizeFormatPreData�ResizeFormatPostData�WaitForEntropyDataZmin_entropy�ReportProgressDatac@s,eZdZdd�Zdd�Zdd�Zdd�Zd	S)
�CallbackListcCst�|_dS)N)�list�_cb_list)�selfr
r
r�__init__YszCallbackList.__init__cCs|jj|�dS)z Add a callback. N)r�append)r�cbr
r
r�add\szCallbackList.addcCs|jj|�dS)z Remove a callback. N)r�remove)rrr
r
rr`szCallbackList.removecOsx|jD]}|||�qWdS)z Run all of the callbacks. N)r)r�args�kwargsrr
r
r�__call__dszCallbackList.__call__N)�__name__�
__module__�__qualname__rrrrr
r
r
rrXsrc@seZdZdZdd�ZdS)�	Callbacksz�A collection of callbacks for various events

       Each trigger/event gets a list of callbacks to run, represented by an
       instance of :class:`~.callbacks.CallbackList`.
    cCsdt�|_t�|_t�|_t�|_t�|_t�|_t�|_t�|_t�|_	t�|_
t�|_t�|_dS)N)
rZpopulate_startedZdevice_scannedZdevice_addedZdevice_removedZformat_addedZformat_removedZaction_addedZaction_removedZaction_executedZparent_addedZparent_removedZattribute_changed)rr
r
rrpszCallbacks.__init__N)r r!r"�__doc__rr
r
r
rr#jsr#)NNNNNN)r$�collectionsrrrr
rrrrr�objectrr#Z	callbacksr
r
r
r�<module>s<

!