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.

123 lines
3.7 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 2000 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: Attributes.H
  6. //
  7. // Project: Windows 2000 IAS
  8. //
  9. // Description:
  10. // Declaration of the CAttributes class (for ias.mdb)
  11. //
  12. // Author: tperraut
  13. //
  14. // Revision 03/15/2000 created
  15. //
  16. /////////////////////////////////////////////////////////////////////////////
  17. #ifndef _ATTRIBUTES_H_359EA54D_FA43_49C6_90CB_16EF58079642
  18. #define _ATTRIBUTES_H_359EA54D_FA43_49C6_90CB_16EF58079642
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif // _MSC_VER > 1000
  22. #include "nocopy.h"
  23. #include "basecommand.h"
  24. //////////////////////////////////////////////////////////////////////////////
  25. // class CAttributesAcc
  26. //////////////////////////////////////////////////////////////////////////////
  27. class CAttributesAcc
  28. {
  29. protected:
  30. static const size_t DESCRIPTION_SIZE = 245;
  31. static const size_t LDAP_NAME_SIZE = 55;
  32. static const size_t NAME_SIZE = 69;
  33. WCHAR m_Description[DESCRIPTION_SIZE];
  34. VARIANT_BOOL m_ExcludefromNT4IASLog;
  35. LONG m_ID;
  36. VARIANT_BOOL m_IsAllowedInCondition;
  37. VARIANT_BOOL m_IsAllowedInProfile;
  38. VARIANT_BOOL m_IsAllowedInProxyCondition;
  39. VARIANT_BOOL m_IsAllowedInProxyProfile;
  40. WCHAR m_LDAPName[LDAP_NAME_SIZE];
  41. VARIANT_BOOL m_MultiValued;
  42. WCHAR m_Name[NAME_SIZE];
  43. LONG m_ODBCLogOrdinal;
  44. LONG m_Syntax;
  45. LONG m_VendorID;
  46. LONG m_VendorLengthWidth;
  47. LONG m_VendorTypeID;
  48. LONG m_VendorTypeWidth;
  49. BEGIN_COLUMN_MAP(CAttributesAcc)
  50. COLUMN_ENTRY(1, m_ID)
  51. COLUMN_ENTRY(2, m_Name)
  52. COLUMN_ENTRY(3, m_Syntax)
  53. COLUMN_ENTRY_TYPE(4, DBTYPE_BOOL, m_MultiValued)
  54. COLUMN_ENTRY(5, m_VendorID)
  55. COLUMN_ENTRY(6, m_VendorTypeID)
  56. COLUMN_ENTRY(7, m_VendorTypeWidth)
  57. COLUMN_ENTRY(8, m_VendorLengthWidth)
  58. COLUMN_ENTRY_TYPE(9, DBTYPE_BOOL, m_ExcludefromNT4IASLog)
  59. COLUMN_ENTRY(10, m_ODBCLogOrdinal)
  60. COLUMN_ENTRY_TYPE(11, DBTYPE_BOOL, m_IsAllowedInProfile)
  61. COLUMN_ENTRY_TYPE(12, DBTYPE_BOOL, m_IsAllowedInCondition)
  62. COLUMN_ENTRY_TYPE(13, DBTYPE_BOOL, m_IsAllowedInProxyProfile)
  63. COLUMN_ENTRY_TYPE(14, DBTYPE_BOOL, m_IsAllowedInProxyCondition)
  64. COLUMN_ENTRY(15, m_Description)
  65. COLUMN_ENTRY(16, m_LDAPName)
  66. END_COLUMN_MAP()
  67. LONG m_IDParam;
  68. BEGIN_PARAM_MAP(CAttributesAcc)
  69. COLUMN_ENTRY(1, m_IDParam)
  70. END_PARAM_MAP()
  71. DEFINE_COMMAND(CAttributesAcc, L" \
  72. SELECT \
  73. ID, \
  74. Name, \
  75. Syntax, \
  76. MultiValued, \
  77. VendorID, \
  78. VendorTypeID, \
  79. VendorTypeWidth, \
  80. VendorLengthWidth, \
  81. `Exclude from NT4 IAS Log`, \
  82. `ODBC Log Ordinal`, \
  83. IsAllowedInProfile, \
  84. IsAllowedInCondition, \
  85. IsAllowedInProxyProfile, \
  86. IsAllowedInProxyCondition, \
  87. Description, \
  88. LDAPName \
  89. FROM Attributes \
  90. WHERE ID = ?")
  91. };
  92. //////////////////////////////////////////////////////////////////////////////
  93. // class CAttributes
  94. //////////////////////////////////////////////////////////////////////////////
  95. class CAttributes : public CBaseCommand<CAccessor<CAttributesAcc> >,
  96. private NonCopyable
  97. {
  98. public:
  99. CAttributes(CSession& Session);
  100. //////////////////////////////////////////////////////////////////////////
  101. // GetAttribute
  102. //////////////////////////////////////////////////////////////////////////
  103. HRESULT GetAttribute(
  104. LONG ID,
  105. _bstr_t& LDAPName,
  106. LONG& Syntax,
  107. BOOL& IsMultiValued
  108. );
  109. };
  110. #endif // _ATTRIBUTES_H_359EA54D_FA43_49C6_90CB_16EF58079642