GuestProcessImpl.h revision 7e8ef90d3160234df0f254131b87af4243d79476
/* $Id$ */
/** @file
* VirtualBox Main - XXX.
*/
/*
* Copyright (C) 2012 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_GUESTPROCESSIMPL
#define ____H_GUESTPROCESSIMPL
#include "VirtualBoxBase.h"
#include "GuestCtrlImplPrivate.h"
/**
* TODO
*/
{
* @{ */
int init(Console *aConsole, GuestSession *aSession, ULONG aProcessID, const GuestProcessInfo &aProcInfo);
void uninit(void);
HRESULT FinalConstruct(void);
void FinalRelease(void);
/** @} */
/** @name IProcess interface.
* @{ */
STDMETHOD(WaitForArray)(ComSafeArrayIn(ProcessWaitForFlag_T, aFlags), ULONG aTimeoutMS, ProcessWaitResult_T *aReason);
/** @} */
/** @name Public internal methods.
* @{ */
void close(void);
bool isReady(void);
int startProcess(void);
int startProcessAsync(void);
int terminateProcess(void);
int writeData(ULONG uHandle, BYTE const *pbData, size_t cbData, ULONG uTimeoutMS, ULONG *puWritten);
/** @} */
/** @name Protected internal methods.
* @{ */
inline bool isAlive(void);
/** @} */
struct Data
{
/** Pointer to parent session. */
/** Pointer to the console object. Needed
* for HGCM (VMMDev) communication. */
/** All related callbacks to this process. */
/** The process' name. */
/** The process start information. */
/** Exit code if process has been terminated. */
/** PID reported from the guest. */
/** Internal, host-side process ID. */
/** The current process status. */
/** The next upcoming context ID. */
/** The mutex for protecting the waiter(s). */
/** How many waiters? At the moment there can only
* be one. */
/** The actual process event for doing the waits.
* At the moment we only support one wait a time. */
} mData;
};
#endif /* !____H_GUESTPROCESSIMPL */