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.

184 lines
3.6 KiB

  1. /*++
  2. Copyright (c) 1999-2000 Microsoft Corporation
  3. Module Name:
  4. ulatq.h
  5. Abstract:
  6. Exported ULATQ.DLL routines.
  7. ULATQ contains the thread queue and UL support routines for
  8. IISPLUS.
  9. Author:
  10. Taylor Weiss (TaylorW) 15-Dec-1999
  11. Revision History:
  12. --*/
  13. #ifndef _ULATQ_H_
  14. #define _ULATQ_H_
  15. //
  16. // The magic context that makes the world turn
  17. //
  18. typedef VOID* ULATQ_CONTEXT;
  19. //
  20. // Some callbacks specified by user of ULATQ to catch certain events
  21. //
  22. typedef VOID
  23. (*PFN_ULATQ_NEW_REQUEST)
  24. (
  25. ULATQ_CONTEXT pContext
  26. );
  27. typedef VOID
  28. (*PFN_ULATQ_IO_COMPLETION)
  29. (
  30. PVOID pvContext,
  31. DWORD cbWritten,
  32. DWORD dwCompletionStatus,
  33. OVERLAPPED * lpo
  34. );
  35. typedef VOID
  36. (*PFN_ULATQ_DISCONNECT)
  37. (
  38. PVOID pvContext
  39. );
  40. typedef VOID
  41. (*PFN_ULATQ_ON_SHUTDOWN)
  42. (
  43. BOOL fImmediate
  44. );
  45. typedef HRESULT
  46. (* PFN_ULATQ_COLLECT_PERF_COUNTERS)(
  47. OUT PBYTE * ppCounterData,
  48. OUT DWORD * pdwCounterData
  49. );
  50. typedef struct _ULATQ_CONFIG
  51. {
  52. PFN_ULATQ_IO_COMPLETION pfnIoCompletion;
  53. PFN_ULATQ_NEW_REQUEST pfnNewRequest;
  54. PFN_ULATQ_DISCONNECT pfnDisconnect;
  55. PFN_ULATQ_ON_SHUTDOWN pfnOnShutdown;
  56. PFN_ULATQ_COLLECT_PERF_COUNTERS pfnCollectCounters;
  57. }
  58. ULATQ_CONFIG, *PULATQ_CONFIG;
  59. //
  60. // ULATQ_CONTEXT properties
  61. //
  62. typedef enum
  63. {
  64. ULATQ_PROPERTY_COMPLETION_CONTEXT = 0,
  65. ULATQ_PROPERTY_HTTP_REQUEST,
  66. ULATQ_PROPERTY_APP_POOL_ID
  67. } ULATQ_CONTEXT_PROPERTY_ID;
  68. HRESULT
  69. UlAtqInitialize(
  70. INT argc,
  71. LPWSTR argv[],
  72. ULATQ_CONFIG * pConfig
  73. );
  74. HRESULT
  75. UlAtqStartListen(
  76. VOID
  77. );
  78. VOID
  79. UlAtqTerminate(
  80. HRESULT hrToSend
  81. );
  82. VOID *
  83. UlAtqGetContextProperty(
  84. ULATQ_CONTEXT pContext,
  85. ULATQ_CONTEXT_PROPERTY_ID ContextPropertyId
  86. );
  87. VOID
  88. UlAtqSetContextProperty(
  89. ULATQ_CONTEXT pContext,
  90. ULATQ_CONTEXT_PROPERTY_ID ContextPropertyId,
  91. PVOID pvData
  92. );
  93. VOID
  94. UlAtqFreeContext(
  95. ULATQ_CONTEXT pContext
  96. );
  97. HRESULT
  98. UlAtqSendEntityBody(
  99. ULATQ_CONTEXT pContext,
  100. BOOL fAsync,
  101. DWORD dwFlags,
  102. DWORD cChunks,
  103. HTTP_DATA_CHUNK * pChunks,
  104. DWORD *pcbSent,
  105. HTTP_LOG_FIELDS_DATA *pUlLogData
  106. );
  107. HRESULT
  108. UlAtqReceiveEntityBody(
  109. ULATQ_CONTEXT pContext,
  110. BOOL fAsync,
  111. DWORD dwFlags,
  112. VOID * pBuffer,
  113. DWORD cbBuffer,
  114. DWORD * pBytesReceived
  115. );
  116. HRESULT
  117. UlAtqSendHttpResponse(
  118. ULATQ_CONTEXT pContext,
  119. BOOL fAsync,
  120. DWORD dwFlags,
  121. HTTP_RESPONSE * pResponse,
  122. HTTP_CACHE_POLICY * pCachePolicy,
  123. DWORD * pcbSent,
  124. HTTP_LOG_FIELDS_DATA * pUlLogData
  125. );
  126. HRESULT
  127. UlAtqWaitForDisconnect(
  128. HTTP_CONNECTION_ID connectionId,
  129. BOOL fAsync,
  130. VOID * pvContext
  131. );
  132. HRESULT
  133. UlAtqReceiveClientCertificate(
  134. ULATQ_CONTEXT pContext,
  135. BOOL fAsync,
  136. BOOL fDoCertMap,
  137. HTTP_SSL_CLIENT_CERT_INFO **ppClientCertInfo
  138. );
  139. HRESULT
  140. UlAtqInduceShutdown(
  141. BOOL fImmediate
  142. );
  143. HRESULT
  144. UlAtqFlushUlCache(
  145. WCHAR * pszURLPrefix
  146. );
  147. #endif // _ULATQ_H_