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.

79 lines
1.3 KiB

  1. enum ATTR_KEY
  2. {
  3. ATI_FLAGS, // flags used internally, not exposed to caller
  4. ATI_USER_ENTERED_TEXT,
  5. ATI_PROCESSED_ADSPATH,
  6. ATI_LOCALIZED_NAME,
  7. ATI_DISPLAY_PATH,
  8. ATI_NAME,
  9. ATI_ADSPATH,
  10. ATI_OBJECT_CLASS,
  11. ATI_USER_PRINCIPAL_NAME,
  12. ATI_OBJECT_SID,
  13. ATI_GROUP_TYPE,
  14. ATI_USER_ACCT_CTRL
  15. // CAUTION: if you change this enum keep the define ATI_LAST up to date
  16. };
  17. #define ATI_LAST ATI_USER_ACCT_CTRL
  18. class CAttrInfo
  19. {
  20. public:
  21. CAttrInfo(
  22. const String &strAdsiName):
  23. m_strAdsiName(strAdsiName)
  24. {
  25. }
  26. CAttrInfo(
  27. const CAttrInfo &ToCopy)
  28. {
  29. operator =(ToCopy);
  30. }
  31. CAttrInfo()
  32. {
  33. }
  34. ~CAttrInfo()
  35. {
  36. }
  37. BOOL
  38. Empty()
  39. {
  40. return m_strAdsiName.empty();
  41. }
  42. CAttrInfo &
  43. operator =(const CAttrInfo &rhs)
  44. {
  45. if (&rhs != this)
  46. {
  47. m_strAdsiName = rhs.m_strAdsiName;
  48. }
  49. else
  50. {
  51. ASSERT(0 && "assigning this to itself");
  52. }
  53. return *this;
  54. }
  55. const String &
  56. GetAdsiName() const
  57. {
  58. return m_strAdsiName;
  59. }
  60. private:
  61. // the name of the attribute recognized by the ADSI provider
  62. String m_strAdsiName;
  63. };
  64. typedef map<ATTR_KEY, CAttrInfo> AttrInfoMap;
  65. typedef map<ATTR_KEY, Variant> AttrIndexValueMap;