NetworkAdapterImpl.h revision e64031e20c39650a7bc902a3e1aba613b9415dee
/** @file
*
* VBox frontends: Basic Frontend (BFE):
* Declaration of NetworkAdapter class
*
* This is adapted from frontends/VirtualBox/NetworkAdapter.cpp.
*/
/*
* Copyright (C) 2006-2007 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef ____H_NETWORKADAPTER
#define ____H_NETWORKADAPTER
#include <COMDefs.h>
#include <COMStr.h>
#include <iprt/critsect.h>
#define INPTR const
{
struct Data
{
Data()
#ifdef RT_OS_LINUX
, mTAPFD (NIL_RTFILE)
#endif
{}
#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
#endif
};
void FinalRelease();
// public initializer/uninitializer for internal purposes only
// int init (Console *parent, NetworkAdapter *that);
void uninit();
// INetworkAdapter properties
// STDMETHOD(COMGETTER(AttachmentType))(NetworkAttachmentType_T *attachmentType);
#if defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)
#endif
// INetworkAdapter methods
STDMETHOD(AttachToNAT)();
void detach();
void generateMACAddress();
};
{
~AutoLock() {
while (mLevel --)
}
void lock() {
++ mLevel;
}
void unlock() {
if (mLevel > 0) {
-- mLevel;
}
}
unsigned int mLevel;
};
#endif // ____H_NETWORKADAPTER