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.

242 lines
3.4 KiB

  1. /*++
  2. Copyright (c) 1993 Microsoft Corporation
  3. Module Name:
  4. regfdesc.hxx
  5. Abstract:
  6. This module contains the declarations for the FULL_RESOURCE_DESCRIPTOR
  7. class. This class models models a CM_FULL_RESOURCE_DESCRIPTOR structure,
  8. used on registry data of type REG_FULL_RESOURCE_DESCRIPTOR and REG_RESOURCE_LIST.
  9. Author:
  10. Jaime Sasson (jaimes) 01-Dec-1993
  11. Environment:
  12. ULIB, User Mode
  13. --*/
  14. #if !defined( _FULL_DESCRIPTOR_ )
  15. #define _FULL_DESCRIPTOR_
  16. // don't let ntdddisk.h (included in ulib.hxx"
  17. // redefine values
  18. #define _NTDDDISK_H_
  19. #include "ulib.hxx"
  20. #include "array.hxx"
  21. DECLARE_CLASS( FULL_DESCRIPTOR );
  22. class FULL_DESCRIPTOR : public OBJECT {
  23. public:
  24. DECLARE_CONSTRUCTOR( FULL_DESCRIPTOR );
  25. VIRTUAL
  26. ~FULL_DESCRIPTOR(
  27. );
  28. NONVIRTUAL
  29. BOOLEAN
  30. Initialize(
  31. IN PCBYTE Data,
  32. IN ULONG DataSize,
  33. OUT PULONG DescriptorSize DEFAULT NULL
  34. );
  35. NONVIRTUAL
  36. INTERFACE_TYPE
  37. GetInterfaceType(
  38. ) CONST;
  39. NONVIRTUAL
  40. ULONG
  41. GetBusNumber(
  42. ) CONST;
  43. NONVIRTUAL
  44. USHORT
  45. GetVersion(
  46. ) CONST;
  47. NONVIRTUAL
  48. USHORT
  49. GetRevision(
  50. ) CONST;
  51. NONVIRTUAL
  52. PARRAY
  53. GetResourceDescriptors(
  54. ) CONST;
  55. private:
  56. NONVIRTUAL
  57. VOID
  58. Construct(
  59. );
  60. NONVIRTUAL
  61. VOID
  62. Destroy(
  63. );
  64. INTERFACE_TYPE _InterfaceType;
  65. ULONG _BusNumber;
  66. USHORT _Version;
  67. USHORT _Revision;
  68. PARRAY _ResourceDescriptors;
  69. };
  70. INLINE
  71. INTERFACE_TYPE
  72. FULL_DESCRIPTOR::GetInterfaceType(
  73. ) CONST
  74. /*++
  75. Routine Description:
  76. Return the interface type of the full descriptor represented
  77. by this object.
  78. Arguments:
  79. None.
  80. Return Value:
  81. Returns the interface type.
  82. --*/
  83. {
  84. return( _InterfaceType );
  85. }
  86. INLINE
  87. ULONG
  88. FULL_DESCRIPTOR::GetBusNumber(
  89. ) CONST
  90. /*++
  91. Routine Description:
  92. Return the bus number of the full descriptor represented
  93. by this object.
  94. Arguments:
  95. None.
  96. Return Value:
  97. Returns the bus number.
  98. --*/
  99. {
  100. return( _BusNumber );
  101. }
  102. INLINE
  103. USHORT
  104. FULL_DESCRIPTOR::GetVersion(
  105. ) CONST
  106. /*++
  107. Routine Description:
  108. Return the version of the partial resource list.
  109. Arguments:
  110. None.
  111. Return Value:
  112. USHORT - Returns the version of the partial resource list
  113. --*/
  114. {
  115. return( _Version );
  116. }
  117. INLINE
  118. USHORT
  119. FULL_DESCRIPTOR::GetRevision(
  120. ) CONST
  121. /*++
  122. Routine Description:
  123. Return the revision of the partial resource list.
  124. Arguments:
  125. None.
  126. Return Value:
  127. USHORT - Returns the revisin of the partial resource list
  128. --*/
  129. {
  130. return( _Revision );
  131. }
  132. INLINE
  133. PARRAY
  134. FULL_DESCRIPTOR::GetResourceDescriptors(
  135. ) CONST
  136. /*++
  137. Routine Description:
  138. Return a pointer to the array that contains the partial resource
  139. descriptors.
  140. Arguments:
  141. None.
  142. Return Value:
  143. PARRAY - Pointer to the array that contains the partial resource descriptors.
  144. --*/
  145. {
  146. return( _ResourceDescriptors );
  147. }
  148. #endif // FULL_DESCRIPTOR