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.

86 lines
1.7 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation
  3. Module Name:
  4. hwprof.h
  5. Abstract:
  6. header file for hwprof.cpp
  7. Author:
  8. William Hsieh (williamh) created
  9. Revision History:
  10. --*/
  11. class CHwProfile;
  12. class CHwProfileList;
  13. class CHwProfileList
  14. {
  15. public:
  16. CHwProfileList() : m_pDevice(NULL), m_CurHwProfile(0), m_CurHwProfileIndex(0) {}
  17. ~CHwProfileList();
  18. BOOL Create(CDevice* pDevice, DWORD ConfigFlags = 0);
  19. BOOL GetFirst(CHwProfile** pphwpf, PVOID& Context);
  20. BOOL GetNext(CHwProfile** pphwpf, PVOID& Context);
  21. BOOL GetCurrentHwProfile(CHwProfile** pphwpf);
  22. int GetCount()
  23. {
  24. return m_listProfile.GetCount();
  25. }
  26. private:
  27. CList<CHwProfile*,CHwProfile* > m_listProfile;
  28. CDevice* m_pDevice;
  29. ULONG m_CurHwProfile;
  30. int m_CurHwProfileIndex;
  31. };
  32. class CHwProfile
  33. {
  34. public:
  35. CHwProfile(int Index, PHWPROFILEINFO phwpfInfo, CDevice* pDevice, DWORD hwpfFlags);
  36. ULONG GetHwProfile()
  37. {
  38. return m_hwpfInfo.HWPI_ulHWProfile;
  39. }
  40. void SetEnablePending()
  41. {
  42. m_EnablePending = TRUE;
  43. }
  44. void ResetEnablePending()
  45. {
  46. m_EnablePending = FALSE;
  47. }
  48. void SetDisablePending()
  49. {
  50. m_DisablePending = TRUE;
  51. }
  52. void ResetDisablePending()
  53. {
  54. m_DisablePending = FALSE;
  55. }
  56. BOOL IsEnablePending()
  57. {
  58. return m_EnablePending;
  59. }
  60. BOOL IsDisablePending()
  61. {
  62. return m_DisablePending;
  63. }
  64. private:
  65. DWORD m_Index;
  66. HWPROFILEINFO m_hwpfInfo;
  67. DWORD m_Flags;
  68. CDevice* m_pDevice;
  69. BOOL m_EnablePending;
  70. BOOL m_DisablePending;
  71. };