GuestCtrlImplPrivate.h revision 5f2b03bf7695dabd71222dba123532a3f76828c1
/** @file
*
* Internal helpers/structures for guest control functionality.
*/
/*
* Copyright (C) 2011-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_GUESTIMPLPRIVATE
#define ____H_GUESTIMPLPRIVATE
#include <iprt/semaphore.h>
#include <map>
#include <vector>
#ifdef VBOX_WITH_GUEST_CONTROL
#endif
/* Builds a context ID out of the session ID, process ID and an
* increasing count. */
)
/**
* Generic class for a all guest control callbacks.
*/
{
GuestCtrlCallback(void);
virtual ~GuestCtrlCallback(void);
/** @todo Copy/comparison operator? */
void Destroy(void);
eVBoxGuestCtrlCallbackType Type(void);
/** The callback type. */
/** Callback flags. */
/** Pointer to user-supplied data. */
void *pvData;
/** Size of user-supplied data. */
/** The event semaphore triggering the*/
/** Extended error information, if any. */
};
/**
* Simple structure mantaining guest credentials.
*/
{
};
/**
* Structure for keeping all the relevant process
* starting parameters around.
*/
struct GuestProcessInfo
{
};
/**
* Class representing the "value" side of a "key=value" pair.
*/
{
GuestProcessStreamValue() { }
GuestProcessStreamValue(const char *pszValue)
};
/** Map containing "key=value" pairs of a guest process stream. */
typedef std::map < Utf8Str, GuestProcessStreamValue >::const_iterator GuestCtrlStreamPairMapIterConst;
/**
* Class representing a block of stream pairs (key=value). Each block in a raw guest
* output stream is separated by "\0\0", each pair is separated by "\0". The overall
* end of a guest stream is marked by "\0\0\0\0".
*/
{
//GuestProcessStreamBlock(GuestProcessStreamBlock &);
void Clear();
#ifdef DEBUG
void Dump();
#endif
};
/** Vector containing multiple allocated stream pair objects. */
/**
* Class for parsing machine-readable guest process output by VBoxService'
* toolbox commands ("vbox_ls", "vbox_stat" etc), aka "guest stream".
*/
{
void Destroy();
#ifdef DEBUG
#endif
/** Currently allocated size of internal stream buffer. */
/** Currently used size of allocated internal stream buffer. */
/** Current offset within the internal stream buffer. */
/** Internal stream buffer. */
};
{
enum TaskType
{
/** Copies a file from host to the guest. */
TaskType_CopyFileToGuest = 50,
/** Copies a file from guest to the host. */
/** Update Guest Additions by directly copying the required installer
* off the .ISO file, transfer it to the guest and execute the installer
* with system privileges. */
};
int startThread();
/* Task data. */
};
#endif // ____H_GUESTIMPLPRIVATE