VirtualBoxImpl.h revision 677833bc953b6cb418c701facbdcf4aa18d6c44e
/** @file
*
* VirtualBox COM class implementation
*/
/*
* 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_VIRTUALBOXIMPL
#define ____H_VIRTUALBOXIMPL
#include "VirtualBoxBase.h"
#include "VirtualBoxXMLUtil.h"
#include "VBox/com/EventQueue.h"
#include <list>
#include <vector>
#include <map>
#ifdef __WIN__
#include "win32/resource.h"
#endif
#ifdef __WIN__
#endif
struct VMClientWatcherData;
#ifdef __WIN__
#else
#endif
{
VirtualBox();
~VirtualBox();
void FinalRelease();
/* public initializer/uninitializer for internal purposes only */
void uninit();
/* IVirtualBox properties */
/* IVirtualBox methods */
BSTR *aMachineIDs);
BSTR *aMachineIDs);
/* public methods only for internal purposes */
#ifdef __WIN__
#endif
void updateClientWatcher();
{
}
/// @todo (dmik) remove and make findMachine() public instead
// after switching to VirtualBoxBaseNEXT
bool aSetError = false)
{
}
/// @todo (dmik) remove and make findHardDisk() public instead
// after switching to VirtualBoxBaseNEXT
{
}
/** Returns the VirtualBox home directory */
/* for VirtualBoxSupportErrorInfoImpl */
/** @note This method is not thread safe */
/**
* Main VirtualBox data structure.
* @note |const| members are persistent during lifetime so can be accessed
* without locking.
*/
struct Data
{
Data();
struct CfgFile
{
};
// const data members not requiring locking
// const objects not requiring locking
};
/** Client watcher thread data structure */
struct ClientWatcherData
{
#if defined(__WIN__)
: mUpdateReq (NULL)
#endif
, mThread (NIL_RTTHREAD) {}
// const objects not requiring locking
#if defined(__WIN__)
const HANDLE mUpdateReq;
const RTSEMEVENT mUpdateReq;
#endif
};
const RTTHREAD mAsyncEventThread;
EventQueue * const mAsyncEventQ;
/** Lock for calling EventQueue->post() */
#ifdef __WIN__
#endif
};
////////////////////////////////////////////////////////////////////////////////
/**
* Abstract callback event class to asynchronously call VirtualBox callbacks
* on a dedicated event thread. Subclasses reimplement #handleCallback()
* to call appropriate IVirtualBoxCallback methods depending on the event
* to be dispatched.
*
* @note The VirtualBox instance passed to the constructor is strongly
* referenced, so that the VirtualBox singleton won't be released until the
* event gets handled by the event thread.
*/
{
{
}
void *handler();
/*
* Note that this is a weak ref -- the CallbackEvent handler thread
* is bound to the lifetime of the VirtualBox instance, so it's safe.
*/
};
#endif // ____H_VIRTUALBOXIMPL