+
     h
  c                   sL    ^ RI HtHt R tR tR t ! R R]4      t]! 4       tR# )i    )GLibGioc                s   a aa VVV 3R lpV# )z;Register and map decorated exception class to a DBus error.c                 s8   < \         P                  V SSS4       V # N)error_registrationregister_error)clscodedomainnames   &1/usr/lib/python3.14/site-packages/pydbus/error.py	decoratedZ!register_error.<locals>.decorated   s    ##Cvt<	*     )r   r   r   r
   s   fff r	   r   r      s     	r   c                s   a  V 3R lpV# )z.Map decorated exception class to a DBus error.c                 s4   < \         P                  V S4       V # r   )r   	map_error)r   
error_names   &r	   r
   Zmap_error.<locals>.decorated   s    sJ/	*r   r   )r   r
   s   f r	   r   r      s     	r   c                s0    \         P                  V 4       V # )z9Map decorated exception class to all unknown DBus errors.)r   map_by_default)r   s   &r	   r   r      s    ""3'r   c                   st   a  ] tR t^t o RtRt]! 4       t]! 4       tR t	R t
R tR tR tR tR	 tR
 tRtV tR# )ErrorRegistrationz,Class for mapping exceptions to DBus errors.Nc                s    Wn         R# )z%Set the exception class as a default.N_default)selfexception_cls   &&r	   r   Z ErrorRegistration.map_by_default#   s    -r   c                s>    WP                   V&   W P                  V&   R# )z'Map the exception class to a DBus name.N)_map_reversed_map)r   r   r   s   &&&r	   r   ZErrorRegistration.map_error'   s    !))D/&*]#r   c                sd    V P                  W4       \        P                  P                  W4V4      # )z4Map and register the exception class to a DBus name.)r   r   	DBusErrorr   )r   r   r   r   r   s   &&&&&r	   r   Z ErrorRegistration.register_error,   s%    ..%		%	%fD	99r   c                s4    VP                   V P                  9   # )zIs the exception registered?)	__class__r   r   Zobjr   r	   is_registered_exceptionZ)ErrorRegistration.is_registered_exception1   s    	$,,	,,r   c                sL    V P                   P                  VP                  4      # )z#Get the DBus name of the exception.)r   getr   r   r   r	   get_dbus_nameZErrorRegistration.get_dbus_name5   s    						..r   c                sL    V P                   P                  WP                  4      # )z0Get the exception class mapped to the DBus name.)r   r   r   )r   r   r   r	   get_exception_classZ%ErrorRegistration.get_exception_class9   s    	t]]	++r   c                st    RP                  RV4      pVP                  V4      '       d   V\        V4      R # V# )z'Transform the message of the exception.z{}:{}: zGDBus.ErrorN)ZformatZ
startswithZlen)r   r   messageZprefixs   &&& r	   transform_messageZ#ErrorRegistration.transform_message=   s;    M40&
#f+,
	.r   c                s   \        V\        P                  4      '       g   V# \        P                  P                  V4      '       g   V# \        P                  P                  V4      pV P                  V4      pV'       g   V# V P                  W!P                  4      pV! V4      pW%n
        VP                  Vn        VP                  Vn        V# )z,Transform the remote error to the exception.)Z
isinstancer    ZErrorr   r   Zis_remote_errorZget_remote_errorr   r    r   Z	dbus_namer   Zdbus_domainr   Z	dbus_code)r   Zer   r   r   Z	exceptions   &&    r	   transform_exceptionZ%ErrorRegistration.transform_exceptionF   s    	Atzz	"	"
8		&	&q	)	)
8 
	'	'	*$**40- 

8 ""43'G$)(())	r   r   )Z__name__Z
__module__Z__qualname__Z__firstlineno__Z__doc__r   Zdictr   r   r   r   r   r   r   r   r    r!   Z__static_attributes__Z__classdictcell__)Z__classdict__s   @r	   r   r      sH     3 +
:
-/, r   r   N)	Zgi.repositoryr    r   r   r   r   Zobjectr   r   r   r   r	   <module>r"      s1    #A AJ '( r   