1 | /* $Id: VBoxNetFltNobj.h 50323 2014-02-05 10:20:04Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * VBoxNetFltNobj.h - Notify Object for Bridged Networking Driver.
|
---|
4 | * Used to filter Bridged Networking Driver bindings
|
---|
5 | */
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2011 Oracle Corporation
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | */
|
---|
17 | #ifndef ___VBoxNetFltNobj_h___
|
---|
18 | #define ___VBoxNetFltNobj_h___
|
---|
19 |
|
---|
20 | #include <windows.h>
|
---|
21 | /* atl stuff */
|
---|
22 | #include <atlbase.h>
|
---|
23 | extern CComModule _Module;
|
---|
24 | #include <atlcom.h>
|
---|
25 |
|
---|
26 | #include "VBoxNetFltNobjT.h"
|
---|
27 | #include "VBoxNetFltNobjRc.h"
|
---|
28 |
|
---|
29 | #define VBOXNETFLTNOTIFY_ONFAIL_BINDDEFAULT false
|
---|
30 |
|
---|
31 | /*
|
---|
32 | * VirtualBox Bridging driver notify object.
|
---|
33 | * Needed to make our driver bind to "real" host adapters only
|
---|
34 | */
|
---|
35 | class ATL_NO_VTABLE VBoxNetFltNobj :
|
---|
36 | public CComObjectRootEx<CComObjectThreadModel>,
|
---|
37 | public CComCoClass<VBoxNetFltNobj, &CLSID_VBoxNetFltNobj>,
|
---|
38 | public INetCfgComponentControl,
|
---|
39 | public INetCfgComponentNotifyBinding
|
---|
40 | {
|
---|
41 | public:
|
---|
42 | VBoxNetFltNobj();
|
---|
43 | ~VBoxNetFltNobj();
|
---|
44 |
|
---|
45 | BEGIN_COM_MAP(VBoxNetFltNobj)
|
---|
46 | COM_INTERFACE_ENTRY(INetCfgComponentControl)
|
---|
47 | COM_INTERFACE_ENTRY(INetCfgComponentNotifyBinding)
|
---|
48 | END_COM_MAP()
|
---|
49 |
|
---|
50 | DECLARE_REGISTRY_RESOURCEID(IDR_VBOXNETFLT_NOBJ)
|
---|
51 |
|
---|
52 | /* INetCfgComponentControl methods */
|
---|
53 | STDMETHOD(Initialize)(IN INetCfgComponent *pNetCfgComponent, IN INetCfg *pNetCfg, IN BOOL bInstalling);
|
---|
54 | STDMETHOD(ApplyRegistryChanges)();
|
---|
55 | STDMETHOD(ApplyPnpChanges)(IN INetCfgPnpReconfigCallback *pCallback);
|
---|
56 | STDMETHOD(CancelChanges)();
|
---|
57 |
|
---|
58 | /* INetCfgComponentNotifyBinding methods */
|
---|
59 | STDMETHOD(NotifyBindingPath)(IN DWORD dwChangeFlag, IN INetCfgBindingPath *pNetCfgBP);
|
---|
60 | STDMETHOD(QueryBindingPath)(IN DWORD dwChangeFlag, IN INetCfgBindingPath *pNetCfgBP);
|
---|
61 | private:
|
---|
62 |
|
---|
63 | void init(IN INetCfgComponent *pNetCfgComponent, IN INetCfg *pNetCfg, IN BOOL bInstalling);
|
---|
64 | void cleanup();
|
---|
65 |
|
---|
66 | /* these two used to maintain the component info passed to
|
---|
67 | * INetCfgComponentControl::Initialize */
|
---|
68 | INetCfg *mpNetCfg;
|
---|
69 | INetCfgComponent *mpNetCfgComponent;
|
---|
70 | BOOL mbInstalling;
|
---|
71 | };
|
---|
72 |
|
---|
73 | #endif /* #ifndef ___VBoxNetFltNobj_h___ */
|
---|