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.

81 lines
1.7 KiB

  1. #ifndef DATA_H
  2. #define DATA_H
  3. // group info object, this holds the information about a group - name, comment etc
  4. class CGroupInfo
  5. {
  6. public:
  7. CGroupInfo()
  8. {
  9. m_szGroup[0] = m_szComment[0] = TEXT('\0');
  10. }
  11. TCHAR m_szGroup[MAX_GROUP + 1];
  12. TCHAR m_szComment[MAXCOMMENTSZ];
  13. };
  14. // object for managing a list of groups
  15. class CGroupInfoList: public CDPA<CGroupInfo>
  16. {
  17. public:
  18. CGroupInfoList();
  19. ~CGroupInfoList();
  20. HRESULT Initialize();
  21. private:
  22. static int CALLBACK DestroyGroupInfoCallback(CGroupInfo* pGroupInfo, LPVOID pData);
  23. HRESULT AddGroupToList(LPCTSTR szGroup, LPCTSTR szComment);
  24. };
  25. // user data manager
  26. class CUserManagerData
  27. {
  28. public:
  29. // Functions
  30. CUserManagerData(LPCTSTR pszCurrentDomainUser);
  31. ~CUserManagerData();
  32. HRESULT Initialize(HWND hwndUserListPage);
  33. BOOL IsComputerInDomain()
  34. {return m_fInDomain;}
  35. CUserListLoader* GetUserListLoader()
  36. {return &m_UserListLoader;}
  37. CGroupInfoList* GetGroupList()
  38. {return &m_GroupList;}
  39. CUserInfo* GetLoggedOnUserInfo()
  40. {return &m_LoggedOnUser;}
  41. TCHAR* GetComputerName()
  42. {return m_szComputername;}
  43. BOOL IsAutologonEnabled();
  44. TCHAR* GetHelpfilePath();
  45. void UserInfoChanged(LPCTSTR pszUser, LPCTSTR pszDomain);
  46. BOOL LogoffRequired();
  47. private:
  48. // Functions
  49. void SetComputerDomainFlag();
  50. private:
  51. // Data
  52. // List of users read from the local security DB
  53. CUserInfo m_LoggedOnUser;
  54. CUserListLoader m_UserListLoader;
  55. CGroupInfoList m_GroupList;
  56. BOOL m_fInDomain;
  57. TCHAR m_szComputername[MAX_COMPUTERNAME + 1];
  58. TCHAR m_szHelpfilePath[MAX_PATH + 1];
  59. LPTSTR m_pszCurrentDomainUser;
  60. BOOL m_fLogoffRequired;
  61. };
  62. #endif //! DATA_H