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.

96 lines
2.0 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992-2001.
  5. //
  6. // File: A D A P T E R . H
  7. //
  8. // Contents: Header file for physical adapter class.
  9. //
  10. // Notes:
  11. //
  12. // Author: Alok Sinha 31-Oct-2000
  13. //
  14. //----------------------------------------------------------------------------
  15. #ifndef ADAPTER_H_INCLUDED
  16. #define ADAPTER_H_INCLUDED
  17. #include <windows.h>
  18. #include <netcfgn.h>
  19. #include "common.h"
  20. #include "virtual.h"
  21. #include "list.h"
  22. //
  23. // Class to represent a physical adapter.
  24. //
  25. class CMuxPhysicalAdapter
  26. {
  27. //
  28. // Private member variables.
  29. //
  30. GUID m_guidAdapter;
  31. INetCfg *m_pnc;
  32. //
  33. // List of virtual miniports associated with the adapter.
  34. //
  35. List<CMuxVirtualMiniport *, GUID> m_MiniportList;
  36. //
  37. // List of virtual miniports to be added.
  38. //
  39. List<CMuxVirtualMiniport *, GUID> m_MiniportsToAdd;
  40. //
  41. // List of virtual miniports to be removed.
  42. //
  43. List<CMuxVirtualMiniport *, GUID> m_MiniportsToRemove;
  44. //
  45. // Private member functions.
  46. //
  47. public:
  48. //
  49. // Public member functions
  50. //
  51. CMuxPhysicalAdapter (INetCfg *pnc,
  52. GUID *guidAdapter);
  53. virtual ~CMuxPhysicalAdapter (VOID);
  54. HRESULT LoadConfiguration (VOID);
  55. VOID GetAdapterGUID (GUID *guidAdapter);
  56. HRESULT AddMiniport (CMuxVirtualMiniport *pNewMiniport);
  57. HRESULT RemoveMiniport (GUID *pguidMiniport);
  58. HRESULT Remove (VOID);
  59. HRESULT ApplyRegistryChanges (ConfigAction eApplyAction);
  60. HRESULT ApplyPnpChanges (INetCfgPnpReconfigCallback *pfCallback,
  61. ConfigAction eApplyAction);
  62. HRESULT CancelChanges (VOID);
  63. DWORD MiniportCount (VOID) { return m_MiniportList.ListCount(); }
  64. BOOL AllMiniportsRemoved (VOID);
  65. };
  66. #endif // ADAPTER_H_INCLUDED