1 | /*
|
---|
2 | * Copyright (C) 2008 Sun Microsystems, Inc.
|
---|
3 | *
|
---|
4 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
5 | * available from http://www.virtualbox.org. This file is free software;
|
---|
6 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
7 | * General Public License (GPL) as published by the Free Software
|
---|
8 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
9 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
10 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
11 | *
|
---|
12 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
13 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
14 | * additional information or have any questions.
|
---|
15 | */
|
---|
16 | /*
|
---|
17 | * Based in part on Microsoft DDK sample code for Sample Notify Object
|
---|
18 | *+---------------------------------------------------------------------------
|
---|
19 | *
|
---|
20 | * Microsoft Windows
|
---|
21 | * Copyright (C) Microsoft Corporation, 1992-2001.
|
---|
22 | *
|
---|
23 | * Author: Alok Sinha
|
---|
24 | *
|
---|
25 | *----------------------------------------------------------------------------
|
---|
26 | */
|
---|
27 | #ifndef ___VboxNetFltNotify_h___
|
---|
28 | #define ___VboxNetFltNotify_h___
|
---|
29 |
|
---|
30 | #include <windows.h>
|
---|
31 | #include <atlbase.h>
|
---|
32 | extern CComModule _Module; // required by atlcom.h
|
---|
33 | #include <atlcom.h>
|
---|
34 | #include <VBoxNetFltNotifyn.h>
|
---|
35 | //#include <Netcfgx.h>
|
---|
36 |
|
---|
37 | #include "VBoxNetFltNotifyRc.h"
|
---|
38 |
|
---|
39 | #define VBOXNETFLTNOTIFY_ONFAIL_BINDDEFAULT false
|
---|
40 |
|
---|
41 | /*
|
---|
42 | * VboxNetFlt Notify Object used to control bindings
|
---|
43 | */
|
---|
44 | class VBoxNetFltNotify :
|
---|
45 |
|
---|
46 | /*
|
---|
47 | * Must inherit from CComObjectRoot(Ex) for reference count
|
---|
48 | * management and default threading model.
|
---|
49 | */
|
---|
50 | public CComObjectRoot,
|
---|
51 |
|
---|
52 | /*
|
---|
53 | * Define the default class factory and aggregation model.
|
---|
54 | */
|
---|
55 | public CComCoClass<VBoxNetFltNotify, &CLSID_VBoxNetFltNotify>,
|
---|
56 |
|
---|
57 | /*
|
---|
58 | * Notify Object's interfaces.
|
---|
59 | */
|
---|
60 | public INetCfgComponentControl,
|
---|
61 | public INetCfgComponentNotifyBinding
|
---|
62 | {
|
---|
63 |
|
---|
64 | /*
|
---|
65 | * Public members.
|
---|
66 | */
|
---|
67 | public:
|
---|
68 |
|
---|
69 | /*
|
---|
70 | * Constructor
|
---|
71 | */
|
---|
72 | VBoxNetFltNotify(VOID);
|
---|
73 |
|
---|
74 | /*
|
---|
75 | * Destructors.
|
---|
76 | */
|
---|
77 | ~VBoxNetFltNotify(VOID);
|
---|
78 |
|
---|
79 | /*
|
---|
80 | * Notify Object's interfaces.
|
---|
81 | */
|
---|
82 | BEGIN_COM_MAP(VBoxNetFltNotify)
|
---|
83 | COM_INTERFACE_ENTRY(INetCfgComponentControl)
|
---|
84 | // COM_INTERFACE_ENTRY(INetCfgComponentSetup)
|
---|
85 | // COM_INTERFACE_ENTRY(INetCfgComponentPropertyUi)
|
---|
86 | COM_INTERFACE_ENTRY(INetCfgComponentNotifyBinding)
|
---|
87 | // COM_INTERFACE_ENTRY(INetCfgComponentNotifyGlobal)
|
---|
88 | END_COM_MAP()
|
---|
89 |
|
---|
90 | /*
|
---|
91 | * Uncomment the the line below if you don't want your object to
|
---|
92 | * support aggregation. The default is to support it
|
---|
93 | *
|
---|
94 | * DECLARE_NOT_AGGREGATABLE(CMuxNotify)
|
---|
95 | */
|
---|
96 |
|
---|
97 | DECLARE_REGISTRY_RESOURCEID(IDR_REG_VBOXNETFLT_NOTIFY)
|
---|
98 |
|
---|
99 | /*
|
---|
100 | * INetCfgComponentControl
|
---|
101 | */
|
---|
102 | STDMETHOD (Initialize) (
|
---|
103 | IN INetCfgComponent *pIComp,
|
---|
104 | IN INetCfg *pINetCfg,
|
---|
105 | IN BOOL fInstalling);
|
---|
106 |
|
---|
107 | STDMETHOD (CancelChanges) ();
|
---|
108 |
|
---|
109 | STDMETHOD (ApplyRegistryChanges) ();
|
---|
110 |
|
---|
111 | STDMETHOD (ApplyPnpChanges) (
|
---|
112 | IN INetCfgPnpReconfigCallback* pICallback);
|
---|
113 |
|
---|
114 | /*
|
---|
115 | * INetCfgNotifyBinding
|
---|
116 | */
|
---|
117 | STDMETHOD (QueryBindingPath) (
|
---|
118 | IN DWORD dwChangeFlag,
|
---|
119 | IN INetCfgBindingPath* pncbp);
|
---|
120 |
|
---|
121 | STDMETHOD (NotifyBindingPath) (
|
---|
122 | IN DWORD dwChangeFlag,
|
---|
123 | IN INetCfgBindingPath* pncbp);
|
---|
124 |
|
---|
125 | /*
|
---|
126 | * Private members.
|
---|
127 | */
|
---|
128 | private:
|
---|
129 |
|
---|
130 | /*
|
---|
131 | * Private member variables.
|
---|
132 | */
|
---|
133 | INetCfgComponent *m_pncc; /* Our Protocol's Net Config component */
|
---|
134 | INetCfg *m_pnc;
|
---|
135 | };
|
---|
136 |
|
---|
137 | #endif
|
---|