home *** CD-ROM | disk | FTP | other *** search
/ PCNET 2006 September - Disc 1 / PCNET_CD_2006_09.iso / surpriz / MSRMesh-VirtualWIFI.MSI / adapter.h < prev    next >
Encoding:
C/C++ Source or Header  |  2005-06-24  |  1.8 KB  |  94 lines

  1. /*
  2.  * Author   : Ranveer Chandra
  3.  * Directory: VirtualWiFi_Root\notifyob
  4.  * File Name: adapter.h
  5.  * Purpose  : Header file for physical adapter class.
  6.  */
  7.  
  8. #ifndef ADAPTER_H_INCLUDED
  9.  
  10. #define ADAPTER_H_INCLUDED
  11.  
  12. #include <windows.h>
  13. #include <netcfgn.h>
  14.  
  15. #include "common.h"
  16. #include "virtual.h"
  17. #include "list.h"
  18.  
  19. //
  20. // Class to represent a physical adapter.
  21. //
  22.  
  23. class CMuxPhysicalAdapter
  24. {
  25.     //
  26.     // Private member variables.
  27.     //
  28.  
  29.     GUID    m_guidAdapter;
  30.  
  31.     CHAR    *m_pDeviceName;
  32.  
  33.     HANDLE  m_hNdisHandle;
  34.  
  35.     INetCfg *m_pnc;
  36.  
  37.     //
  38.     // List of virtual miniports associated with the adapter.
  39.     //
  40.  
  41.     List<CMuxVirtualMiniport *, GUID> m_MiniportList;
  42.  
  43.     //
  44.     // List of virtual miniports to be added.
  45.     //
  46.  
  47.     List<CMuxVirtualMiniport *, GUID> m_MiniportsToAdd;
  48.  
  49.     //
  50.     // List of virtual miniports to be removed.
  51.     //
  52.  
  53.     List<CMuxVirtualMiniport *, GUID> m_MiniportsToRemove;
  54.  
  55.     //
  56.     // Private member functions.
  57.     //
  58.  
  59.   public:
  60.  
  61.     //
  62.     // Public member functions
  63.     //
  64.  
  65.     CMuxPhysicalAdapter (INetCfg *pnc,
  66.                          GUID *guidAdapter);
  67.  
  68.     virtual ~CMuxPhysicalAdapter (VOID);
  69.  
  70.     HRESULT LoadConfiguration (VOID);
  71.  
  72.     VOID    GetAdapterGUID (GUID *guidAdapter);
  73.  
  74.     HRESULT AddMiniport (CMuxVirtualMiniport *pNewMiniport);
  75.  
  76.     HRESULT RemoveMiniport (GUID *pguidMiniport);
  77.  
  78.     HRESULT Remove (VOID);
  79.  
  80.     HRESULT ApplyRegistryChanges (ConfigAction eApplyAction);
  81.  
  82.     HRESULT ApplyPnpChanges (INetCfgPnpReconfigCallback *pfCallback,
  83.                              ConfigAction eApplyAction);
  84.  
  85.     HRESULT CancelChanges (VOID);
  86.  
  87.     DWORD MiniportCount (VOID) { return m_MiniportList.ListCount(); }
  88.  
  89.     BOOL  AllMiniportsRemoved (VOID);
  90. };
  91.  
  92.  
  93. #endif // ADAPTER_H_INCLUDED
  94.