Leaked source code of windows server 2003
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.

214 lines
4.4 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_PROPERTY_IS_COMMAND_LINE_LAUNCH,
  68. ULATQ_PROPERTY_DO_CENTRAL_BINARY_LOGGING
  69. } ULATQ_CONTEXT_PROPERTY_ID;
  70. HRESULT
  71. UlAtqInitialize(
  72. INT argc,
  73. LPWSTR argv[],
  74. ULATQ_CONFIG * pConfig
  75. );
  76. HRESULT
  77. UlAtqStartListen(
  78. VOID
  79. );
  80. VOID
  81. UlAtqTerminate(
  82. HRESULT hrToSend
  83. );
  84. VOID *
  85. UlAtqGetContextProperty(
  86. ULATQ_CONTEXT pContext,
  87. ULATQ_CONTEXT_PROPERTY_ID ContextPropertyId
  88. );
  89. VOID
  90. UlAtqSetContextProperty(
  91. ULATQ_CONTEXT pContext,
  92. ULATQ_CONTEXT_PROPERTY_ID ContextPropertyId,
  93. PVOID pvData
  94. );
  95. VOID *
  96. UlAtqAllocateMemory(
  97. ULATQ_CONTEXT pContext,
  98. DWORD cbData
  99. );
  100. VOID
  101. UlAtqFreeContext(
  102. ULATQ_CONTEXT pContext
  103. );
  104. HRESULT
  105. UlAtqSendEntityBody(
  106. ULATQ_CONTEXT pContext,
  107. BOOL fAsync,
  108. DWORD dwFlags,
  109. USHORT cChunks,
  110. HTTP_DATA_CHUNK * pChunks,
  111. DWORD *pcbSent,
  112. HTTP_LOG_FIELDS_DATA *pUlLogData
  113. );
  114. HRESULT
  115. UlAtqReceiveEntityBody(
  116. ULATQ_CONTEXT pContext,
  117. BOOL fAsync,
  118. DWORD dwFlags,
  119. VOID * pBuffer,
  120. DWORD cbBuffer,
  121. DWORD * pBytesReceived
  122. );
  123. HRESULT
  124. UlAtqSendHttpResponse(
  125. ULATQ_CONTEXT pContext,
  126. BOOL fAsync,
  127. DWORD dwFlags,
  128. HTTP_RESPONSE * pResponse,
  129. HTTP_CACHE_POLICY * pCachePolicy,
  130. DWORD * pcbSent,
  131. HTTP_LOG_FIELDS_DATA * pUlLogData
  132. );
  133. HRESULT
  134. UlAtqWaitForDisconnect(
  135. HTTP_CONNECTION_ID connectionId,
  136. BOOL fAsync,
  137. VOID * pvContext,
  138. BOOL * pfAlreadyCompleted = NULL
  139. );
  140. HRESULT
  141. UlAtqReceiveClientCertificate(
  142. ULATQ_CONTEXT pContext,
  143. BOOL fAsync,
  144. BOOL fDoCertMap,
  145. HTTP_SSL_CLIENT_CERT_INFO **ppClientCertInfo
  146. );
  147. HRESULT
  148. UlAtqInduceShutdown(
  149. BOOL fImmediate
  150. );
  151. HRESULT
  152. UlAtqFlushUlCache(
  153. WCHAR * pszURLPrefix
  154. );
  155. VOID
  156. UlAtqSetUnhealthy(
  157. VOID
  158. );
  159. HRESULT
  160. UlAtqAddFragmentToCache(
  161. HTTP_DATA_CHUNK * pDataChunk,
  162. WCHAR * pszFragmentName);
  163. HRESULT
  164. UlAtqReadFragmentFromCache(
  165. WCHAR * pszFragmentName,
  166. BYTE * pvBuffer,
  167. DWORD cbSize,
  168. DWORD * pcbCopied);
  169. HRESULT
  170. UlAtqRemoveFragmentFromCache(
  171. WCHAR * pszFragmentName);
  172. #endif // _ULATQ_H_