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.

91 lines
2.9 KiB

  1. //
  2. // MODULE: APGTSCFG.H
  3. // Fully implements class CDBLoadConfiguration
  4. //
  5. // PURPOSE:
  6. // Brings together the persistent pieces ofthe online troubleshooter configuration:
  7. // - the Topic Shop
  8. // - the registry
  9. // - the pool threads
  10. // - the threads that maintain these.
  11. // - the CRecentUse object that tracks passwords
  12. // Provides functions to get latest values on registry variables and to acquire a
  13. // smart pointer to a CTopic based on its name.
  14. //
  15. // PROJECT: Generic Troubleshooter DLL for Microsoft AnswerPoint
  16. //
  17. // COMPANY: Saltmine Creative, Inc. (206)-284-7511 [email protected]
  18. //
  19. // AUTHOR: Roman Mach
  20. //
  21. // ORIGINAL DATE: 8-2-96
  22. //
  23. // NOTES:
  24. //
  25. // Version Date By Comments
  26. //--------------------------------------------------------------------
  27. // V3.0 9/21/98 JM this file abstracted from apgtscls.h
  28. //
  29. #ifndef _H_APGTSCFG
  30. #define _H_APGTSCFG
  31. #include "pointer.h"
  32. #include "RegistryMonitor.h"
  33. #include "ThreadPool.h"
  34. #include "RecentUse.h"
  35. //
  36. // Provides in-memory access to registry values & full content of the resource directory
  37. // Basically, on initialization, this sucks EVERYTHING in.
  38. class CDBLoadConfiguration
  39. {
  40. public:
  41. CDBLoadConfiguration( HMODULE hModule,
  42. CThreadPool * pThreadPool,
  43. const CString& strTopicName,
  44. CHTMLLog *pLog);
  45. ~CDBLoadConfiguration();
  46. // registry functions
  47. CString GetFullResource();
  48. CString GetVrootPath();
  49. DWORD GetMaxWQItems();
  50. DWORD GetCookieLife();
  51. DWORD GetReloadDelay();
  52. CString GetLogDir();
  53. void GetListOfTopicNames(vector<CString>&arrstrTopic);
  54. CP_TOPIC & GetTopic(const CString & strTopic, CP_TOPIC & cpTopic, bool bNewCookie);
  55. CP_TEMPLATE & GetTemplate(const CString & strTemplate, CP_TEMPLATE & cpTemplate, bool bNewCookie);
  56. void AddTemplate( const CString & strTemplateName );
  57. bool RetTemplateInCatalogStatus( const CString& strTemplate, bool& bValid );
  58. void CreateErrorPage(const CString & strError, CString& out);
  59. protected:
  60. friend class APGTSContext;
  61. #ifdef LOCAL_TROUBLESHOOTER
  62. friend class CTSHOOTCtrl;
  63. #endif
  64. // for use by status pages functions of APGTSContext
  65. CTopicShop& GetTopicShop() {return m_TopicShop;}
  66. CRegistryMonitor& GetRegistryMonitor() {return m_RegistryMonitor;}
  67. CThreadPool& GetThreadPool() {return *m_pThreadPool;}
  68. CPoolQueue& GetPoolQueue() {return *m_pThreadPool->m_pPoolQueue;}
  69. CDirectoryMonitor& GetDirectoryMonitor() {return m_DirectoryMonitor;}
  70. CRecentUse& GetRecentPasswords() {return m_RecentPasswords;}
  71. protected:
  72. CTopicShop m_TopicShop; // The collection of available topics.
  73. CThreadPool * m_pThreadPool;
  74. CDirectoryMonitor m_DirectoryMonitor; // track changes to LST, DSC, HTI, BES files.
  75. CRegistryMonitor m_RegistryMonitor; // access to registry values.
  76. CRecentUse m_RecentPasswords;
  77. protected:
  78. DWORD GetMaxThreads();
  79. DWORD GetThreadsPP();
  80. bool HasDetailedEventLogging();
  81. };
  82. #endif // _H_APGTSCFG