i JdZddlmZGddZGddZdS)aSimple 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*eZdZdZdZdZdZdZdS)SimpleExtensionz'Base class for a simple ISAPI extensioncdSNselfs :C:\PYTHON\_runtimes\venv\Lib\site-packages\isapi/simple.py__init__zSimpleExtension.__init__ c&||j|_dSdS)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.GetExtensionVersions >#|B    >rc td)zCalled by the ISAPI framework for each extension request. sub-classes must provide an implementation for this method. -sub-classes should override HttpExtensionProcNotImplementedError)r control_blocks r HttpExtensionProcz!SimpleExtension.HttpExtensionProc ""QRRRrcdS)z:Called by the ISAPI framework as the extension terminates.Nrr statuss r TerminateExtensionz"SimpleExtension.TerminateExtension$ rN)__name__ __module__ __qualname__rr rrrrrr rrsY--   ,,,SSS     rrc:eZdZUdZdZded<dZdZdZdZ dS) SimpleFilterz&Base class for a a simple ISAPI filterNz int | None filter_flagscdSrrr s r r zSimpleFilter.__init__.r rcj|jtd||j|_|j|_dSdS)a5Called 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% RuntimeErrorFlagsr FilterDesc)r fvs r GetFilterVersionzSimpleFilter.GetFilterVersion1s?   $BCC C >(BH LBMMM >rc td)zCalled by the ISAPI framework for each filter request. sub-classes must provide an implementation for this method. rr)r fcs r HttpFilterProczSimpleFilter.HttpFilterProc@rrcdS)z7Called by the ISAPI framework as the filter terminates.Nrrs r TerminateFilterzSimpleFilter.TerminateFilterGrr) r r!r"rr%__annotations__r r,r/r1rrr r$r$)sl,,#L####    ) ) )SSS     rr$N)r __future__rrr$rrr r4s}#"""""        6           r