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.

279 lines
7.6 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. // {FAE6E2A8-BF79-4ac6-AA58-71347C92D593}
  46. DEFINE_GUID(IID_LOGGINGUI2,
  47. 0xfae6e2a8, 0xbf79, 0x4ac6, 0xaa, 0x58, 0x71, 0x34, 0x7c, 0x92, 0xd5, 0x93);
  48. DEFINE_GUID(CLSID_NCSALOGUI, /* 31DCAB85-BB3E-11d0-9299-00C04FB6678B */
  49. 0x31dcab85, 0xbb3e, 0x11d0, 0x92, 0x99, 0x0, 0xc0, 0x4f, 0xb6, 0x67, 0x8b);
  50. DEFINE_GUID(CLSID_ODBCLOGUI, /* 31DCAB86-BB3E-11d0-9299-00C04FB6678B */
  51. 0x31dcab86, 0xbb3e, 0x11d0, 0x92, 0x99, 0x0, 0xc0, 0x4f, 0xb6, 0x67, 0x8b);
  52. DEFINE_GUID(CLSID_ASCLOGUI, /* 31DCAB87-BB3E-11d0-9299-00C04FB6678B */
  53. 0x31dcab87, 0xbb3e, 0x11d0, 0x92, 0x99, 0x0, 0xc0, 0x4f, 0xb6, 0x67, 0x8b);
  54. DEFINE_GUID(CLSID_EXTLOGUI, /* 31DCAB88-BB3E-11d0-9299-00C04FB6678B */
  55. 0x31dcab88, 0xbb3e, 0x11d0, 0x92, 0x99, 0x0, 0xc0, 0x4f, 0xb6, 0x67, 0x8b);
  56. //
  57. // Unused IDs
  58. //
  59. DEFINE_GUID(IID_ICLAPI_CLIENT, /* 08fd99d1-cfb6-11cf-bc03-00aa006111e0 */
  60. 0x08fd99d1,0xcfb6,0x11cf,0xbc, 0x03, 0x00, 0xaa, 0x00, 0x61, 0x11, 0xe0);
  61. DEFINE_GUID(CLSID_InetLogInformation, /* a1f89741-f619-11cf-bc0f-00aa006111e0 */
  62. 0xa1f89741, 0xf619, 0x11cf, 0xbc, 0xf, 0x0, 0xaa, 0x0, 0x61, 0x11, 0xe0);
  63. //
  64. // Logging Interface exposed by IIS
  65. //
  66. class IInetLogInformation : public IUnknown {
  67. public:
  68. virtual LPSTR STDMETHODCALLTYPE
  69. GetSiteName(
  70. IN PCHAR pszSiteName,
  71. IN PDWORD pcbSize
  72. ) = 0;
  73. virtual LPSTR STDMETHODCALLTYPE
  74. GetComputerName(
  75. IN PCHAR pszComputerName,
  76. IN PDWORD pcbSize
  77. ) = 0;
  78. virtual LPSTR STDMETHODCALLTYPE
  79. GetClientHostName(
  80. IN PCHAR pszClientHostName,
  81. IN PDWORD pcbSize
  82. ) = 0;
  83. virtual LPSTR STDMETHODCALLTYPE
  84. GetClientUserName(
  85. IN PCHAR pszClientUserName,
  86. IN PDWORD pcbSize
  87. ) = 0;
  88. virtual LPSTR STDMETHODCALLTYPE
  89. GetServerAddress(
  90. IN PCHAR pszServerIPAddress,
  91. IN PDWORD pcbSize
  92. ) = 0;
  93. virtual LPSTR STDMETHODCALLTYPE
  94. GetOperation(
  95. IN PCHAR pszOperation,
  96. IN PDWORD pcbSize
  97. ) = 0;
  98. virtual LPSTR STDMETHODCALLTYPE
  99. GetTarget(
  100. IN PCHAR pszTarget,
  101. IN PDWORD pcbSize
  102. ) = 0;
  103. virtual LPSTR STDMETHODCALLTYPE
  104. GetParameters(
  105. IN PCHAR pszParameters,
  106. IN PDWORD pcbSize
  107. ) = 0;
  108. virtual LPSTR STDMETHODCALLTYPE
  109. GetExtraHTTPHeaders(
  110. IN PCHAR pszHTTPHeaders,
  111. IN PDWORD pcbSize
  112. ) = 0;
  113. virtual DWORD STDMETHODCALLTYPE
  114. GetTimeForProcessing(
  115. VOID
  116. ) = 0;
  117. virtual DWORD STDMETHODCALLTYPE
  118. GetBytesSent(
  119. VOID
  120. ) = 0;
  121. virtual DWORD STDMETHODCALLTYPE
  122. GetBytesRecvd(
  123. VOID
  124. ) = 0;
  125. virtual DWORD STDMETHODCALLTYPE
  126. GetWin32Status(
  127. VOID
  128. ) = 0;
  129. virtual DWORD STDMETHODCALLTYPE
  130. GetProtocolStatus(
  131. VOID
  132. ) = 0;
  133. virtual DWORD STDMETHODCALLTYPE
  134. GetPortNumber(
  135. VOID
  136. ) = 0;
  137. virtual LPSTR STDMETHODCALLTYPE
  138. GetVersionString(
  139. IN PCHAR pszVersionString,
  140. IN PDWORD pcbSize
  141. ) = 0;
  142. };
  143. //
  144. // Log Plugin Interface implemented by logging plugins and called by IIS.
  145. //
  146. class ILogPlugin : public IUnknown
  147. {
  148. public:
  149. virtual HRESULT STDMETHODCALLTYPE
  150. InitializeLog(
  151. IN LPCSTR SiteName,
  152. IN LPCSTR MetabasePath,
  153. IN PCHAR pvIMDCOM ) = 0;
  154. virtual HRESULT STDMETHODCALLTYPE
  155. TerminateLog( VOID ) = 0;
  156. virtual HRESULT STDMETHODCALLTYPE
  157. LogInformation( IInetLogInformation *pLogObj ) = 0;
  158. virtual HRESULT STDMETHODCALLTYPE
  159. SetConfig( IN DWORD cbSize, PBYTE Log ) = 0;
  160. virtual HRESULT STDMETHODCALLTYPE
  161. GetConfig( IN DWORD cbSize, PBYTE Log ) = 0;
  162. virtual HRESULT STDMETHODCALLTYPE
  163. QueryExtraLoggingFields(PDWORD cbSize, PCHAR szParameters) = 0;
  164. };
  165. //
  166. // Log plugin UI Interface used by Admin
  167. //
  168. class ILogUIPlugin : public IUnknown
  169. {
  170. public:
  171. virtual HRESULT STDMETHODCALLTYPE
  172. OnProperties( IN OLECHAR* pocMachineName, IN OLECHAR* pocMetabasePath ) = 0;
  173. };
  174. class ILogUIPlugin2 : public ILogUIPlugin
  175. {
  176. public:
  177. virtual HRESULT STDMETHODCALLTYPE
  178. OnPropertiesEx(
  179. IN OLECHAR * pocMachineName,
  180. IN OLECHAR * pocMetabasePath,
  181. IN OLECHAR * pocUserName,
  182. IN OLECHAR * pocUserPassword) = 0;
  183. };
  184. //
  185. // Extended Log Plugin Interface implemented by logging plugins and called by
  186. // IIS to support advanced/generic logging.
  187. //
  188. #ifndef _LOGTYPE_H_
  189. typedef struct _CUSTOM_LOG_DATA
  190. {
  191. LPCSTR szPropertyPath;
  192. PVOID pData;
  193. } CUSTOM_LOG_DATA, *PCUSTOM_LOG_DATA;
  194. #endif
  195. class ILogPluginEx : public ILogPlugin
  196. {
  197. public:
  198. virtual HRESULT STDMETHODCALLTYPE
  199. LogCustomInformation(
  200. IN DWORD cCount,
  201. IN PCUSTOM_LOG_DATA pCustomLogData,
  202. IN LPSTR szHeaderSuffix
  203. ) = 0;
  204. };
  205. # endif // _ILOGOBJ_HXX_