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.

86 lines
2.6 KiB

  1. /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright(C) 2000 Microsoft Corporation all rights reserved.
  4. //
  5. // Module: RADIUSAttributeValues.H
  6. //
  7. // Project: Windows 2000 IAS
  8. //
  9. // Description:
  10. // Declaration of the RADIUSAttributeValues class
  11. //
  12. // Author: tperraut
  13. //
  14. // Revision 03/15/2000 created
  15. //
  16. /////////////////////////////////////////////////////////////////////////////
  17. #ifndef _RADIUSATTRIBUTEVALUES_H_2D58B146_3341_453e_A1F2_A4E6443EA64A
  18. #define _RADIUSATTRIBUTEVALUES_H_2D58B146_3341_453e_A1F2_A4E6443EA64A
  19. #if _MSC_VER > 1000
  20. #pragma once
  21. #endif // _MSC_VER > 1000
  22. #include "nocopy.h"
  23. #include "basetable.h"
  24. //////////////////////////////////////////////////////////////////////////////
  25. // class CRADIUSAttributeValuesAcc
  26. //////////////////////////////////////////////////////////////////////////////
  27. class CRADIUSAttributeValuesAcc
  28. {
  29. protected:
  30. static const size_t COLUMN_SIZE = 65;
  31. LONG m_AttributeValueNumber;
  32. WCHAR m_Attribute[COLUMN_SIZE];
  33. WCHAR m_AttributeValueName[COLUMN_SIZE];
  34. BEGIN_COLUMN_MAP(CRADIUSAttributeValuesAcc)
  35. COLUMN_ENTRY(1, m_Attribute)
  36. COLUMN_ENTRY(2, m_AttributeValueName)
  37. COLUMN_ENTRY(3, m_AttributeValueNumber)
  38. END_COLUMN_MAP()
  39. WCHAR m_AttributeParam[COLUMN_SIZE];
  40. WCHAR m_AttributeValueNameParam[COLUMN_SIZE];
  41. BEGIN_PARAM_MAP(CRADIUSAttributeValuesAcc )
  42. COLUMN_ENTRY(1, m_AttributeParam)
  43. COLUMN_ENTRY(2, m_AttributeValueNameParam)
  44. END_PARAM_MAP()
  45. DEFINE_COMMAND(CRADIUSAttributeValuesAcc , L" \
  46. SELECT \
  47. szAttribute, \
  48. `szAttribute Value Name`, \
  49. `lAttribute Value Number` \
  50. FROM `RADIUS Attribute Values` \
  51. WHERE ( (`szAttribute` = ?) AND \
  52. (`szAttribute Value Name` = ?) )")
  53. };
  54. //////////////////////////////////////////////////////////////////////////////
  55. // class CRADIUSAttributeValues
  56. //////////////////////////////////////////////////////////////////////////////
  57. class CRADIUSAttributeValues
  58. : public CBaseCommand<CAccessor<CRADIUSAttributeValuesAcc> >,
  59. private NonCopyable
  60. {
  61. public:
  62. explicit CRADIUSAttributeValues(CSession& Session)
  63. {
  64. Init(Session);
  65. }
  66. //////////////////////////////////////////////////////////////////////////
  67. // GetAttributeNumber
  68. //////////////////////////////////////////////////////////////////////////
  69. LONG GetAttributeNumber(
  70. const _bstr_t& AttributeName,
  71. const _bstr_t& AttributeValueName
  72. );
  73. };
  74. #endif // _RADIUSATTRIBUTEVALUES_H_2D58B146_3341_453e_A1F2_A4E6443EA64A