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.

105 lines
3.1 KiB

  1. /*++
  2. Copyright (c) 2002 Microsoft Corporation
  3. Module Name :
  4. restrlst.hxx
  5. Abstract:
  6. Classes that are used to modify the restriction list and application
  7. dependency list in the metabase
  8. Author:
  9. Christopher Achille (cachille)
  10. Project:
  11. Internet Services Setup
  12. Revision History:
  13. April 2002: Created
  14. --*/
  15. #include "iadm.h"
  16. #include "iiscnfgp.h"
  17. #include "mdkey.h"
  18. #include "mdentry.h"
  19. class CApplicationDependencies
  20. {
  21. private:
  22. TSTR_MSZ m_mstrDependencies;
  23. BOOL m_bMetabaseOpened;
  24. CMDKey m_Metabase;
  25. BOOL RemoveOldAppDendency( LPTSTR szNewLine );
  26. BOOL DoesApplicationExist( LPTSTR szApplicationName );
  27. LPTSTR FindApplication( LPTSTR szApplicationName );
  28. BOOL AddApplication( LPTSTR szApplication, LPTSTR szDependencies, BOOL bReplaceExisting );
  29. public:
  30. CApplicationDependencies();
  31. BOOL InitMetabase();
  32. BOOL LoadCurrentSettings();
  33. BOOL SaveSettings();
  34. BOOL AddDefaults();
  35. BOOL AddUnattendSettings();
  36. BOOL DoUnattendSettingsExist();
  37. };
  38. class CRestrictionList {
  39. private:
  40. TSTR_MSZ m_mstrRestrictionList;
  41. BOOL m_bMetabaseOpened;
  42. CMDKey m_Metabase;
  43. BOOL LoadMSZFromMetabase( TSTR_MSZ *pmszProperty,
  44. DWORD dwPropertyID,
  45. LPWSTR szMBPath = L"" );
  46. BOOL ImportOldList( TSTR_MSZ &mstrOldStyleRestrictionList,
  47. BOOL bCgiList);
  48. BOOL AddItem( LPTSTR szPhysicalPath,
  49. LPTSTR szGroupId,
  50. LPTSTR szDescription,
  51. BOOL bAllow,
  52. BOOL bDeleteable,
  53. BOOL bReplaceExisting);
  54. BOOL AddItem( LPTSTR szInfo,
  55. BOOL bReplaceExisting);
  56. BOOL RetrieveDefaultsifKnow( LPTSTR szPhysicalPath,
  57. LPTSTR *szGroupId,
  58. TSTR *pstrDescription,
  59. LPBOOL bDeleteable );
  60. LPTSTR FindItemByGroup( LPTSTR szGroupId );
  61. LPTSTR FindItemByPhysicalPath( LPTSTR szPhysicalPath );
  62. static
  63. BOOL LoadMSZFromMultiLineSz( TSTR_MSZ *pmszProperty,
  64. LPTSTR szSource );
  65. static
  66. BOOL LoadMSZFromPhysicalMetabase( TSTR_MSZ *pmszProperty,
  67. LPCTSTR szPropertyName );
  68. public:
  69. CRestrictionList();
  70. BOOL IsEmpty();
  71. BOOL InitMetabase();
  72. BOOL LoadCurrentSettings();
  73. static BOOL LoadOldFormatSettings( TSTR_MSZ *pmstrCgiRestList, TSTR_MSZ *pmstrIsapiRestList );
  74. BOOL ImportOldLists( TSTR_MSZ &mstrCgiRestList, TSTR_MSZ &mstrIsapiRestList );
  75. BOOL AddUnattendSettings();
  76. BOOL AddDefaults( BOOL bAllOthersDefault );
  77. BOOL SaveSettings();
  78. BOOL UpdateItem(LPTSTR szPhysicalPath,
  79. LPTSTR szGroupId,
  80. LPTSTR szDescription,
  81. BOOL bAllow,
  82. BOOL bDeleteable );
  83. BOOL IsEnabled( LPTSTR szGroupId,
  84. LPBOOL pbIsEnabled );
  85. };