1 | /*
|
---|
2 | * Copyright (C) 2008 Sun Microsystems, Inc.
|
---|
3 | *
|
---|
4 | * Sun Microsystems, Inc. confidential
|
---|
5 | * All rights reserved
|
---|
6 | */
|
---|
7 | /*
|
---|
8 | * Based in part on Microsoft DDK sample code for Sample Notify Object
|
---|
9 | *+---------------------------------------------------------------------------
|
---|
10 | *
|
---|
11 | * Microsoft Windows
|
---|
12 | * Copyright (C) Microsoft Corporation, 1992-2001.
|
---|
13 | *
|
---|
14 | * Author: Alok Sinha
|
---|
15 | *
|
---|
16 | *----------------------------------------------------------------------------
|
---|
17 | */
|
---|
18 | #ifndef ___VboxNetFltNotify_h___
|
---|
19 | #define ___VboxNetFltNotify_h___
|
---|
20 |
|
---|
21 | #include <windows.h>
|
---|
22 | #include <atlbase.h>
|
---|
23 | extern CComModule _Module; // required by atlcom.h
|
---|
24 | #include <atlcom.h>
|
---|
25 | #include <VBoxNetFltNotifyn.h>
|
---|
26 | //#include <Netcfgx.h>
|
---|
27 |
|
---|
28 | #include "VBoxNetFltNotifyRc.h"
|
---|
29 |
|
---|
30 | #define VBOXNETFLTNOTIFY_ONFAIL_BINDDEFAULT false
|
---|
31 |
|
---|
32 | /*
|
---|
33 | * VboxNetFlt Notify Object used to control bindings
|
---|
34 | */
|
---|
35 | class VBoxNetFltNotify :
|
---|
36 |
|
---|
37 | /*
|
---|
38 | * Must inherit from CComObjectRoot(Ex) for reference count
|
---|
39 | * management and default threading model.
|
---|
40 | */
|
---|
41 | public CComObjectRoot,
|
---|
42 |
|
---|
43 | /*
|
---|
44 | * Define the default class factory and aggregation model.
|
---|
45 | */
|
---|
46 | public CComCoClass<VBoxNetFltNotify, &CLSID_VBoxNetFltNotify>,
|
---|
47 |
|
---|
48 | /*
|
---|
49 | * Notify Object's interfaces.
|
---|
50 | */
|
---|
51 | public INetCfgComponentControl,
|
---|
52 | public INetCfgComponentNotifyBinding
|
---|
53 | {
|
---|
54 |
|
---|
55 | /*
|
---|
56 | * Public members.
|
---|
57 | */
|
---|
58 | public:
|
---|
59 |
|
---|
60 | /*
|
---|
61 | * Constructor
|
---|
62 | */
|
---|
63 | VBoxNetFltNotify(VOID);
|
---|
64 |
|
---|
65 | /*
|
---|
66 | * Destructors.
|
---|
67 | */
|
---|
68 | ~VBoxNetFltNotify(VOID);
|
---|
69 |
|
---|
70 | /*
|
---|
71 | * Notify Object's interfaces.
|
---|
72 | */
|
---|
73 | BEGIN_COM_MAP(VBoxNetFltNotify)
|
---|
74 | COM_INTERFACE_ENTRY(INetCfgComponentControl)
|
---|
75 | // COM_INTERFACE_ENTRY(INetCfgComponentSetup)
|
---|
76 | // COM_INTERFACE_ENTRY(INetCfgComponentPropertyUi)
|
---|
77 | COM_INTERFACE_ENTRY(INetCfgComponentNotifyBinding)
|
---|
78 | // COM_INTERFACE_ENTRY(INetCfgComponentNotifyGlobal)
|
---|
79 | END_COM_MAP()
|
---|
80 |
|
---|
81 | /*
|
---|
82 | * Uncomment the the line below if you don't want your object to
|
---|
83 | * support aggregation. The default is to support it
|
---|
84 | *
|
---|
85 | * DECLARE_NOT_AGGREGATABLE(CMuxNotify)
|
---|
86 | */
|
---|
87 |
|
---|
88 | DECLARE_REGISTRY_RESOURCEID(IDR_REG_VBOXNETFLT_NOTIFY)
|
---|
89 |
|
---|
90 | /*
|
---|
91 | * INetCfgComponentControl
|
---|
92 | */
|
---|
93 | STDMETHOD (Initialize) (
|
---|
94 | IN INetCfgComponent *pIComp,
|
---|
95 | IN INetCfg *pINetCfg,
|
---|
96 | IN BOOL fInstalling);
|
---|
97 |
|
---|
98 | STDMETHOD (CancelChanges) ();
|
---|
99 |
|
---|
100 | STDMETHOD (ApplyRegistryChanges) ();
|
---|
101 |
|
---|
102 | STDMETHOD (ApplyPnpChanges) (
|
---|
103 | IN INetCfgPnpReconfigCallback* pICallback);
|
---|
104 |
|
---|
105 | /*
|
---|
106 | * INetCfgNotifyBinding
|
---|
107 | */
|
---|
108 | STDMETHOD (QueryBindingPath) (
|
---|
109 | IN DWORD dwChangeFlag,
|
---|
110 | IN INetCfgBindingPath* pncbp);
|
---|
111 |
|
---|
112 | STDMETHOD (NotifyBindingPath) (
|
---|
113 | IN DWORD dwChangeFlag,
|
---|
114 | IN INetCfgBindingPath* pncbp);
|
---|
115 |
|
---|
116 | /*
|
---|
117 | * Private members.
|
---|
118 | */
|
---|
119 | private:
|
---|
120 |
|
---|
121 | /*
|
---|
122 | * Private member variables.
|
---|
123 | */
|
---|
124 | INetCfgComponent *m_pncc; /* Our Protocol's Net Config component */
|
---|
125 | INetCfg *m_pnc;
|
---|
126 | };
|
---|
127 |
|
---|
128 | #endif
|
---|