
    $
i
                    J    d Z ddlmZ  G d d          Z G d d          ZdS )a  Simple base-classes for extensions and filters.

None of the filter and extension functions are considered 'optional' by the
framework.  These base-classes provide simple implementations for the
Initialize and Terminate functions, allowing you to omit them,

It is not necessary to use these base-classes - but if you don't, you
must ensure each of the required methods are implemented.
    )annotationsc                  *    e Zd ZdZd Zd Zd Zd ZdS )SimpleExtensionz'Base class for a simple ISAPI extensionc                    d S N selfs    C:\Users\Dell Inspiron 16\Desktop\tws\AgrotaPowerBi\back-agrota-powerbi\mcp-client-agrota\venv\Lib\site-packages\isapi/simple.py__init__zSimpleExtension.__init__           c                &    || j         |_        dS dS )zCalled by the ISAPI framework to get the extension version

        The default implementation uses the classes docstring to
        set the extension description.N)__doc__ExtensionDesc)r
   vis     r   GetExtensionVersionz#SimpleExtension.GetExtensionVersion   s      >#|B >r   c                     t          d          )zCalled by the ISAPI framework for each extension request.

        sub-classes must provide an implementation for this method.
        -sub-classes should override HttpExtensionProcNotImplementedError)r
   control_blocks     r   HttpExtensionProcz!SimpleExtension.HttpExtensionProc       
 ""QRRRr   c                    dS )z:Called by the ISAPI framework as the extension terminates.Nr   r
   statuss     r   TerminateExtensionz"SimpleExtension.TerminateExtension$       r   N)__name__
__module____qualname__r   r   r   r   r   r   r   r   r   r      sY        --  , , ,S S S    r   r   c                  :    e Zd ZU dZdZded<   d Zd Zd Zd Z	dS )	SimpleFilterz&Base class for a a simple ISAPI filterNz
int | Nonefilter_flagsc                    d S r   r   r	   s    r   r   zSimpleFilter.__init__.   r   r   c                j    | j         t          d          || j         |_        | j        |_        dS dS )a5  Called by the ISAPI framework to get the extension version

        The default implementation uses the classes docstring to
        set the extension description, and uses the classes
        filter_flags attribute to set the ISAPI filter flags - you
        must specify filter_flags in your class.
        Nz!You must specify the filter flags)r%   RuntimeErrorFlagsr   
FilterDesc)r
   fvs     r   GetFilterVersionzSimpleFilter.GetFilterVersion1   s?     $BCCC>(BH LBMMM >r   c                     t          d          )zCalled by the ISAPI framework for each filter request.

        sub-classes must provide an implementation for this method.
        r   r   )r
   fcs     r   HttpFilterProczSimpleFilter.HttpFilterProc@   r   r   c                    dS )z7Called by the ISAPI framework as the filter terminates.Nr   r   s     r   TerminateFilterzSimpleFilter.TerminateFilterG   r   r   )
r    r!   r"   r   r%   __annotations__r   r,   r/   r1   r   r   r   r$   r$   )   sl         ,,#L####  ) ) )S S S    r   r$   N)r   
__future__r   r   r$   r   r   r   <module>r4      s}     # " " " " "       6                   r   