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.

182 lines
2.9 KiB

  1. /*++
  2. Copyright (C) Microsoft Corporation, 1997 - 1997
  3. All rights reserved.
  4. Module Name:
  5. driverif.hxx
  6. Abstract:
  7. Driver Info Header
  8. Author:
  9. Steve Kiraly (SteveKi) 23-Jan-1997
  10. Revision History:
  11. --*/
  12. #ifndef _DRIVERIF_HXX
  13. #define _DRIVERIF_HXX
  14. /********************************************************************
  15. Driver Info Class
  16. ********************************************************************/
  17. class TDriverInfo {
  18. public:
  19. enum EType {
  20. kAdd,
  21. kRemove,
  22. kInstalled,
  23. kUpdate,
  24. kError,
  25. kRefresh,
  26. kRemoved,
  27. kUpdated,
  28. };
  29. enum {
  30. kDriverVersion0,
  31. kDriverVersion1,
  32. kDriverVersion2,
  33. kDriverVersion3,
  34. };
  35. TDriverInfo(
  36. IN EType eType = kError,
  37. IN UINT uLevel = 0,
  38. IN PVOID pInfo = NULL
  39. );
  40. TDriverInfo(
  41. const TDriverInfo &rhs
  42. );
  43. const TDriverInfo &
  44. operator=(
  45. const TDriverInfo &rhs
  46. );
  47. ~TDriverInfo(
  48. VOID
  49. );
  50. BOOL
  51. bValid(
  52. VOID
  53. ) const;
  54. VOID
  55. vSetInfoState(
  56. EType eType
  57. );
  58. EType
  59. vGetInfoState(
  60. VOID
  61. ) const;
  62. VOID
  63. vPrint(
  64. VOID
  65. ) const;
  66. INT
  67. operator==(
  68. const TDriverInfo &DriverInfo
  69. ) const;
  70. INT
  71. operator>(
  72. const TDriverInfo &DriverInfo
  73. ) const;
  74. DLINK( TDriverInfo, DriverInfo );
  75. VAR( TString, strVersion );
  76. VAR( TString, strName );
  77. VAR( TString, strEnvironment );
  78. VAR( TString, strDriverPath );
  79. VAR( TString, strDataFile );
  80. VAR( TString, strConfigFile );
  81. VAR( TString, strHelpFile );
  82. VAR( TString, strMonitorName );
  83. VAR( TString, strDefaultDataType );
  84. VAR( DWORD, dwVersion );
  85. VAR( TString, strEnv );
  86. VAR( TString, strInfName );
  87. LPCTSTR
  88. strDependentFiles(
  89. VOID
  90. );
  91. private:
  92. BOOL
  93. bVersionToString(
  94. IN DWORD dwVersion,
  95. IN OUT TString &strVersion
  96. ) const;
  97. BOOL
  98. bClone(
  99. IN const TDriverInfo &rhs
  100. );
  101. BOOL
  102. bEnvironmentToString(
  103. IN LPCTSTR pszEnvironment,
  104. IN OUT TString &strVersion
  105. ) const;
  106. UINT _uLevel;
  107. EType _eType;
  108. LPTSTR _pszDependentFiles;
  109. };
  110. /********************************************************************
  111. Drivers info class.
  112. ********************************************************************/
  113. class TDriverTransfer {
  114. public:
  115. TDriverTransfer(
  116. VOID
  117. );
  118. ~TDriverTransfer(
  119. VOID
  120. );
  121. VAR( UINT, cDriverInfo );
  122. DLINK_BASE( TDriverInfo, DriverInfoList, DriverInfo );
  123. private:
  124. //
  125. // Copying and assignment are not defined.
  126. //
  127. TDriverTransfer(
  128. const TDriverTransfer &
  129. );
  130. TDriverTransfer &
  131. operator =(
  132. const TDriverTransfer &
  133. );
  134. };
  135. #endif