
    h*                     V   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y)    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y)r   z,
    Base class for WAMP role features.
    Nc                 @    t        j                  | j                        S N)jsondumps__dict__)selfs    N/var/www/Befach/backend/env/lib/python3.12/site-packages/autobahn/wamp/role.py__str__zRoleFeatures.__str__5   s    zz$--((    c                    i }| j                   j                         D ]  \  }}|	|||<    dj                  | j                  dj	                  |j                         D cg c]  \  }}|dz   t        |      z    c}}            S c c}}w )Nz{0}({1})z, =)r   itemsformatROLEjoinstr)r   configured_optionskvs       r   __repr__zRoleFeatures.__repr__8   s    MM'')DAq}()"1% *   DIICUC[C[C]7_;?1a 893wQ7G 7_ -` a 	a 7_s   !Bc           	         | j                   D ]s  }|j                  d      r|dk7  st        | |      (t        t        | |            t        k7  sEt        dj                  t        | |      || j                               y )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    A<<$f4#/Dq9I4Jd4R'([(b(bcjkoqrcsuvx|  yB  yB  )C  D  D r   )__name__
__module____qualname____doc__r   r   r"   r)    r   r   r   r   -   s     D)aDr   r   c                   6    e Zd ZdZdZ	 	 	 	 	 	 	 	 	 	 	 	 	 ddZy)r   z$
    WAMP broker role features.
    brokerNc                     || _         || _        || _        || _        || _        || _        || _        || _        |	| _        |
| _	        || _
        || _        || _        | j                          y 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   r2   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   kwargss                  r   __init__zRoleBrokerFeatures.__init__P   sy     )A%'>$*D' 0%:"-J*#6 '>$*$8!-J*,H).r   NNNNNNNNNNNNNr*   r+   r,   r-   r   r@   r.   r   r   r   r   H   s<     D +/)-,0"&'+/3%))-#&*/3.2!%r   r   c                   *    e Zd ZdZdZ	 	 	 	 	 	 	 ddZy)r   z(
    WAMP subscriber role features.
    
subscriberNc                     || _         || _        || _        || _        || _        || _        || _        | j                          y r   )r2   r3   r4   r9   r:   r;   r=   r)   )	r   r2   r3   r4   r9   r:   r;   r=   r?   s	            r   r@   zRoleSubscriberFeatures.__init__w   sI     )A%'>$*D''>$*$8!,H)r   )NNNNNNNrB   r.   r   r   r   r   o   s*     D +/)-,0)-#&*.2r   r   c                   (    e Zd ZdZdZ	 	 	 	 	 	 ddZy)r   z'
    WAMP publisher role features.
    	publisherNc                 x    || _         || _        || _        || _        || _        || _        | j                          y r   )r2   r7   r8   r;   r<   r=   r)   )r   r2   r7   r8   r;   r<   r=   r?   s           r   r@   zRolePublisherFeatures.__init__   sA     )A%-J*#6 $8!-J*,H)r   NNNNNNrB   r.   r   r   r   r      s'     D +//3%)&*/3.2r   r   c                   6    e Zd ZdZdZ	 	 	 	 	 	 	 	 	 	 	 	 	 ddZy)r	   z$
    WAMP dealer role features.
    dealerNc                     || _         || _        || _        || _        || _        || _        || _        || _        |	| _        |
| _	        || _
        || _        || _        | j                          y r   )caller_identificationcall_trustlevelspattern_based_registrationr5   registration_meta_apishared_registrationcall_timeoutcall_cancelingprogressive_call_resultsregistration_revocationr;   testament_meta_apir=   r)   )r   rM   rN   rO   r5   rP   rQ   rR   rS   rT   rU   r;   rV   r=   r?   s                  r   r@   zRoleDealerFeatures.__init__   sx     &;" 0*D' 0%:"#6 (,(@%'>$$8!"4,H)r   rA   rB   r.   r   r   r	   r	      s<     D (,"&,0"&'+%)" $*.)-&*$(.2r   r	   c                   (    e Zd ZdZdZ	 	 	 	 	 	 ddZy)r
   z$
    WAMP caller role features.
    callerNc                 x    || _         || _        || _        || _        || _        || _        | j                          y r   )rM   rR   rS   rT   r;   r=   r)   )r   rM   rR   rS   rT   r;   r=   r?   s           r   r@   zRoleCallerFeatures.__init__   s@     &;"(,(@%$8!,H)r   rI   rB   r.   r   r   r
   r
      s'     D (," $*.&*.2r   r
   c                   0    e Zd ZdZdZ	 	 	 	 	 	 	 	 	 	 ddZy)r   z$
    WAMP callee role features.
    calleeNc                     || _         || _        || _        || _        || _        || _        || _        || _        |	| _        |
| _	        | j                          y r   )rM   rN   rO   rQ   rR   rS   rT   rU   r;   r=   r)   )r   rM   rN   rO   rQ   rR   rS   rT   rU   r;   r=   r?   s               r   r@   zRoleCalleeFeatures.__init__   s`     &;" 0*D'#6 (,(@%'>$$8!,H)r   )
NNNNNNNNNNrB   r.   r   r   r   r      s3     D (,"&,0%)" $*.)-&*.2r   r   )r0   rD   rG   rK   rX   r[   T)r2   r4   r9   r;   r=   )r2   r7   r8   r;   r<   r=   )rM   rT   r;   r=   rS   )rM   rO   rQ   rT   rU   r;   r=   rS   )rD   rG   rX   r[   )r   autobahnr   autobahn.wamp.exceptionr   __all__EqualityMixinr   r   r   r   r	   r
   r   r   r   r.   r   r   <module>ra      s
  6   1
D4%% D6$ $N\ 6L 2$ $N 2 F !(&     )!%#' $!%) '!%&* !&*%) !"!%!%) !"#' !% $!%)	/! r   