
    af%                     v   d 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 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 G d de          ZdS ))PublicationSubscriptionHandlerRegistrationEndpointPublishRequestSubscribeRequestUnsubscribeRequestCallRequestInvocationRequestRegisterRequestUnregisterRequestc                   "    e Zd ZdZdZd Zd ZdS )r   zw
    Object representing a publication (feedback from publishing an event when doing
    an acknowledged publish).
    idwas_encryptedc                 "    || _         || _        dS )z

        :param publication_id: The publication ID of the published event.
        :type publication_id: int

        :param was_encrypted: Flag indicating whether the app payload was encrypted.
        :type was_encrypted: bool
        Nr   )selfpublication_idr   s      G/var/www/html/env/lib/python3.11/site-packages/autobahn/wamp/request.py__init__zPublication.__init__4   s     !*    c                 B    d                     | j        | j                  S )Nz&Publication(id={0}, was_encrypted={1}))formatr   r   r   s    r   __str__zPublication.__str__@   s    7>>twHZ[[[r   N)__name__
__module____qualname____doc__	__slots__r   r    r   r   r   r   ,   sH         
 (I
+ 
+ 
+\ \ \ \ \r   r   c                   (    e Zd ZdZdZd Zd Zd ZdS )r   z5
    Object representing a handler subscription.
    r   topicactivesessionhandlerc                 L    || _         || _        d| _        || _        || _        dS )a  

        :param subscription_id: The subscription ID.
        :type subscription_id: int

        :param topic: The subscription URI or URI pattern.
        :type topic: str

        :param session: The ApplicationSession this subscription is living on.
        :type session: instance of ApplicationSession

        :param handler: The user event callback.
        :type handler: callable
        TNr#   )r   subscription_idr$   r&   r'   s        r   r   zSubscription.__init__K   s+     "
r   c                 b    | j         r| j                            |           S t          d          )z0
        Unsubscribe this subscription.
        zsubscription no longer active)r%   r&   _unsubscribe	Exceptionr   s    r   unsubscribezSubscription.unsubscribe`   s3     ; 	=<,,T222;<<<r   c                 B    d                     | j        | j                  S )Nz#Subscription(id={0}, is_active={1}))r   r   r%   r   s    r   r   zSubscription.__str__i   s    4;;DGT[QQQr   N)r   r   r   r   r    r   r-   r   r!   r   r   r   r   D   sX          @I  *= = =R R R R Rr   r   c                       e Zd ZdZdZddZdS )r   zJ
    Object representing an event handler attached to a subscription.
    fnobjdetails_argNc                 0    || _         || _        || _        dS )aS  

        :param fn: The event handler function to be called.
        :type fn: callable

        :param obj: The (optional) object upon which to call the function.
        :type obj: obj or None

        :param details_arg: The keyword argument under which event details should be provided.
        :type details_arg: str or None
        Nr0   r   r1   r2   r3   s       r   r   zHandler.__init__t         &r   NNr   r   r   r   r    r   r!   r   r   r   r   m   9          -I' ' ' ' ' 'r   r   c                   (    e Zd ZdZdZd Zd Zd ZdS )r   z-
    Object representing a registration.
    r   r%   r&   	procedureendpointc                 L    || _         d| _        || _        || _        || _        dS )a]  

        :param id: The registration ID.
        :type id: int

        :param active: Flag indicating whether this registration is active.
        :type active: bool

        :param procedure: The procedure URI or URI pattern.
        :type procedure: callable

        :param endpoint: The user callback.
        :type endpoint: callable
        TNr;   )r   r&   registration_idr<   r=   s        r   r   zRegistration.__init__   s+     "" r   c                 b    | j         r| j                            |           S t          d          )	
        zregistration no longer active)r%   r&   _unregisterr,   r   s    r   
unregisterzRegistration.unregister   s3     ; 	=<++D111;<<<r   c                 N    d                     | j        | j        | j                  S )Nz4Registration(id={0}, is_active={1}, procedure="{2}"))r   r   r%   r<   r   s    r   r   zRegistration.__str__   s$    ELLTWVZVacgcqrrrr   N)r   r   r   r   r    r   rC   r   r!   r   r   r   r      sX          EI! ! !*= = =s s s s sr   r   c                       e Zd ZdZdZddZdS )r   zO
    Object representing an procedure endpoint attached to a registration.
    r0   Nc                 0    || _         || _        || _        dS )aN  

        :param fn: The endpoint procedure to be called.
        :type fn: callable

        :param obj: The (optional) object upon which to call the function.
        :type obj: obj or None

        :param details_arg: The keyword argument under which call details should be provided.
        :type details_arg: str or None
        Nr0   r5   s       r   r   zEndpoint.__init__   r6   r   r7   r8   r!   r   r   r   r      r9   r   r   c                       e Zd ZdZdZd ZdS )Requestz
    Object representing an outstanding request, such as for subscribe/unsubscribe,
    register/unregister or call/publish.
    
request_idon_replyc                 "    || _         || _        dS )z

        :param request_id: The WAMP request ID.
        :type request_id: int

        :param on_reply: The Deferred/Future to be fired when the request returns.
        :type on_reply: Deferred/Future
        NrI   )r   rJ   rK   s      r   r   zRequest.__init__   s     % r   Nr8   r!   r   r   rH   rH      s4         
 +I
! 
! 
! 
! 
!r   rH   c                       e Zd ZdZdZd ZdS )r   zX
    Object representing an outstanding request to publish (acknowledged) an event.
    r   c                 L    t                               | ||           || _        dS )aL  

        :param request_id: The WAMP request ID.
        :type request_id: int

        :param on_reply: The Deferred/Future to be fired when the request returns.
        :type on_reply: Deferred/Future

        :param was_encrypted: Flag indicating whether the app payload was encrypted.
        :type was_encrypted: bool
        N)rH   r   r   )r   rJ   rK   r   s       r   r   zPublishRequest.__init__   s*     	z8444*r   Nr8   r!   r   r   r   r      s4          !I+ + + + +r   r   c                       e Zd ZdZdZd ZdS )r   zM
    Object representing an outstanding request to subscribe to a topic.
    )r'   r$   c                 Z    t                               | ||           || _        || _        dS )a  

        :param request_id: The WAMP request ID.
        :type request_id: int

        :param topic: The topic URI being subscribed to.
        :type topic: unicode

        :param on_reply: The Deferred/Future to be fired when the request returns.
        :type on_reply: Deferred/Future

        :param handler: WAMP call options that are in use for this call.
        :type handler: callable
        N)rH   r   r$   r'   )r   rJ   r$   rK   r'   s        r   r   zSubscribeRequest.__init__   s.     	z8444
r   Nr8   r!   r   r   r   r      s4          %I    r   r   c                       e Zd ZdZdZd ZdS )r	   zS
    Object representing an outstanding request to unsubscribe a subscription.
    )r)   c                 L    t                               | ||           || _        dS rA   N)rH   r   r)   )r   rJ   rK   r)   s       r   r   zUnsubscribeRequest.__init__  *     	z8444.r   Nr8   r!   r   r   r	   r	     4          %I/ / / / /r   r	   c                       e Zd ZdZdZd ZdS )r
   zI
    Object representing an outstanding request to call a procedure.
    )r<   optionsc                 Z    t                               | ||           || _        || _        dS )a:  

        :param request_id: The WAMP request ID.
        :type request_id: int

        :param on_reply: The Deferred/Future to be fired when the request returns.
        :type on_reply: Deferred/Future

        :param options: WAMP call options that are in use for this call.
        :type options: dict
        N)rH   r   r<   rW   )r   rJ   r<   rK   rW   s        r   r   zCallRequest.__init__!  s.     	z8444"r   Nr8   r!   r   r   r
   r
     s4          *I    r   r
   c                       e Zd ZdZdS )r   zK
    Object representing an outstanding request to invoke an endpoint.
    N)r   r   r   r   r!   r   r   r   r   2  s           r   r   c                       e Zd ZdZdZd ZdS )r   zM
    Object representing an outstanding request to register a procedure.
    )r<   r=   c                 Z    t                               | ||           || _        || _        dS rS   )rH   r   r<   r=   )r   rJ   rK   r<   r=   s        r   r   zRegisterRequest.__init__?  s.     	z8444" r   Nr8   r!   r   r   r   r   8  s4          +I! ! ! ! !r   r   c                       e Zd ZdZdZd ZdS )r   zR
    Object representing an outstanding request to unregister a registration.
    )r?   c                 L    t                               | ||           || _        dS rS   )rH   r   r?   )r   rJ   rK   r?   s       r   r   zUnregisterRequest.__init__N  rT   r   Nr8   r!   r   r   r   r   G  rU   r   r   N)__all__objectr   r   r   r   r   rH   r   r   r	   r
   r   r   r   r!   r   r   <module>r`      sR  8 \ \ \ \ \& \ \ \0&R &R &R &R &R6 &R &R &RR' ' ' ' 'f ' ' '0%s %s %s %s %s6 %s %s %sP' ' ' ' 'v ' ' '0! ! ! ! !f ! ! !*+ + + + +W + + +.    w   6/ / / / / / / /    '   0       ! ! ! ! !g ! ! !/ / / / / / / / / /r   