
    %i#)                     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)	DEFAULT_CLIENT_ROLESROLE_NAME_TO_CLASSRoleBrokerFeaturesRoleCalleeFeaturesRoleCallerFeaturesRoleDealerFeaturesRoleFeaturesRolePublisherFeaturesRoleSubscriberFeaturesc                   &    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    l/var/www/html/navyabakers_fullstack/navyabakers_prod/venv/lib/python3.12/site-packages/autobahn/wamp/role.py__str__zRoleFeatures.__str__4   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__7   s    MM'') 	*DAq}()"1%	*   IIII4F4L4L4NODAqq3wQ'OP
 	
Os   !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_boolA   st     	A<<$f4#/Dq9I4Jd4R'KRR#D!,a 	r   )__name__
__module____qualname____doc__r   r   r"   r)    r   r   r   r   -   s     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__T   sy    " )A%'>$*D' 0%:"-J*#6 '>$*$8!-J*,H).r   NNNNNNNNNNNNNr*   r+   r,   r-   r   r@   r.   r   r   r   r   M   s<     D "& $#'"&*  $!&*%)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__|   sI     )A%'>$*D''>$*$8!,H)r   )NNNNNNNrB   r.   r   r   r   r   u   s*     D "& $#' $!%)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 "&&* !&*%)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 ##'" !% $!%)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 #!%!%)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 ##' !% $!%)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
4%% @% %P\ 8L 4% %P 4 H !(&     )!%#' $!%) '!%&* !&*%) !"!%!%) !"#' !% $!%)	/! r   