3
* VirtualBox COM class implementation
7
* Copyright (C) 2006-2007 innotek GmbH
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 as published by the Free Software Foundation,
13
* in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
14
* distribution. VirtualBox OSE is distributed in the hope that it will
15
* be useful, but WITHOUT ANY WARRANTY of any kind.
18
#include "HostNetworkInterfaceImpl.h"
20
// constructor / destructor
21
/////////////////////////////////////////////////////////////////////////////
23
HostNetworkInterface::HostNetworkInterface()
27
HostNetworkInterface::~HostNetworkInterface()
31
// public initializer/uninitializer for internal purposes only
32
/////////////////////////////////////////////////////////////////////////////
35
* Initializes the host object.
37
* @returns COM result indicator
38
* @param interfaceName name of the network interface
40
HRESULT HostNetworkInterface::init (Bstr interfaceName, Guid guid)
42
ComAssertRet (interfaceName, E_INVALIDARG);
43
ComAssertRet (!guid.isEmpty(), E_INVALIDARG);
46
mInterfaceName = interfaceName;
52
// IHostNetworkInterface properties
53
/////////////////////////////////////////////////////////////////////////////
56
* Returns the name of the host network interface.
58
* @returns COM status code
59
* @param interfaceName address of result pointer
61
STDMETHODIMP HostNetworkInterface::COMGETTER(Name) (BSTR *interfaceName)
67
mInterfaceName.cloneTo(interfaceName);
72
* Returns the GUID of the host network interface.
74
* @returns COM status code
75
* @param guid address of result pointer
77
STDMETHODIMP HostNetworkInterface::COMGETTER(Id) (GUIDPARAMOUT guid)