Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

142 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 1995-1996 Microsoft Corporation
  3. Module Name :
  4. isapi.hxx
  5. Abstract:
  6. This module declares the class for the HTTP Extension objects.
  7. Author:
  8. Murali R. Krishnan ( MuraliK ) 17-July-1996
  9. Environment:
  10. User Mode - Win32
  11. Project:
  12. W3 Services DLL
  13. Revision History:
  14. --*/
  15. # ifndef _ISAPI_HXX_
  16. # define _ISAPI_HXX_
  17. /************************************************************
  18. * Include Headers
  19. ************************************************************/
  20. #if 0
  21. extern "C" {
  22. # include <nt.h>
  23. # include <ntrtl.h>
  24. # include <nturtl.h>
  25. # include <windows.h>
  26. # include <string.h>
  27. };
  28. # endif // 0
  29. # include "buffer.hxx"
  30. # include <iisextp.h>
  31. //
  32. // SE_EXIT_PERIOD is the time to wait for all extensions to get out during
  33. // shutdown (in seconds). Note the service controller will blow away the
  34. // service before this timeout period expires
  35. //
  36. #define SE_EXIT_PERIOD (900) // seconds
  37. /************************************************************
  38. * Forward References
  39. ************************************************************/
  40. class WAM_EXEC_INFO;
  41. /************************************************************
  42. * Type Definitions
  43. ************************************************************/
  44. struct EXEC_DESCRIPTOR;
  45. /*++
  46. class HSE_BASE:
  47. o Defines the class which will be the base class for legacy ISAPI apps
  48. and the TAAL-based apps
  49. --*/
  50. class HSE_BASE {
  51. public:
  52. HSE_BASE( IN const CHAR * pszModuleName,
  53. IN BOOL fCache
  54. )
  55. : m_nRefs ( 1),
  56. m_strModuleName( pszModuleName ),
  57. m_fValid ( TRUE),
  58. m_fCache ( fCache )
  59. {
  60. if ( !m_strModuleName.IsValid()) {
  61. SetValid( FALSE);
  62. }
  63. }
  64. virtual ~HSE_BASE( VOID) {};
  65. virtual BOOL IsValid( VOID) const { return ( m_fValid && (m_nRefs > 0)); }
  66. #if DBG
  67. virtual BOOL IsKindaValid( VOID) const { return ( m_fValid ); }
  68. #endif
  69. virtual BOOL IsMatch( IN const char * pchModuleName,
  70. IN DWORD cchModuleName) const = 0;
  71. virtual DWORD ExecuteRequest( IN WAM_EXEC_INFO * pWamExecInfo ) = 0;
  72. virtual BOOL AccessCheck( HANDLE hImpersonation,
  73. BOOL fCacheImpersonation) = 0;
  74. virtual BOOL LoadAcl( VOID ) = 0;
  75. virtual BOOL Cleanup(VOID) = 0;
  76. virtual DWORD GetDirMonitorId(void) const { return (0); }
  77. BOOL IsCached( VOID ) const
  78. { return m_fCache; }
  79. VOID SetValid( BOOL fVal) { m_fValid = fVal; }
  80. LONG Reference( VOID) { return ( InterlockedIncrement( &m_nRefs)); }
  81. LONG Dereference( VOID) { return ( InterlockedDecrement( &m_nRefs)); }
  82. LONG RefCount(VOID) const { return ( m_nRefs); }
  83. const CHAR * QueryModuleName( VOID ) const
  84. { return m_strModuleName.QueryStr(); }
  85. LIST_ENTRY m_ListEntry;
  86. private:
  87. LONG m_nRefs;
  88. BOOL m_fValid;
  89. BOOL m_fCache;
  90. protected:
  91. STR m_strModuleName;
  92. }; // class HSE_BASE
  93. typedef HSE_BASE * PHSE;
  94. # endif // _ISAPI_HXX_
  95. /************************ End of File ***********************/