1 | /* $Id: VBoxNetFltNobj.h 76568 2019-01-01 04:34:11Z 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-2019 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 | * The contents of this file may alternatively be used under the terms
|
---|
18 | * of the Common Development and Distribution License Version 1.0
|
---|
19 | * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
|
---|
20 | * VirtualBox OSE distribution, in which case the provisions of the
|
---|
21 | * CDDL are applicable instead of those of the GPL.
|
---|
22 | *
|
---|
23 | * You may elect to license modified versions of this file under the
|
---|
24 | * terms and conditions of either the GPL or the CDDL or both.
|
---|
25 | */
|
---|
26 |
|
---|
27 | #ifndef VBOX_INCLUDED_SRC_VBoxNetFlt_win_nobj_VBoxNetFltNobj_h
|
---|
28 | #define VBOX_INCLUDED_SRC_VBoxNetFlt_win_nobj_VBoxNetFltNobj_h
|
---|
29 | #ifndef RT_WITHOUT_PRAGMA_ONCE
|
---|
30 | # pragma once
|
---|
31 | #endif
|
---|
32 |
|
---|
33 | #include <iprt/win/windows.h>
|
---|
34 |
|
---|
35 | #include "VBox/com/defs.h"
|
---|
36 | #include "VBoxNetFltNobjT.h"
|
---|
37 | #include "VBoxNetFltNobjRc.h"
|
---|
38 |
|
---|
39 | #define VBOXNETFLTNOTIFY_ONFAIL_BINDDEFAULT false
|
---|
40 |
|
---|
41 | /*
|
---|
42 | * VirtualBox Bridging driver notify object.
|
---|
43 | * Needed to make our driver bind to "real" host adapters only
|
---|
44 | */
|
---|
45 | class ATL_NO_VTABLE VBoxNetFltNobj :
|
---|
46 | public ATL::CComObjectRootEx<ATL::CComMultiThreadModel>,
|
---|
47 | public ATL::CComCoClass<VBoxNetFltNobj, &CLSID_VBoxNetFltNobj>,
|
---|
48 | public INetCfgComponentControl,
|
---|
49 | public INetCfgComponentNotifyBinding
|
---|
50 | {
|
---|
51 | public:
|
---|
52 | VBoxNetFltNobj();
|
---|
53 | virtual ~VBoxNetFltNobj();
|
---|
54 |
|
---|
55 | BEGIN_COM_MAP(VBoxNetFltNobj)
|
---|
56 | COM_INTERFACE_ENTRY(INetCfgComponentControl)
|
---|
57 | COM_INTERFACE_ENTRY(INetCfgComponentNotifyBinding)
|
---|
58 | END_COM_MAP()
|
---|
59 |
|
---|
60 | // this is a "just in case" conditional, which is not defined
|
---|
61 | #ifdef VBOX_FORCE_REGISTER_SERVER
|
---|
62 | DECLARE_REGISTRY_RESOURCEID(IDR_VBOXNETFLT_NOBJ)
|
---|
63 | #endif
|
---|
64 |
|
---|
65 | /* INetCfgComponentControl methods */
|
---|
66 | STDMETHOD(Initialize)(IN INetCfgComponent *pNetCfgComponent, IN INetCfg *pNetCfg, IN BOOL bInstalling);
|
---|
67 | STDMETHOD(ApplyRegistryChanges)();
|
---|
68 | STDMETHOD(ApplyPnpChanges)(IN INetCfgPnpReconfigCallback *pCallback);
|
---|
69 | STDMETHOD(CancelChanges)();
|
---|
70 |
|
---|
71 | /* INetCfgComponentNotifyBinding methods */
|
---|
72 | STDMETHOD(NotifyBindingPath)(IN DWORD dwChangeFlag, IN INetCfgBindingPath *pNetCfgBP);
|
---|
73 | STDMETHOD(QueryBindingPath)(IN DWORD dwChangeFlag, IN INetCfgBindingPath *pNetCfgBP);
|
---|
74 | private:
|
---|
75 |
|
---|
76 | void init(IN INetCfgComponent *pNetCfgComponent, IN INetCfg *pNetCfg, IN BOOL bInstalling);
|
---|
77 | void cleanup();
|
---|
78 |
|
---|
79 | /* these two used to maintain the component info passed to
|
---|
80 | * INetCfgComponentControl::Initialize */
|
---|
81 | INetCfg *mpNetCfg;
|
---|
82 | INetCfgComponent *mpNetCfgComponent;
|
---|
83 | BOOL mbInstalling;
|
---|
84 | };
|
---|
85 |
|
---|
86 | #endif /* !VBOX_INCLUDED_SRC_VBoxNetFlt_win_nobj_VBoxNetFltNobj_h */
|
---|