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.

264 lines
7.0 KiB

  1. /*++
  2. Copyright (c) 1995-1999 Microsoft Corporation
  3. Module Name:
  4. ilogobj.hxx
  5. Abstract:
  6. Logging interfaces
  7. Author:
  8. Terence Kwan ( terryk ) 18-June-1996
  9. --*/
  10. # ifndef _ILOGOBJ_HXX_
  11. # define _ILOGOBJ_HXX_
  12. //
  13. // strings
  14. //
  15. #define NCSALOG_CLSID TEXT("{FF16065F-DE82-11CF-BC0A-00AA006111E0}")
  16. #define ODBCLOG_CLSID TEXT("{FF16065B-DE82-11CF-BC0A-00AA006111E0}")
  17. #define ASCLOG_CLSID TEXT("{FF160657-DE82-11CF-BC0A-00AA006111E0}")
  18. #define EXTLOG_CLSID TEXT("{FF160663-DE82-11CF-BC0A-00AA006111E0}")
  19. #define NCSALOGUI_CLSID TEXT("{31DCAB85-BB3E-11d0-9299-00C04FB6678B}")
  20. #define ODBCLOGUI_CLSID TEXT("{31DCAB86-BB3E-11d0-9299-00C04FB6678B}")
  21. #define ASCLOGUI_CLSID TEXT("{31DCAB87-BB3E-11d0-9299-00C04FB6678B}")
  22. #define EXTLOGUI_CLSID TEXT("{31DCAB88-BB3E-11d0-9299-00C04FB6678B}")
  23. //
  24. // GUIDS
  25. //
  26. // Interface IDs
  27. DEFINE_GUID(IID_IINETLOG_INFORMATION, /* cc557a71-f61a-11cf-bc0f-00aa006111e0 */
  28. 0xcc557a71,0xf61a,0x11cf,0xbc, 0x0f, 0x00, 0xaa, 0x00, 0x61, 0x11, 0xe0);
  29. DEFINE_GUID(IID_ILogPlugin, /* 08fd99d1-cfb6-11cf-bc03-00aa006111e0 */
  30. 0x08fd99d1,0xcfb6,0x11cf,0xbc, 0x03, 0x00, 0xaa, 0x00, 0x61, 0x11, 0xe0);
  31. DEFINE_GUID(IID_ILogPluginEx, /* 3710E192-9C25-11d1-8B9A-080009DCC2FA */
  32. 0x3710e192, 0x9c25, 0x11d1, 0x8b, 0x9a, 0x8, 0x0, 0x9, 0xdc, 0xc2, 0xfa);
  33. // Class IDs
  34. DEFINE_GUID(CLSID_NCSALOG, /* ff16065F-DE82-11cf-bc0a-00aa006111e0 */
  35. 0xff16065F,0xde82,0x11cf,0xbc, 0x0a, 0x00, 0xaa, 0x00, 0x61, 0x11, 0xe0);
  36. DEFINE_GUID(CLSID_ODBCLOG, /* ff16065B-DE82-11cf-bc0a-00aa006111e0 */
  37. 0xff16065B,0xde82,0x11cf,0xbc, 0x0a, 0x00, 0xaa, 0x00, 0x61, 0x11, 0xe0);
  38. DEFINE_GUID(CLSID_ASCLOG, /* ff160657-DE82-11cf-bc0a-00aa006111e0 */
  39. 0xff160657,0xde82,0x11cf,0xbc, 0x0a, 0x00, 0xaa, 0x00, 0x61, 0x11, 0xe0);
  40. DEFINE_GUID(CLSID_EXTLOG, /* ff160663-DE82-11cf-bc0a-00aa006111e0 */
  41. 0xff160663,0xde82,0x11cf,0xbc, 0x0a, 0x00, 0xaa, 0x00, 0x61, 0x11, 0xe0);
  42. // Logging UI IDs
  43. DEFINE_GUID(IID_LOGGINGUI, /* 31DCAB89-BB3E-11d0-9299-00C04FB6678B */
  44. 0x31dcab89, 0xbb3e, 0x11d0, 0x92, 0x99, 0x0, 0xc0, 0x4f, 0xb6, 0x67, 0x8b);
  45. DEFINE_GUID(CLSID_NCSALOGUI, /* 31DCAB85-BB3E-11d0-9299-00C04FB6678B */
  46. 0x31dcab85, 0xbb3e, 0x11d0, 0x92, 0x99, 0x0, 0xc0, 0x4f, 0xb6, 0x67, 0x8b);
  47. DEFINE_GUID(CLSID_ODBCLOGUI, /* 31DCAB86-BB3E-11d0-9299-00C04FB6678B */
  48. 0x31dcab86, 0xbb3e, 0x11d0, 0x92, 0x99, 0x0, 0xc0, 0x4f, 0xb6, 0x67, 0x8b);
  49. DEFINE_GUID(CLSID_ASCLOGUI, /* 31DCAB87-BB3E-11d0-9299-00C04FB6678B */
  50. 0x31dcab87, 0xbb3e, 0x11d0, 0x92, 0x99, 0x0, 0xc0, 0x4f, 0xb6, 0x67, 0x8b);
  51. DEFINE_GUID(CLSID_EXTLOGUI, /* 31DCAB88-BB3E-11d0-9299-00C04FB6678B */
  52. 0x31dcab88, 0xbb3e, 0x11d0, 0x92, 0x99, 0x0, 0xc0, 0x4f, 0xb6, 0x67, 0x8b);
  53. //
  54. // Unused IDs
  55. //
  56. DEFINE_GUID(IID_ICLAPI_CLIENT, /* 08fd99d1-cfb6-11cf-bc03-00aa006111e0 */
  57. 0x08fd99d1,0xcfb6,0x11cf,0xbc, 0x03, 0x00, 0xaa, 0x00, 0x61, 0x11, 0xe0);
  58. DEFINE_GUID(CLSID_InetLogInformation, /* a1f89741-f619-11cf-bc0f-00aa006111e0 */
  59. 0xa1f89741, 0xf619, 0x11cf, 0xbc, 0xf, 0x0, 0xaa, 0x0, 0x61, 0x11, 0xe0);
  60. //
  61. // Logging Interface exposed by IIS
  62. //
  63. class IInetLogInformation : public IUnknown {
  64. public:
  65. virtual LPSTR STDMETHODCALLTYPE
  66. GetSiteName(
  67. IN PCHAR pszSiteName,
  68. IN PDWORD pcbSize
  69. ) = 0;
  70. virtual LPSTR STDMETHODCALLTYPE
  71. GetComputerName(
  72. IN PCHAR pszComputerName,
  73. IN PDWORD pcbSize
  74. ) = 0;
  75. virtual LPSTR STDMETHODCALLTYPE
  76. GetClientHostName(
  77. IN PCHAR pszClientHostName,
  78. IN PDWORD pcbSize
  79. ) = 0;
  80. virtual LPSTR STDMETHODCALLTYPE
  81. GetClientUserName(
  82. IN PCHAR pszClientUserName,
  83. IN PDWORD pcbSize
  84. ) = 0;
  85. virtual LPSTR STDMETHODCALLTYPE
  86. GetServerAddress(
  87. IN PCHAR pszServerIPAddress,
  88. IN PDWORD pcbSize
  89. ) = 0;
  90. virtual LPSTR STDMETHODCALLTYPE
  91. GetOperation(
  92. IN PCHAR pszOperation,
  93. IN PDWORD pcbSize
  94. ) = 0;
  95. virtual LPSTR STDMETHODCALLTYPE
  96. GetTarget(
  97. IN PCHAR pszTarget,
  98. IN PDWORD pcbSize
  99. ) = 0;
  100. virtual LPSTR STDMETHODCALLTYPE
  101. GetParameters(
  102. IN PCHAR pszParameters,
  103. IN PDWORD pcbSize
  104. ) = 0;
  105. virtual LPSTR STDMETHODCALLTYPE
  106. GetExtraHTTPHeaders(
  107. IN PCHAR pszHTTPHeaders,
  108. IN PDWORD pcbSize
  109. ) = 0;
  110. virtual DWORD STDMETHODCALLTYPE
  111. GetTimeForProcessing(
  112. VOID
  113. ) = 0;
  114. virtual DWORD STDMETHODCALLTYPE
  115. GetBytesSent(
  116. VOID
  117. ) = 0;
  118. virtual DWORD STDMETHODCALLTYPE
  119. GetBytesRecvd(
  120. VOID
  121. ) = 0;
  122. virtual DWORD STDMETHODCALLTYPE
  123. GetWin32Status(
  124. VOID
  125. ) = 0;
  126. virtual DWORD STDMETHODCALLTYPE
  127. GetProtocolStatus(
  128. VOID
  129. ) = 0;
  130. virtual DWORD STDMETHODCALLTYPE
  131. GetPortNumber(
  132. VOID
  133. ) = 0;
  134. virtual LPSTR STDMETHODCALLTYPE
  135. GetVersionString(
  136. IN PCHAR pszVersionString,
  137. IN PDWORD pcbSize
  138. ) = 0;
  139. };
  140. //
  141. // Log Plugin Interface implemented by logging plugins and called by IIS.
  142. //
  143. class ILogPlugin : public IUnknown
  144. {
  145. public:
  146. virtual HRESULT STDMETHODCALLTYPE
  147. InitializeLog(
  148. IN LPCSTR SiteName,
  149. IN LPCSTR MetabasePath,
  150. IN PCHAR pvIMDCOM ) = 0;
  151. virtual HRESULT STDMETHODCALLTYPE
  152. TerminateLog( VOID ) = 0;
  153. virtual HRESULT STDMETHODCALLTYPE
  154. LogInformation( IInetLogInformation *pLogObj ) = 0;
  155. virtual HRESULT STDMETHODCALLTYPE
  156. SetConfig( IN DWORD cbSize, PBYTE Log ) = 0;
  157. virtual HRESULT STDMETHODCALLTYPE
  158. GetConfig( IN DWORD cbSize, PBYTE Log ) = 0;
  159. virtual HRESULT STDMETHODCALLTYPE
  160. QueryExtraLoggingFields(PDWORD cbSize, PCHAR szParameters) = 0;
  161. };
  162. //
  163. // Log plugin UI Interface used by Admin
  164. //
  165. class ILogUIPlugin : public IUnknown
  166. {
  167. public:
  168. virtual HRESULT STDMETHODCALLTYPE
  169. OnProperties( IN OLECHAR* pocMachineName, IN OLECHAR* pocMetabasePath ) = 0;
  170. };
  171. //
  172. // Extended Log Plugin Interface implemented by logging plugins and called by
  173. // IIS to support advanced/generic logging.
  174. //
  175. #ifndef _LOGTYPE_H_
  176. typedef struct _CUSTOM_LOG_DATA
  177. {
  178. LPCSTR szPropertyPath;
  179. PVOID pData;
  180. } CUSTOM_LOG_DATA, *PCUSTOM_LOG_DATA;
  181. #endif
  182. class ILogPluginEx : public ILogPlugin
  183. {
  184. public:
  185. virtual HRESULT STDMETHODCALLTYPE
  186. LogCustomInformation(
  187. IN DWORD cCount,
  188. IN PCUSTOM_LOG_DATA pCustomLogData,
  189. IN LPSTR szHeaderSuffix
  190. ) = 0;
  191. };
  192. # endif // _ILOGOBJ_HXX_