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.

109 lines
2.5 KiB

  1. /*++
  2. Copyright (c) 1995-1996 Microsoft Corporation
  3. Module Name :
  4. context.hxx
  5. Abstract:
  6. Header file for the context object.
  7. Author:
  8. Terence Kwan ( terryk ) 18-Sep-1996
  9. Project:
  10. IIS Logging 3.0
  11. --*/
  12. #ifndef _CONTEXT_HXX_
  13. #define _CONTEXT_HXX_
  14. typedef struct _PLUGIN_NODE {
  15. LIST_ENTRY ListEntry;
  16. bool fSupportsExtendedInterface;
  17. ILogPluginEx *pComponent;
  18. } PLUGIN_NODE, *PPLUGIN_NODE;
  19. class COMLOG_CONTEXT {
  20. public:
  21. //
  22. // list head for plugins
  23. //
  24. LIST_ENTRY m_pluginList;
  25. //
  26. // list entry for global context list
  27. //
  28. LIST_ENTRY m_ContextListEntry;
  29. //
  30. // list entry for external users (IInetLogPublic)
  31. //
  32. LIST_ENTRY m_PublicListEntry;
  33. STR m_strInstanceName;
  34. STR m_strComputerName;
  35. STR m_strMetabasePath;
  36. LPVOID m_pvIMDCOM;
  37. BOOL m_fDefault;
  38. public:
  39. COMLOG_CONTEXT(
  40. IN LPCSTR pszInstanceName,
  41. IN LPCSTR lpszMetabasePath,
  42. IN LPVOID pvIMDCOM
  43. );
  44. ~COMLOG_CONTEXT(VOID);
  45. VOID LoadPluginModules(VOID);
  46. VOID ReleasePluginModules(VOID);
  47. VOID LogInformation(INETLOG_INFORMATION *pLogInfo);
  48. VOID LogInformation(IInetLogInformation *pLogObj);
  49. VOID NotifyChange(VOID);
  50. VOID GetConfig(INETLOG_CONFIGURATIONA *pConfigInfo);
  51. VOID SetConfig(INETLOG_CONFIGURATIONA *pConfigInfo);
  52. VOID InitializeLog(
  53. LPCSTR pszInstanceName,
  54. LPCSTR pszMetabasePath,
  55. LPVOID pvIMDCOM
  56. );
  57. VOID TerminateLog();
  58. VOID QueryExtraLogFields(PDWORD pcSize, PCHAR buf );
  59. VOID LogCustomInformation(
  60. IN DWORD cCount,
  61. IN PCUSTOM_LOG_DATA pCustomLogData,
  62. IN LPSTR szHeaderSuffix
  63. );
  64. private:
  65. VOID LockShared() { m_tslock.Lock(TSRES_LOCK_READ); }
  66. VOID LockExclusive() { m_tslock.Lock(TSRES_LOCK_WRITE); }
  67. VOID Unlock() { m_tslock.Unlock(); }
  68. TS_RESOURCE m_tslock;
  69. public:
  70. static CRITICAL_SECTION sm_listLock;
  71. static LIST_ENTRY sm_ContextListHead;
  72. };
  73. #endif // _CONTEXT_HXX_