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.

95 lines
1.9 KiB

  1. /*++
  2. Copyright (c) 1994-95 Microsoft Corporation
  3. Module Name:
  4. usrobj.h
  5. Abstract:
  6. User object implementation.
  7. Author:
  8. Don Ryan (donryan) 04-Jan-1995
  9. Environment:
  10. User Mode - Win32
  11. Revision History:
  12. --*/
  13. #ifndef _USROBJ_H_
  14. #define _USROBJ_H_
  15. class CUser : public CCmdTarget
  16. {
  17. DECLARE_DYNCREATE(CUser)
  18. private:
  19. CCmdTarget* m_pParent;
  20. CObArray m_statisticArray;
  21. BOOL m_bStatisticsRefreshed;
  22. public:
  23. CString m_strName;
  24. CString m_strMapping;
  25. CString m_strProducts; // blah...
  26. BOOL m_bIsMapped;
  27. BOOL m_bIsBackOffice; // blah...
  28. BOOL m_bIsValid;
  29. long m_lInUse;
  30. long m_lUnlicensed;
  31. CStatistics* m_pStatistics;
  32. public:
  33. CUser(
  34. CCmdTarget* pParent = NULL,
  35. LPCTSTR pName = NULL,
  36. DWORD dwFlags = 0L,
  37. long lInUse = 0L,
  38. long lUnlicensed = 0L,
  39. LPCTSTR pMapping = NULL,
  40. LPCTSTR pProducts = NULL
  41. );
  42. virtual ~CUser();
  43. BOOL Refresh();
  44. BOOL RefreshStatistics();
  45. void ResetStatistics();
  46. BSTR GetFullName();
  47. //{{AFX_VIRTUAL(CUser)
  48. public:
  49. virtual void OnFinalRelease();
  50. //}}AFX_VIRTUAL
  51. //{{AFX_DISPATCH(CUser)
  52. afx_msg LPDISPATCH GetApplication();
  53. afx_msg long GetInUse();
  54. afx_msg BSTR GetName();
  55. afx_msg LPDISPATCH GetParent();
  56. afx_msg BSTR GetMapping();
  57. afx_msg BOOL IsMapped();
  58. afx_msg long GetUnlicensed();
  59. afx_msg LPDISPATCH GetStatistics(const VARIANT FAR& index);
  60. //}}AFX_DISPATCH
  61. DECLARE_DISPATCH_MAP()
  62. protected:
  63. //{{AFX_MSG(CUser)
  64. // NOTE - the ClassWizard will add and remove member functions here.
  65. //}}AFX_MSG
  66. DECLARE_MESSAGE_MAP()
  67. };
  68. #define IsUserInViolation(usr) (!(usr)->m_bIsValid)
  69. #define CalcUserBitmap(usr) (IsUserInViolation(usr) ? BMPI_VIOLATION : BMPI_USER)
  70. #endif // _USROBJ_H_