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
3.6 KiB

  1. //////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 2000 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: ProfileAttributeList.H
  6. //
  7. // Project: Windows 2000 IAS
  8. //
  9. // Description:
  10. // Declaration of the CProfileAttributeList class
  11. //
  12. // Author: tperraut
  13. //
  14. // Revision 03/15/2000 created
  15. //
  16. //////////////////////////////////////////////////////////////////////////////
  17. #ifndef _PROFILEATTRIBUTELIST_H_C86D2421_6523_4000_A523_5D3CC7585A18
  18. #define _PROFILEATTRIBUTELIST_H_C86D2421_6523_4000_A523_5D3CC7585A18
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif // _MSC_VER > 1000
  22. #include "nocopy.h"
  23. #include "basecommand.h"
  24. class CRADIUSAttributes;
  25. //////////////////////////////////////////////////////////////////////////////
  26. // class CProfileAttributeListSelectAcc
  27. //////////////////////////////////////////////////////////////////////////////
  28. class CProfileAttributeListSelectAcc
  29. {
  30. protected:
  31. static const size_t COLUMN_SIZE = 65;
  32. static const size_t STRING_SIZE = 256;
  33. LONG m_Order;
  34. WCHAR m_Attribute[COLUMN_SIZE];
  35. WCHAR m_AttributeValueName[COLUMN_SIZE];
  36. WCHAR m_Profile[COLUMN_SIZE];
  37. WCHAR m_StringValue[STRING_SIZE];
  38. BEGIN_COLUMN_MAP(CProfileAttributeListSelectAcc)
  39. COLUMN_ENTRY(1, m_Profile)
  40. COLUMN_ENTRY(2, m_Attribute)
  41. COLUMN_ENTRY(3, m_AttributeValueName)
  42. COLUMN_ENTRY(4, m_StringValue)
  43. COLUMN_ENTRY(5, m_Order)
  44. END_COLUMN_MAP()
  45. WCHAR m_ProfileParam[COLUMN_SIZE];
  46. BEGIN_PARAM_MAP(CProfileAttributeListSelectAcc)
  47. COLUMN_ENTRY(1, m_ProfileParam)
  48. END_PARAM_MAP()
  49. DEFINE_COMMAND(CProfileAttributeListSelectAcc, L" \
  50. SELECT \
  51. szProfile, \
  52. szAttribute, \
  53. `szAttribute Value Name`, \
  54. `szString Value`, \
  55. dwOrder \
  56. FROM `Profile Attribute List` \
  57. WHERE szProfile = ? \
  58. ORDER BY dwOrder")
  59. };
  60. //////////////////////////////////////////////////////////////////////////////
  61. // class CProfileAttributeList
  62. //////////////////////////////////////////////////////////////////////////////
  63. class CProfileAttributeList
  64. : public CBaseCommand<CAccessor<CProfileAttributeListSelectAcc> >,
  65. private NonCopyable
  66. {
  67. public:
  68. explicit CProfileAttributeList(CSession& Session);
  69. //////////////////////////////////////////////////////////////////////////
  70. // GetAttribute
  71. //////////////////////////////////////////////////////////////////////////
  72. HRESULT GetAttribute(
  73. const _bstr_t& ProfileName,
  74. _bstr_t& Attribute,
  75. LONG& AttributeNumber,
  76. _bstr_t& AttributeValueName,
  77. _bstr_t& StringValue,
  78. LONG& Order
  79. );
  80. //////////////////////////////////////////////////////////////////////////
  81. // GetAttribute overloaded
  82. //////////////////////////////////////////////////////////////////////////
  83. HRESULT GetAttribute(
  84. const _bstr_t ProfileName,
  85. _bstr_t& Attribute,
  86. LONG& AttributeNumber,
  87. _bstr_t& AttributeValueName,
  88. _bstr_t& StringValue,
  89. LONG& Order,
  90. LONG Index
  91. );
  92. private:
  93. CSession m_Session;
  94. };
  95. #endif // _PROFILEATTRIBUTELIST_H_C86D2421_6523_4000_A523_5D3CC7585A18