<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css"
        integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ=="
        crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
</html>
3
<_>#                 @   sJ  d dl Z ddlmZmZ ddlmZmZ ddlmZ d dl	m
Z
 d dlmZ d dlZedZg ZG d	d
 d
ejZeeZejd
 G dd dejZeeZejd G dd dejZeeZejd G dd dejZeeZejd G dd dejZeeZejd G dd dZG dd dejZeeZejd dS )    N   )wakeup_on_signalregister_sigint_fallback)overridedeprecated_init)get_introspection_module)PyGIWarning)GLibGioc               @   s   e Zd Zdd ZdS )Applicationc             O   s<   t | j( t  tjj| f||S Q R X W d Q R X d S )N)r   quitr   r
   r   run)selfargskwargs r   /usr/lib64/python3.6/Gio.pyr   '   s    zApplication.runN)__name__
__module____qualname__r   r   r   r   r   r   %   s   r   c                   s   e Zd Z fddZ  ZS )VolumeMonitorc                s&   t t| j|| tjdtdd d S )NzZGio.VolumeMonitor shouldn't be instantiated directly, use Gio.VolumeMonitor.get() instead.r   )
stacklevel)superr   __init__warningswarnr   )r   r   r   )	__class__r   r   r   3   s    zVolumeMonitor.__init__)r   r   r   r   __classcell__r   r   )r   r   r   1   s   r   c               @   s    e Zd Zdd Zdd ZeZdS )FileEnumeratorc             C   s   | S )Nr   )r   r   r   r   __iter__B   s    zFileEnumerator.__iter__c             C   s   | j d }|d k	r|S td S )N)Z	next_fileStopIteration)r   	file_infor   r   r   __next__E   s    
zFileEnumerator.__next__N)r   r   r   r   r"   nextr   r   r   r   r   A   s   	r   c               @   s   e Zd Zdd ZdS )MenuItemc             C   s,   x&|D ]\}}}| j |tj|| qW d S )N)Zset_attribute_valuer	   Variant)r   Z
attributesnameformat_stringvaluer   r   r   set_attributeV   s    zMenuItem.set_attributeN)r   r   r   r)   r   r   r   r   r$   U   s   r$   c               @   sT   e Zd ZdZeejjddZdd Zdd	 Z	d
d Z
e
Zdd Zdd Zdd ZdS )Settingsz0Provide dictionary-like access to GLib.Settings.schemapathbackend)Z	arg_namesc             C   s   || j  kS )N)	list_keys)r   keyr   r   r   __contains__e   s    zSettings.__contains__c             C   s   t | j S )N)lenr.   )r   r   r   r   __len__h   s    zSettings.__len__c             C   s   dS )NTr   )r   r   r   r   __bool__k   s    zSettings.__bool__c             C   s$   || krt d|f | j|j S )Nzunknown key: %r)KeyErrorZ	get_valueunpack)r   r/   r   r   r   __getitem__s   s    zSettings.__getitem__c             C   s   || krt d|f | j|}|jdj }|jd}|dkrj|jdj }|jds\t|dd  }nf|dkr|jdj jdst|jdjdj }|j }||krtd||f nt	dt
| | j|tj|| d S )	Nzunknown key: %rr      typeaenumz$value %s is not an allowed enum (%s)z'Cannot handle allowed type range class )r4   Z	get_rangeZget_child_valueZ
get_stringZget_type_string
startswithAssertionErrorr5   
ValueErrorNotImplementedErrorstrZ	set_valuer	   r%   )r   r/   r(   rangeZtype_vZtype_strZallowedr   r   r   __setitem__z   s"    

zSettings.__setitem__c             C   s   | j  S )N)r.   )r   r   r   r   keys   s    zSettings.keysN)r+   r,   r-   )r   r   r   __doc__r   r
   r*   r   r0   r2   r3   Z__nonzero__r6   rB   rC   r   r   r   r   r*   _   s   r*   c               @   s4   e Zd ZdZdd Zdd Zdd Zedd	 Zd
S )_DBusProxyMethodCallz1Helper class to implement DBusProxy method calls.c             C   s   || _ || _d S )N)
dbus_proxymethod_name)r   rF   rG   r   r   r   r      s    z_DBusProxyMethodCall.__init__c       
      C   sv   |\}}}y|j |}W nF tk
r^   tj d d \}}	|rN|||	| n|||	| d S X ||| j|| d S )Nr   )Zcall_finish	Exceptionsysexc_info_unpack_result)
r   objresult	user_dataZresult_callbackZerror_callbackZreal_user_dataretetypeer   r   r   Z__async_result_handler   s    
z+_DBusProxyMethodCall.__async_result_handlerc             O   s   |r0|d }|dd  }t |ts4td| nd}tj|t|}d|kr|d |jd|jdf}| jj| j	||jdd|jd	d
d | j
| n0| jj| j	||jdd|jd	dd }| j|S d S )Nr   r7   z6first argument must be the method signature string: %rz()Zresult_handlerZerror_handlerrN   flagsZtimeoutrS   )
isinstancer?   	TypeErrorr	   r%   tuplegetrF   ZcallrG   *_DBusProxyMethodCall__async_result_handlerZ	call_syncrK   )r   r   r   Z	signatureZarg_variantrN   rM   r   r   r   __call__   s&    


z_DBusProxyMethodCall.__call__c             C   s2   |j  }t|dkr|d }nt|dkr.d}|S )z?Convert a D-BUS return variant into an appropriate return valuer7   r   N)r5   r1   )klassrM   r   r   r   rK      s    
z#_DBusProxyMethodCall._unpack_resultN)	r   r   r   rD   r   rX   rY   classmethodrK   r   r   r   r   rE      s
   rE   c               @   s   e Zd ZdZdd ZdS )	DBusProxya$  Provide comfortable and pythonic method calls.

    This marshalls the method arguments into a GVariant, invokes the
    call_sync() method on the DBusProxy object, and unmarshalls the result
    GVariant back into a Python tuple.

    The first argument always needs to be the D-Bus signature tuple of the
    method call. Example:

      proxy = Gio.DBusProxy.new_sync(...)
      result = proxy.MyMethod('(is)', 42, 'hello')

    The exception are methods which take no arguments, like
    proxy.MyMethod('()'). For these you can omit the signature and just write
    proxy.MyMethod().

    Optional keyword arguments:

    - timeout: timeout for the call in milliseconds (default to D-Bus timeout)

    - flags: Combination of Gio.DBusCallFlags.*

    - result_handler: Do an asynchronous method call and invoke
         result_handler(proxy_object, result, user_data) when it finishes.

    - error_handler: If the asynchronous call raises an exception,
      error_handler(proxy_object, exception, user_data) is called when it
      finishes. If error_handler is not given, result_handler is called with
      the exception object as result instead.

    - user_data: Optional user data to pass to result_handler for
      asynchronous calls.

    Example for asynchronous calls:

      def mymethod_done(proxy, result, user_data):
          if isinstance(result, Exception):
              # handle error
          else:
              # do something with result

      proxy.MyMethod('(is)', 42, 'hello',
          result_handler=mymethod_done, user_data='data')
    c             C   s
   t | |S )N)rE   )r   r&   r   r   r   __getattr__  s    zDBusProxy.__getattr__N)r   r   r   rD   r]   r   r   r   r   r\      s   ,r\   )r   Z_ossighelperr   r   Z	overridesr   r   moduler   Zgir   Zgi.repositoryr	   rI   r
   __all__r   appendr   r   r$   r*   rE   r\   r   r   r   r   <module>   s6   



9
C1