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.

111 lines
4.3 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 2000 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: ServiceConfiguration.H
  6. //
  7. // Project: Windows 2000 IAS
  8. //
  9. // Description: Declaration of the CServiceConfiguration class
  10. //
  11. // Author: tperraut
  12. //
  13. // Revision 03/21/2000 created
  14. //
  15. /////////////////////////////////////////////////////////////////////////////
  16. #ifndef SERVICE_CONFIGURATION_H_3124D940_2304_4d32_B742_C9829FFB754D
  17. #define SERVICE_CONFIGURATION_H_3124D940_2304_4d32_B742_C9829FFB754D
  18. #if _MSC_VER > 1000
  19. #pragma once
  20. #endif // _MSC_VER > 1000
  21. #include "nocopy.h"
  22. #include "basetable.h"
  23. //////////////////////////////////////////////////////////////////////////////
  24. // class CServiceConfigurationAcc
  25. //////////////////////////////////////////////////////////////////////////////
  26. class CServiceConfigurationAcc
  27. {
  28. protected:
  29. static const size_t FIFTY_ONE_LENGTH = 51;
  30. static const size_t SIXTY_FIVE_LENGTH = 65;
  31. static const size_t NAME_LENGTH = 256;
  32. static const size_t VERSION_LENGTH = 16;
  33. VARIANT_BOOL m_AutomaticallyOpenNewLog;
  34. VARIANT_BOOL m_DefaultUserValidation;
  35. VARIANT_BOOL m_LoggingOn;
  36. VARIANT_BOOL m_NewLogBySize;
  37. VARIANT_BOOL m_NewLogDaily;
  38. VARIANT_BOOL m_NewLogMonthly;
  39. VARIANT_BOOL m_NewLogWeekly;
  40. VARIANT_BOOL m_NoDefaultUserValidation;
  41. VARIANT_BOOL m_TraceAccounting;
  42. VARIANT_BOOL m_TraceAuthentication;
  43. VARIANT_BOOL m_TraceInvalid;
  44. LONG m_AccountingPort;
  45. LONG m_AuthenticationPort;
  46. LONG m_MaxLogSize;
  47. LONG m_ServerThreads;
  48. WCHAR m_LogFileDirectory[FIFTY_ONE_LENGTH];
  49. WCHAR m_LogFilename[NAME_LENGTH];
  50. WCHAR m_LogFormat[SIXTY_FIVE_LENGTH];
  51. // Realm: No referential integrity enforced. Used when users are validated
  52. // locally.
  53. WCHAR m_Realm[FIFTY_ONE_LENGTH];
  54. WCHAR m_SystemName[SIXTY_FIVE_LENGTH];
  55. WCHAR m_Version[VERSION_LENGTH];
  56. BEGIN_COLUMN_MAP(CServiceConfigurationAcc)
  57. COLUMN_ENTRY(1, m_SystemName)
  58. COLUMN_ENTRY(2, m_AuthenticationPort)
  59. COLUMN_ENTRY(3, m_AccountingPort)
  60. COLUMN_ENTRY(4, m_ServerThreads)
  61. COLUMN_ENTRY_TYPE(5, DBTYPE_BOOL, m_TraceInvalid)
  62. COLUMN_ENTRY_TYPE(6, DBTYPE_BOOL, m_TraceAuthentication)
  63. COLUMN_ENTRY_TYPE(7, DBTYPE_BOOL, m_TraceAccounting)
  64. COLUMN_ENTRY_TYPE(8, DBTYPE_BOOL, m_NoDefaultUserValidation)
  65. COLUMN_ENTRY_TYPE(9, DBTYPE_BOOL, m_DefaultUserValidation)
  66. COLUMN_ENTRY(10, m_Realm)
  67. COLUMN_ENTRY_TYPE(11, DBTYPE_BOOL, m_LoggingOn)
  68. COLUMN_ENTRY(12, m_LogFormat)
  69. COLUMN_ENTRY_TYPE(13, DBTYPE_BOOL, m_AutomaticallyOpenNewLog)
  70. COLUMN_ENTRY_TYPE(14, DBTYPE_BOOL, m_NewLogDaily)
  71. COLUMN_ENTRY_TYPE(15, DBTYPE_BOOL, m_NewLogWeekly)
  72. COLUMN_ENTRY_TYPE(16, DBTYPE_BOOL, m_NewLogMonthly)
  73. COLUMN_ENTRY_TYPE(17, DBTYPE_BOOL, m_NewLogBySize)
  74. COLUMN_ENTRY(18, m_MaxLogSize)
  75. COLUMN_ENTRY(19, m_LogFilename)
  76. COLUMN_ENTRY(20, m_LogFileDirectory)
  77. COLUMN_ENTRY(21, m_Version)
  78. END_COLUMN_MAP()
  79. };
  80. //////////////////////////////////////////////////////////////////////////////
  81. // class CServiceConfiguration
  82. //////////////////////////////////////////////////////////////////////////////
  83. class CServiceConfiguration :
  84. public CBaseTable<CAccessor<CServiceConfigurationAcc> >,
  85. private NonCopyable
  86. {
  87. public:
  88. CServiceConfiguration(CSession& Session);
  89. //////////////////////////////////////////////////////////////////////////
  90. // GetMaxLogSize
  91. //////////////////////////////////////////////////////////////////////////
  92. _bstr_t GetMaxLogSize() const;
  93. //////////////////////////////////////////////////////////////////////////
  94. // GetLogFrequency
  95. //////////////////////////////////////////////////////////////////////////
  96. _bstr_t GetLogFrequency() const;
  97. private:
  98. static const size_t SIZE_LONG_MAX = 14;
  99. };
  100. #endif // SERVICE_CONFIGURATION_H_3124D940_2304_4d32_B742_C9829FFB754D