o
    ËÇîg	  ã                   @   sF   d dl Z d dlmZ G dd„ dƒZdd„ Zdd„ ZG d	d
„ d
eƒZdS )é    N)Údequec                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚPluginzBase pluginc                 C   ó   ||fS )zÆOverride to update the envelope or http headers when receiving a
        message.

        :param envelope: The envelope as XML node
        :param http_headers: Dict with the HTTP headers

        © )ÚselfÚenvelopeÚhttp_headersÚ	operationr   r   úE/home/ubuntu/webapp/venv/lib/python3.10/site-packages/zeep/plugins.pyÚingress   s   zPlugin.ingressc                 C   r   )aK  Override to update the envelope or http headers when sending a
        message.

        :param envelope: The envelope as XML node
        :param http_headers: Dict with the HTTP headers
        :param operation: The associated Operation instance
        :param binding_options: Binding specific options for the operation

        r   ©r   r   r   r	   Úbinding_optionsr   r   r
   Úegress   s   
zPlugin.egressN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r   r
   r      s    
r   c                 C   s4   | j D ]}| ||||¡}|d ur|\}}q||fS ©N)Úpluginsr   )Úclientr   r   r	   r   ÚpluginÚresultr   r   r
   Úapply_egress   s   
€r   c                 C   s2   | j D ]}| |||¡}|d ur|\}}q||fS r   )r   r   )r   r   r   r	   r   r   r   r   r
   Úapply_ingress(   s   
€r   c                   @   sV   e Zd Zddd„Zedd„ ƒZedejeje	ej
f  fdd„ƒZd	d
„ Zdd„ ZdS )ÚHistoryPluginé   c                 C   s   t g |ƒ| _d S r   )r   Ú_buffer)r   Úmaxlenr   r   r
   Ú__init__2   s   zHistoryPlugin.__init__c                 C   ó   | j d }|r|d S d S )NéÿÿÿÿÚsent©r   ©r   Úlast_txr   r   r
   Ú	last_sent5   s   
ÿzHistoryPlugin.last_sentÚreturnc                 C   r   )Nr    Úreceivedr"   r#   r   r   r
   Úlast_received;   s   
zHistoryPlugin.last_receivedc                 C   s   | j d }||dœ|d< d S )Nr    ©r   r   r'   r"   )r   r   r   r	   r$   r   r   r
   r   B   s   
zHistoryPlugin.ingressc                 C   s   | j  d ||dœdœ¡ d S )Nr)   )r'   r!   )r   Úappendr   r   r   r
   r   F   s
   þÿzHistoryPlugin.egressN)r   )r   r   r   r   Úpropertyr%   ÚtypingÚOptionalÚDictÚstrÚAnyr(   r   r   r   r   r   r
   r   1   s    

"r   )r,   Úcollectionsr   r   r   r   r   r   r   r   r
   Ú<module>   s    		