NetworkAdapterImpl.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
/** @file
*
* VBox frontends: Basic Frontend (BFE):
* Declaration of NetworkAdapter class
*
* This is adapted from frontends/VirtualBox/NetworkAdapter.cpp.
*/
/*
* Copyright (C) 2006 InnoTek Systemberatung GmbH
*
* 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 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.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*/
#ifndef ____H_NETWORKADAPTER
#define ____H_NETWORKADAPTER
#include <COMDefs.h>
#include <COMStr.h>
#include <iprt/critsect.h>
#define INPTR const
{
struct Data
{
Data()
#ifdef __LINUX__
, mTAPFD (NIL_RTFILE)
#endif
{}
#ifdef __LINUX__
#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);
#ifdef __LINUX__
#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