
    af*                        d dl Z d dlmZ d dlmZ dZ G d dej                  Z G d de          Z G d	 d
e          Z	 G d de          Z
 G d de          Z G d de          Z G d de          Zee	e
eeedZ e	ddddd           e
dddddd           eddddd           edddddddd          dZdS )    N)util)ProtocolError)	RoleFeaturesRoleBrokerFeaturesRoleSubscriberFeaturesRolePublisherFeaturesRoleDealerFeaturesRoleCallerFeaturesRoleCalleeFeaturesROLE_NAME_TO_CLASSDEFAULT_CLIENT_ROLESc                   (    e Zd ZdZdZd Zd Zd ZdS )r   z,
    Base class for WAMP role features.
    Nc                 4    t          j        | j                  S N)jsondumps__dict__)selfs    D/var/www/html/env/lib/python3.11/site-packages/autobahn/wamp/role.py__str__zRoleFeatures.__str__5   s    z$-(((    c                     i }| j                                         D ]\  }}||||<   d                    | j        d                    d |                                D                                 S )Nz{0}({1})z, c                 >    g | ]\  }}|d z   t          |          z   S )=)str).0kvs      r   
<listcomp>z)RoleFeatures.__repr__.<locals>.<listcomp>=   sA     7_ 7_ 7_;?1a 893wQ7G 7_ 7_ 7_r   )r   itemsformatROLEjoin)r   configured_optionsr   r   s       r   __repr__zRoleFeatures.__repr__8   s    M'')) 	* 	*DAq}()"1%  DII 7_ 7_CUC[C[C]C]7_ 7_ 7_ -` -` a a 	ar   c           	      *   | j         D ]}|                    d          ss|dk    rmt          | |          ]t          t          | |                    t          k    r7t          d                    t          | |          || j                            d S )N_r"   z1invalid type {0} for feature '{1}' for role '{2}')r   
startswithgetattrtypeboolr   r!   r"   )r   r   s     r   _check_all_boolzRoleFeatures._check_all_bool@   s     	D 	DA<<$$ Df4##/Dq9I9I4J4Jd4R4R'([(b(bcjkoqrcscsuvx|  yB  )C  )C  D  D  D	D 	Dr   )__name__
__module____qualname____doc__r"   r   r%   r,    r   r   r   r   -   sZ          D) ) )a a aD D D D Dr   r   c                   8    e Zd ZdZdZ	 	 	 	 	 	 	 	 	 	 	 	 	 ddZdS )r   z$
    WAMP broker role features.
    brokerNc                     || _         || _        || _        || _        || _        || _        || _        || _        |	| _        |
| _	        || _
        || _        || _        |                                  d S r   )publisher_identificationpublication_trustlevelspattern_based_subscriptionsession_meta_apisubscription_meta_apisubscriber_blackwhite_listingpublisher_exclusionsubscription_revocationevent_historypayload_transparencyx_acknowledged_event_deliverypayload_encryption_cryptoboxevent_retentionr,   )r   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   kwargss                  r   __init__zRoleBrokerFeatures.__init__P   s     )A%'>$*D' 0%:"-J*#6 '>$*$8!-J*,H).r   NNNNNNNNNNNNNr-   r.   r/   r0   r"   rC   r1   r   r   r   r   H   sb          D +/)-,0"&'+/3%))-#&*/3.2!%     r   r   c                   ,    e Zd ZdZdZ	 	 	 	 	 	 	 ddZdS )r   z(
    WAMP subscriber role features.
    
subscriberNc                     || _         || _        || _        || _        || _        || _        || _        |                                  d S r   )r5   r6   r7   r<   r=   r>   r@   r,   )	r   r5   r6   r7   r<   r=   r>   r@   rB   s	            r   rC   zRoleSubscriberFeatures.__init__w   sU     )A%'>$*D''>$*$8!,H)r   )NNNNNNNrE   r1   r   r   r   r   o   sP          D +/)-,0)-#&*.2     r   r   c                   *    e Zd ZdZdZ	 	 	 	 	 	 ddZdS )r   z'
    WAMP publisher role features.
    	publisherNc                     || _         || _        || _        || _        || _        || _        |                                  d S r   )r5   r:   r;   r>   r?   r@   r,   )r   r5   r:   r;   r>   r?   r@   rB   s           r   rC   zRolePublisherFeatures.__init__   sM     )A%-J*#6 $8!-J*,H)r   NNNNNNrE   r1   r   r   r   r      sM          D +//3%)&*/3.2     r   r   c                   8    e Zd ZdZdZ	 	 	 	 	 	 	 	 	 	 	 	 	 ddZdS )r	   z$
    WAMP dealer role features.
    dealerNc                     || _         || _        || _        || _        || _        || _        || _        || _        |	| _        |
| _	        || _
        || _        || _        |                                  d S r   )caller_identificationcall_trustlevelspattern_based_registrationr8   registration_meta_apishared_registrationcall_timeoutcall_cancelingprogressive_call_resultsregistration_revocationr>   testament_meta_apir@   r,   )r   rP   rQ   rR   r8   rS   rT   rU   rV   rW   rX   r>   rY   r@   rB   s                  r   rC   zRoleDealerFeatures.__init__   s     &;" 0*D' 0%:"#6 (,(@%'>$$8!"4,H)r   rD   rE   r1   r   r   r	   r	      sb          D (,"&,0"&'+%)" $*.)-&*$(.2     r   r	   c                   *    e Zd ZdZdZ	 	 	 	 	 	 ddZdS )r
   z$
    WAMP caller role features.
    callerNc                     || _         || _        || _        || _        || _        || _        |                                  d S r   )rP   rU   rV   rW   r>   r@   r,   )r   rP   rU   rV   rW   r>   r@   rB   s           r   rC   zRoleCallerFeatures.__init__   sL     &;"(,(@%$8!,H)r   rL   rE   r1   r   r   r
   r
      sM          D (," $*.&*.2     r   r
   c                   2    e Zd ZdZdZ	 	 	 	 	 	 	 	 	 	 ddZdS )r   z$
    WAMP callee role features.
    calleeNc                     || _         || _        || _        || _        || _        || _        || _        || _        |	| _        |
| _	        | 
                                 d S r   )rP   rQ   rR   rT   rU   rV   rW   rX   r>   r@   r,   )r   rP   rQ   rR   rT   rU   rV   rW   rX   r>   r@   rB   s               r   rC   zRoleCalleeFeatures.__init__   sl     &;" 0*D'#6 (,(@%'>$$8!,H)r   )
NNNNNNNNNNrE   r1   r   r   r   r      sY          D (,"&,0%)" $*.)-&*.2     r   r   )r3   rG   rJ   rN   r[   r^   T)r5   r7   r<   r>   r@   )r5   r:   r;   r>   r?   r@   )rP   rW   r>   r@   rV   )rP   rR   rT   rW   rX   r>   r@   rV   )rG   rJ   r[   r^   )r   autobahnr   autobahn.wamp.exceptionr   __all__EqualityMixinr   r   r   r   r	   r
   r   r   r   r1   r   r   <module>rd      sG  6        1 1 1 1 1 1
D D D D D4% D D D6$ $ $ $ $ $ $ $N    \   6    L   2$ $ $ $ $ $ $ $N       2       F !(&      )(!%#' $!%)   '&!%&* !&*%)   ! "!%!%)   ! "#' !% $!%)	 	 	/! !   r   