summaryrefslogtreecommitdiff
path: root/network/ndis/mux/notifyob/adapter.h
blob: 9bf5614f6332684c228879243c391924401b4ba4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
//+---------------------------------------------------------------------------
//
//  Microsoft Windows
//  Copyright (C) Microsoft Corporation, 1992-2001.
//
//  File:       A D A P T E R . H
//
//  Contents:   Header file for physical adapter class.
//
//  Notes:
//
//  Author:     Alok Sinha 31-Oct-2000
//
//----------------------------------------------------------------------------

#ifndef ADAPTER_H_INCLUDED

#define ADAPTER_H_INCLUDED

#include <windows.h>
#include <netcfgn.h>

#include "common.h"
#include "virtual.h"
#include "list.h"

//
// Class to represent a physical adapter.
//

class CMuxPhysicalAdapter
{
    //
    // Private member variables.
    //

    GUID    m_guidAdapter;

    INetCfg *m_pnc;

    //
    // List of virtual miniports associated with the adapter.
    //

    List<CMuxVirtualMiniport *, GUID> m_MiniportList;

    //
    // List of virtual miniports to be added.
    //

    List<CMuxVirtualMiniport *, GUID> m_MiniportsToAdd;

    //
    // List of virtual miniports to be removed.
    //

    List<CMuxVirtualMiniport *, GUID> m_MiniportsToRemove;

    //
    // Private member functions.
    //

  public:

    //
    // Public member functions
    //

    CMuxPhysicalAdapter (INetCfg *pnc,
                         GUID *guidAdapter);

    virtual ~CMuxPhysicalAdapter (VOID);

    HRESULT LoadConfiguration (VOID);

    VOID    GetAdapterGUID (GUID *guidAdapter);

    HRESULT AddMiniport (CMuxVirtualMiniport *pNewMiniport);

    HRESULT RemoveMiniport (GUID *pguidMiniport);

    HRESULT Remove (VOID);

    HRESULT ApplyRegistryChanges (ConfigAction eApplyAction);

    HRESULT ApplyPnpChanges (INetCfgPnpReconfigCallback *pfCallback,
                             ConfigAction eApplyAction);

    HRESULT CancelChanges (VOID);

    DWORD MiniportCount (VOID) { return m_MiniportList.ListCount(); }

    DWORD MiniportAddCount (VOID) { return m_MiniportsToAdd.ListCount(); }

    BOOL  AllMiniportsRemoved (VOID);
};


#endif // ADAPTER_H_INCLUDED